Skip to content

Commit 2fe316a

Browse files
Merge pull request #3529 from alberto-art3ch/WEB-657/working-capital-loan-near-breach-config
WEB-657: Working Capital loan near breach config
2 parents ed7ad25 + 1fa1109 commit 2fe316a

3 files changed

Lines changed: 12 additions & 10 deletions

File tree

src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,14 @@ <h4 class="mat-h4 flex-98">
106106
</mat-option>
107107
}
108108
</mat-select>
109-
@if (loansAccountTermsForm.controls.breachId) {
109+
@if (loansAccountTermsForm.controls.breachId && allowAttributeOverridesBreach) {
110110
<button matSuffix mat-icon-button aria-label="Clear" (click)="clearProperty($event, 'breachId')">
111111
<fa-icon icon="close" size="md"></fa-icon>
112112
</button>
113113
}
114114
</mat-form-field>
115115

116-
@if (loansAccountTermsForm.value.breachId) {
116+
@if (selectedBreach) {
117117
<mat-form-field class="flex-48">
118118
<mat-label>{{ 'labels.inputs.Near Breach' | translate }}</mat-label>
119119
<mat-select formControlName="nearBreachId" class="breach-id-select" panelClass="breach-select-panel">
@@ -128,7 +128,7 @@ <h4 class="mat-h4 flex-98">
128128
</mat-option>
129129
}
130130
</mat-select>
131-
@if (loansAccountTermsForm.controls.nearBreachId) {
131+
@if (loansAccountTermsForm.controls.nearBreachId && allowAttributeOverridesBreach) {
132132
<button matSuffix mat-icon-button aria-label="Clear" (click)="clearProperty($event, 'nearBreachId')">
133133
<fa-icon icon="close" size="md"></fa-icon>
134134
</button>

src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ export class LoansAccountTermsStepComponent extends LoanProductBaseComponent imp
179179
delinquencyStartTypeOptions: StringEnumOptionData[] = [];
180180
breachOptions: Breach[] = [];
181181
nearBreachOptions: NearBreach[] = [];
182+
allowAttributeOverridesBreach: boolean = true;
182183

183184
constructor() {
184185
super();
@@ -372,6 +373,7 @@ export class LoansAccountTermsStepComponent extends LoanProductBaseComponent imp
372373
this.loansAccountTermsForm.controls.discount.disable();
373374
}
374375
if (!this.allowAttributeOverrides.breach || this.allowAttributeOverrides.breach === false) {
376+
this.allowAttributeOverridesBreach = false;
375377
this.loansAccountTermsForm.controls.breachId.disable();
376378
this.loansAccountTermsForm.controls.nearBreachId.disable();
377379
}

src/app/shared/loan/breach-display/breach-display.component.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,22 @@
2828
<div class="breach-display-column">
2929
<div class="flex-fill layout-row">
3030
<span class="flex-30 attribute-name">{{ 'labels.inputs.Breach' | translate }}:</span>
31-
<span class="flex-30">{{ breach.name }}</span>
31+
<span class="flex-60">{{ breach.name }}</span>
3232
</div>
3333
<div class="flex-fill layout-row">
3434
<span class="flex-30 attribute-name">{{ 'labels.inputs.Frequency' | translate }}:</span>
35-
<span class="flex-30"
35+
<span class="flex-60"
3636
>{{ breach.breachFrequency | formatNumber: '' : 0 }}
3737
{{ breach.breachFrequencyType.code | translateKey: 'catalogs' }}</span
3838
>
3939
</div>
4040
<div class="flex-fill layout-row">
4141
<span class="flex-30 attribute-name">{{ 'labels.inputs.Calculation Type' | translate }}:</span>
42-
<span class="flex-30">{{ camalize(breach.breachAmountCalculationType.code) | translateKey: 'catalogs' }}</span>
42+
<span class="flex-60">{{ camalize(breach.breachAmountCalculationType.code) | translateKey: 'catalogs' }}</span>
4343
</div>
4444
<div class="flex-fill layout-row">
4545
<span class="flex-30 attribute-name">{{ 'labels.inputs.Amount' | translate }}:</span>
46-
<span class="flex-30">{{ breach.breachAmount | formatNumber }}</span>
46+
<span class="flex-60">{{ breach.breachAmount | formatNumber }}</span>
4747
</div>
4848
</div>
4949
}
@@ -66,18 +66,18 @@
6666
<div class="breach-display-column">
6767
<div class="flex-fill layout-row">
6868
<span class="flex-30 attribute-name">{{ 'labels.inputs.Near Breach' | translate }}:</span>
69-
<span class="flex-30">{{ nearBreach.name }}</span>
69+
<span class="flex-60">{{ nearBreach.name }}</span>
7070
</div>
7171
<div class="flex-fill layout-row">
7272
<span class="flex-30 attribute-name">{{ 'labels.inputs.Frequency' | translate }}:</span>
73-
<span class="flex-30"
73+
<span class="flex-60"
7474
>{{ nearBreach.frequency | formatNumber: '' : 0 }}
7575
{{ nearBreach.frequencyType.code | translateKey: 'catalogs' }}</span
7676
>
7777
</div>
7878
<div class="flex-fill layout-row">
7979
<span class="flex-30 attribute-name">{{ 'labels.inputs.Threshold' | translate }}:</span>
80-
<span class="flex-30">{{ nearBreach.threshold | formatNumber }} %</span>
80+
<span class="flex-60">{{ nearBreach.threshold | formatNumber }} %</span>
8181
</div>
8282
</div>
8383
}

0 commit comments

Comments
 (0)