update rd,fd,saving and current product update validation end date and and this all account nominee facility code

This commit is contained in:
Nitesh Yadav
2026-05-15 12:53:47 +05:30
parent 8758b9222f
commit 52e216fbe5
62 changed files with 3069 additions and 886 deletions
@@ -99,9 +99,12 @@
<mat-form-field appearance="outline" class="spd-field" (click)="endDatePicker.open()">
<mat-label>End Date</mat-label>
<input matInput [matDatepicker]="endDatePicker" formControlName="endDate" />
<input matInput [matDatepicker]="endDatePicker" formControlName="endDate" [min]="minEndDate" />
<mat-datepicker-toggle matSuffix [for]="endDatePicker"></mat-datepicker-toggle>
<mat-datepicker #endDatePicker></mat-datepicker>
@if (CurrentProductDetailsForm.get('endDate')?.hasError('matDatepickerMin')) {
<mat-error>End Date must be after Effective To date</mat-error>
}
</mat-form-field>
<mat-form-field appearance="outline" class="spd-field">
@@ -92,6 +92,14 @@ export class CurrentProductDetailsStepComponent implements OnInit, OnChanges {
});
}
get minEndDate(): Date | null {
const v = this.CurrentProductDetailsForm.get('effectiveTo')?.value;
if (!v) return null;
const d = new Date(v);
d.setDate(d.getDate() + 1);
return d;
}
private getOptionNames(options: any[]): string[] {
if (!Array.isArray(options)) {
return [];
@@ -106,9 +106,12 @@
<mat-form-field appearance="outline" class="fdpd-field" (click)="endDatePicker.open()">
<mat-label>End Date</mat-label>
<input matInput [matDatepicker]="endDatePicker" formControlName="endDate" />
<input matInput [matDatepicker]="endDatePicker" formControlName="endDate" [min]="minEndDate" />
<mat-datepicker-toggle matSuffix [for]="endDatePicker"></mat-datepicker-toggle>
<mat-datepicker #endDatePicker></mat-datepicker>
@if (fixedDepositProductDetailsForm.get('endDate')?.hasError('matDatepickerMin')) {
<mat-error>End Date must be after Effective To date</mat-error>
}
</mat-form-field>
<div class="fdpd-field fdpd-field--full fdpd-checkbox-row">
@@ -83,6 +83,14 @@ export class FixedDepositProductDetailsStepComponent implements OnInit, OnChange
});
}
get minEndDate(): Date | null {
const v = this.fixedDepositProductDetailsForm.get('effectiveTo')?.value;
if (!v) return null;
const d = new Date(v);
d.setDate(d.getDate() + 1);
return d;
}
private getOptionNames(options: any[]): string[] {
if (!Array.isArray(options)) return [];
return options.map((o) => o?.name ?? o?.value ?? o).filter((v) => typeof v === 'string' && v.trim().length > 0);
@@ -96,9 +96,12 @@
<mat-form-field appearance="outline" class="rdpd-field" (click)="endDatePicker.open()">
<mat-label>End Date</mat-label>
<input matInput [matDatepicker]="endDatePicker" formControlName="endDate" />
<input matInput [matDatepicker]="endDatePicker" formControlName="endDate" [min]="minEndDate" />
<mat-datepicker-toggle matSuffix [for]="endDatePicker"></mat-datepicker-toggle>
<mat-datepicker #endDatePicker></mat-datepicker>
@if (recurringDepositProductDetailsForm.get('endDate')?.hasError('matDatepickerMin')) {
<mat-error>End Date must be after Effective To date</mat-error>
}
</mat-form-field>
<mat-form-field appearance="outline" class="rdpd-field">
@@ -80,6 +80,14 @@ export class RecurringDepositProductDetailsStepComponent implements OnInit, OnCh
});
}
get minEndDate(): Date | null {
const v = this.recurringDepositProductDetailsForm.get('effectiveTo')?.value;
if (!v) return null;
const d = new Date(v);
d.setDate(d.getDate() + 1);
return d;
}
private getOptionNames(options: any[]): string[] {
if (!Array.isArray(options)) {
return [];
@@ -99,9 +99,12 @@
<mat-form-field appearance="outline" class="spd-field" (click)="endDatePicker.open()">
<mat-label>End Date</mat-label>
<input matInput [matDatepicker]="endDatePicker" formControlName="endDate" />
<input matInput [matDatepicker]="endDatePicker" formControlName="endDate" [min]="minEndDate" />
<mat-datepicker-toggle matSuffix [for]="endDatePicker"></mat-datepicker-toggle>
<mat-datepicker #endDatePicker></mat-datepicker>
@if (savingProductDetailsForm.get('endDate')?.hasError('matDatepickerMin')) {
<mat-error>End Date must be after Effective To date</mat-error>
}
</mat-form-field>
<mat-form-field appearance="outline" class="spd-field">
@@ -95,6 +95,14 @@ export class SavingProductDetailsStepComponent implements OnInit, OnChanges {
});
}
get minEndDate(): Date | null {
const v = this.savingProductDetailsForm.get('effectiveTo')?.value;
if (!v) return null;
const d = new Date(v);
d.setDate(d.getDate() + 1);
return d;
}
private getOptionNames(options: any[]): string[] {
if (!Array.isArray(options)) {
return [];