diff --git a/alcs-frontend/src/app/features/admin/decision-condition-types/decision-condition-types-dialog/decision-condition-types-dialog.component.html b/alcs-frontend/src/app/features/admin/decision-condition-types/decision-condition-types-dialog/decision-condition-types-dialog.component.html
index fa37caf7e..0ad493cfa 100644
--- a/alcs-frontend/src/app/features/admin/decision-condition-types/decision-condition-types-dialog/decision-condition-types-dialog.component.html
+++ b/alcs-frontend/src/app/features/admin/decision-condition-types/decision-condition-types-dialog/decision-condition-types-dialog.component.html
@@ -6,16 +6,7 @@
{{ isEdit ? 'Edit' : 'Create' }} Decision Condition Type
Code
-
+
diff --git a/alcs-frontend/src/app/features/admin/decision-condition-types/decision-condition-types-dialog/decision-condition-types-dialog.component.ts b/alcs-frontend/src/app/features/admin/decision-condition-types/decision-condition-types-dialog/decision-condition-types-dialog.component.ts
index 6731c4c34..55f6f36f6 100644
--- a/alcs-frontend/src/app/features/admin/decision-condition-types/decision-condition-types-dialog/decision-condition-types-dialog.component.ts
+++ b/alcs-frontend/src/app/features/admin/decision-condition-types/decision-condition-types-dialog/decision-condition-types-dialog.component.ts
@@ -74,6 +74,10 @@ export class DecisionConditionTypesDialogComponent {
),
});
+ if (this.isEdit) {
+ this.conditionTypeForm.get('code')?.disable();
+ }
+
this.conditionTypeForm.get('isComponentToConditionChecked')?.disable();
this.conditionTypeForm.get('isDescriptionChecked')?.disable();
}
@@ -94,13 +98,17 @@ export class DecisionConditionTypesDialogComponent {
isActive: this.conditionTypeForm.get('isActive')?.value,
isAdministrativeFeeAmountChecked: this.conditionTypeForm.get('isAdministrativeFeeAmountChecked')?.value,
isAdministrativeFeeAmountRequired: this.conditionTypeForm.get('isAdministrativeFeeAmountRequired')?.value,
- administrativeFeeAmount: this.conditionTypeForm.get('administrativeFeeAmount')?.value,
isSingleDateChecked: this.conditionTypeForm.get('isSingleDateChecked')?.value,
isSingleDateRequired: this.conditionTypeForm.get('isSingleDateRequired')?.value,
singleDateLabel: this.conditionTypeForm.get('singleDateLabel')?.value,
isSecurityAmountChecked: this.conditionTypeForm.get('isSecurityAmountChecked')?.value,
isSecurityAmountRequired: this.conditionTypeForm.get('isSecurityAmountRequired')?.value,
};
+
+ if (this.conditionTypeForm.get('administrativeFeeAmount')?.value !== '') {
+ dto.administrativeFeeAmount = this.conditionTypeForm.get('administrativeFeeAmount')?.value;
+ }
+
if (!this.service) return;
if (this.isEdit) {
await this.service.update(dto.code, dto);
diff --git a/services/apps/alcs/src/alcs/admin/application-decision-condition-types/application-decision-condition-types.service.ts b/services/apps/alcs/src/alcs/admin/application-decision-condition-types/application-decision-condition-types.service.ts
index afa7ef079..acd9df33a 100644
--- a/services/apps/alcs/src/alcs/admin/application-decision-condition-types/application-decision-condition-types.service.ts
+++ b/services/apps/alcs/src/alcs/admin/application-decision-condition-types/application-decision-condition-types.service.ts
@@ -55,9 +55,11 @@ export class ApplicationDecisionConditionTypesService {
type.isAdministrativeFeeAmountRequired = updateDto.isAdministrativeFeeAmountChecked
? updateDto.isAdministrativeFeeAmountRequired
: null;
- type.administrativeFeeAmount = updateDto.isAdministrativeFeeAmountChecked
- ? updateDto.administrativeFeeAmount
- : null;
+
+ type.administrativeFeeAmount =
+ updateDto.isAdministrativeFeeAmountChecked && updateDto.administrativeFeeAmount
+ ? updateDto.administrativeFeeAmount
+ : null;
type.isSingleDateChecked = updateDto.isSingleDateChecked;
type.isSingleDateRequired = updateDto.isSingleDateChecked ? updateDto.isSingleDateRequired : null;
@@ -80,9 +82,11 @@ export class ApplicationDecisionConditionTypesService {
type.isAdministrativeFeeAmountRequired = createDto.isAdministrativeFeeAmountChecked
? createDto.isAdministrativeFeeAmountRequired
: null;
- type.administrativeFeeAmount = createDto.isAdministrativeFeeAmountChecked
- ? createDto.administrativeFeeAmount
- : null;
+
+ type.administrativeFeeAmount =
+ createDto.isAdministrativeFeeAmountChecked && createDto.administrativeFeeAmount
+ ? createDto.administrativeFeeAmount
+ : null;
type.isSingleDateChecked = createDto.isSingleDateChecked;
type.isSingleDateRequired = createDto.isSingleDateChecked ? createDto.isSingleDateRequired : null;
diff --git a/services/apps/alcs/src/alcs/admin/notice-of-intent-decision-condition-types/notice-of-intent-decision-condition-types.service.ts b/services/apps/alcs/src/alcs/admin/notice-of-intent-decision-condition-types/notice-of-intent-decision-condition-types.service.ts
index d1ef6bbce..cb7214c76 100644
--- a/services/apps/alcs/src/alcs/admin/notice-of-intent-decision-condition-types/notice-of-intent-decision-condition-types.service.ts
+++ b/services/apps/alcs/src/alcs/admin/notice-of-intent-decision-condition-types/notice-of-intent-decision-condition-types.service.ts
@@ -55,9 +55,11 @@ export class NoticeofIntentDecisionConditionTypesService {
type.isAdministrativeFeeAmountRequired = updateDto.isAdministrativeFeeAmountChecked
? updateDto.isAdministrativeFeeAmountRequired
: null;
- type.administrativeFeeAmount = updateDto.isAdministrativeFeeAmountChecked
- ? updateDto.administrativeFeeAmount
- : null;
+
+ type.administrativeFeeAmount =
+ updateDto.isAdministrativeFeeAmountChecked && updateDto.administrativeFeeAmount
+ ? updateDto.administrativeFeeAmount
+ : null;
type.isSingleDateChecked = updateDto.isSingleDateChecked;
type.isSingleDateRequired = updateDto.isSingleDateChecked ? updateDto.isSingleDateRequired : null;
@@ -80,9 +82,11 @@ export class NoticeofIntentDecisionConditionTypesService {
type.isAdministrativeFeeAmountRequired = createDto.isAdministrativeFeeAmountChecked
? createDto.isAdministrativeFeeAmountRequired
: null;
- type.administrativeFeeAmount = createDto.isAdministrativeFeeAmountChecked
- ? createDto.administrativeFeeAmount
- : null;
+
+ type.administrativeFeeAmount =
+ createDto.isAdministrativeFeeAmountChecked && createDto.administrativeFeeAmount
+ ? createDto.administrativeFeeAmount
+ : null;
type.isSingleDateChecked = createDto.isSingleDateChecked;
type.isSingleDateRequired = createDto.isSingleDateChecked ? createDto.isSingleDateRequired : null;
diff --git a/services/apps/alcs/src/alcs/application-decision/application-decision-condition/application-decision-condition.dto.ts b/services/apps/alcs/src/alcs/application-decision/application-decision-condition/application-decision-condition.dto.ts
index 79e6753ec..cbff9ed26 100644
--- a/services/apps/alcs/src/alcs/application-decision/application-decision-condition/application-decision-condition.dto.ts
+++ b/services/apps/alcs/src/alcs/application-decision/application-decision-condition/application-decision-condition.dto.ts
@@ -30,6 +30,7 @@ export class ApplicationDecisionConditionTypeDto extends BaseCodeDto {
@AutoMap(() => Number)
@IsNumber()
@Type(() => Number)
+ @IsOptional()
administrativeFeeAmount: number | null;
@AutoMap()
diff --git a/services/apps/alcs/src/alcs/notice-of-intent-decision/notice-of-intent-decision-condition/notice-of-intent-decision-condition.dto.ts b/services/apps/alcs/src/alcs/notice-of-intent-decision/notice-of-intent-decision-condition/notice-of-intent-decision-condition.dto.ts
index 269ea5cb0..ed26400a8 100644
--- a/services/apps/alcs/src/alcs/notice-of-intent-decision/notice-of-intent-decision-condition/notice-of-intent-decision-condition.dto.ts
+++ b/services/apps/alcs/src/alcs/notice-of-intent-decision/notice-of-intent-decision-condition/notice-of-intent-decision-condition.dto.ts
@@ -30,6 +30,7 @@ export class NoticeOfIntentDecisionConditionTypeDto extends BaseCodeDto {
@AutoMap(() => Number)
@IsNumber()
@Type(() => Number)
+ @IsOptional()
administrativeFeeAmount: number | null;
@AutoMap()