Skip to content

Commit

Permalink
ALCS-2451 Allow to remove check box if the value is zero
Browse files Browse the repository at this point in the history
  • Loading branch information
fbarreta committed Jan 6, 2025
1 parent 9b8d901 commit 577e8e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,12 @@ export class DecisionConditionTypesDialogComponent {
hasAdminFee(
conditions: Partial<ApplicationDecisionConditionDto>[] | Partial<NoticeOfIntentDecisionConditionDto>[],
): boolean {
return conditions.map((c) => c.administrativeFee).filter((f) => f !== null).length > 0;
return conditions.map((c) => c.administrativeFee).filter((f) => f !== null && f !== undefined && f > 0).length > 0;
}

hasSecurityAmount(
conditions: Partial<ApplicationDecisionConditionDto>[] | Partial<NoticeOfIntentDecisionConditionDto>[],
): boolean {
return conditions.map((c) => c.securityAmount).filter((f) => f !== null).length > 0;
return conditions.map((c) => c.securityAmount).filter((f) => f !== null && f !== undefined && f > 0).length > 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class DecisionConditionTypesComponent implements OnInit {
conditionService: this.conditionService,
content: dto,
existingCodes: this.decisionConditionTypeCodeDtos,
existingDescriptions: this.decisionConditionTypeDescriptionDtos,
existingDescriptions: this.decisionConditionTypeDescriptionDtos.filter((d) => d !== dto.description),
},
});
dialog.beforeClosed().subscribe(async (result) => {
Expand Down

0 comments on commit 577e8e4

Please sign in to comment.