Skip to content

Commit

Permalink
Merge pull request #2050 from bcgov/hotfix/ALCS-2451-check-zero-on-ad…
Browse files Browse the repository at this point in the history
…min-fee-dev-merge

ALCS-2451 Allow to remove check box if the value is zero
  • Loading branch information
fbarreta authored Jan 7, 2025
2 parents 3a53525 + eedaa74 commit 1d91eec
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 1d91eec

Please sign in to comment.