Backdated delinquency pause with end date in the past validation
This commit is contained in:
committed by
Adam Saghy
parent
3e589894ce
commit
780c469ee4
+3
-3
@@ -221,13 +221,13 @@
|
||||
<input type="number" matInput formControlName="fixedEmiAmount">
|
||||
</mat-form-field>
|
||||
|
||||
<ng-container *ngIf="loansAccountTermsData?.canUseForTopup">
|
||||
<ng-container *ngIf="loansAccountTermsData?.isTopup">
|
||||
|
||||
<mat-checkbox fxFlex="48%" formControlName="isTopup">
|
||||
<mat-checkbox fxFlex="20%" formControlName="isTopup">
|
||||
<p>{{"labels.inputs.Is Topup Loan" | translate}}?</p>
|
||||
</mat-checkbox>
|
||||
|
||||
<mat-form-field fxFlex="48%" *ngIf="loansAccountTermsForm.controls.isTopup.value">
|
||||
<mat-form-field fxFlex="24%" *ngIf="loansAccountTermsForm.controls.isTopup.value">
|
||||
<mat-label>{{"labels.inputs.Loan closed with Topup" | translate}}</mat-label>
|
||||
<mat-select formControlName="loanIdToClose">
|
||||
<mat-option *ngFor="let clientActiveLoan of clientActiveLoanData" [value]="clientActiveLoan.id">
|
||||
|
||||
+16
-1
@@ -129,7 +129,22 @@ export class LoanDelinquencyTagsTabComponent implements OnInit {
|
||||
|
||||
isCurrentAndPauseAction(item: LoanDelinquencyAction): boolean {
|
||||
if (this.currentLoanDelinquencyAction != null) {
|
||||
return (this.currentLoanDelinquencyAction.id === item.id && item.action === 'PAUSE');
|
||||
if (this.currentLoanDelinquencyAction.id === item.id) {
|
||||
if (item.action === 'PAUSE') {
|
||||
const businessDate: Date = this.settingsService.businessDate;
|
||||
const startDate: Date = this.dateUtils.parseDate(item.startDate);
|
||||
if (businessDate < startDate) {
|
||||
return false;
|
||||
}
|
||||
if (item.endDate) {
|
||||
const endDate: Date = this.dateUtils.parseDate(item.endDate);
|
||||
if (businessDate > endDate) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user