existing account saving and current add or remove nominee and digital & account features and also FE & RD nominee add or remove

This commit is contained in:
keshav898966
2026-07-10 18:45:28 +05:30
parent 96c4a28c0f
commit 1692925d0d
39 changed files with 2733 additions and 93 deletions
@@ -26,29 +26,31 @@
</mat-form-field>
</div>
<div class="sac-alert sac-alert--editable">
<div class="sac-alert__content">
<h4>Balance Swap Option</h4>
<p>Allows balance to be swapped or transferred between linked accounts as per product configuration.</p>
@if (!nominationOnly) {
<div class="sac-alert sac-alert--editable">
<div class="sac-alert__content">
<h4>Balance Swap Option</h4>
<p>Allows balance to be swapped or transferred between linked accounts as per product configuration.</p>
</div>
<mat-slide-toggle [(ngModel)]="balanceSwapOption" color="primary"></mat-slide-toggle>
</div>
<mat-slide-toggle [(ngModel)]="balanceSwapOption" color="primary"></mat-slide-toggle>
</div>
<div class="sac-alert sac-alert--editable">
<div class="sac-alert__content">
<h4>MSME</h4>
<p>Account is categorized under the Micro, Small and Medium Enterprises segment.</p>
<div class="sac-alert sac-alert--editable">
<div class="sac-alert__content">
<h4>MSME</h4>
<p>Account is categorized under the Micro, Small and Medium Enterprises segment.</p>
</div>
<mat-slide-toggle [(ngModel)]="msme" color="primary"></mat-slide-toggle>
</div>
<mat-slide-toggle [(ngModel)]="msme" color="primary"></mat-slide-toggle>
</div>
<div class="sac-alert sac-alert--editable">
<div class="sac-alert__content">
<h4>Auto Debit Facility</h4>
<p>Enable automatic debit instructions for recurring payments linked to this account.</p>
<div class="sac-alert sac-alert--editable">
<div class="sac-alert__content">
<h4>Auto Debit Facility</h4>
<p>Enable automatic debit instructions for recurring payments linked to this account.</p>
</div>
<mat-slide-toggle [(ngModel)]="autoDebitFacility" color="primary"></mat-slide-toggle>
</div>
<mat-slide-toggle [(ngModel)]="autoDebitFacility" color="primary"></mat-slide-toggle>
</div>
}
<div class="sac-alert">
<div class="sac-alert__content">
@@ -30,6 +30,7 @@ export class CurrentAccountCurrencyStepComponent implements OnChanges {
@Input() primaryClientId: number | null = null;
@Input() isNonIndividualClient = false;
@Input() existingAccount: any = null;
@Input() nominationOnly = false;
@ViewChild(NomineeFormComponent) nomineeFormComp: NomineeFormComponent;
nominees: any[] = [];
@@ -104,7 +104,7 @@
<div class="sad-grid sad-grid--classification">
<mat-form-field appearance="outline" class="sad-field">
<mat-label>Account Type</mat-label>
<mat-select [(ngModel)]="selectedAccountType" [ngModelOptions]="{ standalone: true }">
<mat-select [(ngModel)]="selectedAccountType" [ngModelOptions]="{ standalone: true }" [disabled]="readOnly">
@for (opt of accountTypeOptions; track opt) {
<mat-option [value]="opt">{{ opt }}</mat-option>
}
@@ -113,7 +113,11 @@
<mat-form-field appearance="outline" class="sad-field">
<mat-label>Customer Segment</mat-label>
<mat-select [(ngModel)]="selectedCustomerSegment" [ngModelOptions]="{ standalone: true }">
<mat-select
[(ngModel)]="selectedCustomerSegment"
[ngModelOptions]="{ standalone: true }"
[disabled]="readOnly"
>
@for (opt of customerSegmentOptions; track opt) {
<mat-option [value]="opt">{{ opt }}</mat-option>
}
@@ -157,7 +161,7 @@
<mat-form-field appearance="outline" class="sad-field">
<mat-label>Share Linking Enabled</mat-label>
<mat-select [(ngModel)]="shareLinkingEnabled" [ngModelOptions]="{ standalone: true }">
<mat-select [(ngModel)]="shareLinkingEnabled" [ngModelOptions]="{ standalone: true }" [disabled]="readOnly">
<mat-option [value]="true">Yes</mat-option>
<mat-option [value]="false">No</mat-option>
</mat-select>
@@ -172,6 +176,7 @@
introducerId ? { clientId: introducerId, displayName: introducerName, cifNumber: introducerCif } : null
"
(introducerChange)="onIntroducerChange($event)"
[disabled]="readOnly"
></mifosx-introducer-search>
}
}
@@ -263,7 +268,7 @@
color="primary"
type="button"
class="soa-add-btn"
[disabled]="totalJointSharePercentage >= 100"
[disabled]="totalJointSharePercentage >= 100 || readOnly"
(click)="openAddJointHolderDialog()"
>
<mat-icon>person_add</mat-icon> Add Holder
@@ -309,6 +314,7 @@
max="100"
[(ngModel)]="primaryHolderShare"
[ngModelOptions]="{ standalone: true }"
[disabled]="readOnly"
placeholder="0"
(input)="onPrimaryShareInput($event)"
(blur)="onPrimaryShareBlur($event)"
@@ -358,7 +364,8 @@
class="soa-sign-toggle"
[class.soa-sign-toggle--mandatory]="h.isMandatory"
[class.soa-sign-toggle--optional]="!h.isMandatory"
(click)="toggleJointHolderMandatory(h)"
[disabled]="readOnly"
(click)="!readOnly && toggleJointHolderMandatory(h)"
>
<mat-icon>{{ h.isMandatory ? 'lock' : 'lock_open' }}</mat-icon>
{{ h.isMandatory ? 'Mandatory' : 'Optional' }}
@@ -366,7 +373,13 @@
</td>
<td class="soa-td soa-td--center">Co-Holder</td>
<td class="soa-td soa-td--center">
<button mat-icon-button color="warn" type="button" (click)="removeJointHolder(i)">
<button
mat-icon-button
color="warn"
type="button"
[disabled]="readOnly"
(click)="removeJointHolder(i)"
>
<mat-icon>delete_outline</mat-icon>
</button>
</td>
@@ -448,7 +461,8 @@
type="button"
class="soa-mode-card"
[class.soa-mode-card--selected]="modeOfOperation === opt.value"
(click)="modeOfOperation = opt.value"
[disabled]="readOnly"
(click)="!readOnly && (modeOfOperation = opt.value)"
>
<mat-icon class="soa-mode-card__icon">{{ opt.icon }}</mat-icon>
<div class="soa-mode-card__code">{{ opt.label }}</div>
@@ -503,8 +517,9 @@
[max]="maxDate"
[(ngModel)]="minorDob"
[ngModelOptions]="{ standalone: true }"
[disabled]="readOnly"
/>
<mat-datepicker-toggle matSuffix [for]="minorDobPicker"></mat-datepicker-toggle>
<mat-datepicker-toggle matSuffix [for]="minorDobPicker" [disabled]="readOnly"></mat-datepicker-toggle>
<mat-datepicker #minorDobPicker></mat-datepicker>
@if (clientDob) {
<mat-hint>Auto-filled from client profile</mat-hint>
@@ -525,7 +540,11 @@
<mat-form-field appearance="outline" class="soa-field">
<mat-label>Guardian Relationship</mat-label>
<mat-select [(ngModel)]="guardianRelationship" [ngModelOptions]="{ standalone: true }">
<mat-select
[(ngModel)]="guardianRelationship"
[ngModelOptions]="{ standalone: true }"
[disabled]="readOnly"
>
@for (rel of guardianRelationshipOptions; track rel) {
<mat-option [value]="rel">{{ rel }}</mat-option>
}
@@ -541,6 +560,7 @@
<mifosx-introducer-search
[excludedClientIds]="primaryClientId ? [primaryClientId] : []"
(introducerChange)="onGuardianChange($event)"
[disabled]="readOnly"
></mifosx-introducer-search>
@if (guardianName) {
@@ -667,7 +687,8 @@
class="soa-cat-tile"
[class.soa-cat-tile--selected]="selectedSpecialCategory === opt.value"
[class.soa-cat-tile--male]="true"
(click)="selectedSpecialCategory = opt.value"
[disabled]="readOnly"
(click)="!readOnly && (selectedSpecialCategory = opt.value)"
>
<mat-icon class="soa-cat-tile__icon">{{ opt.icon }}</mat-icon>
<span class="soa-cat-tile__label">{{ opt.label }}</span>
@@ -717,7 +738,8 @@
class="soa-cat-tile"
[class.soa-cat-tile--selected]="selectedWeakerSection === opt.value"
[class.soa-cat-tile--female]="true"
(click)="selectedWeakerSection = opt.value"
[disabled]="readOnly"
(click)="!readOnly && (selectedWeakerSection = opt.value)"
>
<mat-icon class="soa-cat-tile__icon">{{ opt.icon }}</mat-icon>
<span class="soa-cat-tile__label">{{ opt.label }}</span>
@@ -775,7 +797,7 @@
color="primary"
type="button"
class="ni-add-btn"
[disabled]="totalSharePercentage >= 100"
[disabled]="totalSharePercentage >= 100 || readOnly"
(click)="openAddRelatedClientDialog()"
>
<mat-icon>person_add</mat-icon> Add Partner
@@ -826,7 +848,8 @@
class="ni-sign-toggle"
[class.ni-sign-toggle--mandatory]="c.isMandatory"
[class.ni-sign-toggle--optional]="!c.isMandatory"
(click)="toggleMandatory(c)"
[disabled]="readOnly"
(click)="!readOnly && toggleMandatory(c)"
[title]="c.isMandatory ? 'Click to set Optional' : 'Click to set Mandatory'"
>
<mat-icon>{{ c.isMandatory ? 'lock' : 'lock_open' }}</mat-icon>
@@ -838,6 +861,7 @@
mat-icon-button
color="warn"
type="button"
[disabled]="readOnly"
(click)="removeRelatedClient(i)"
class="ni-del-btn"
>
@@ -915,7 +939,8 @@
type="button"
class="ni-sig-card"
[class.ni-sig-card--selected]="signatoryRights === opt.value"
(click)="signatoryRights = opt.value"
[disabled]="readOnly"
(click)="!readOnly && (signatoryRights = opt.value)"
>
<mat-icon class="ni-sig-card__icon">{{ opt.icon }}</mat-icon>
<div class="ni-sig-card__code">{{ opt.label }}</div>
@@ -53,6 +53,7 @@ export class CurrentAccountDetailsStepComponent implements OnInit {
@Input() currentAccountTemplate: any;
@Input() hideButtons = false;
@Input() readOnly = false;
minDate = new Date(2000, 0, 1);
maxDate = new Date();
@@ -236,6 +237,9 @@ export class CurrentAccountDetailsStepComponent implements OnInit {
});
}
}
if (this.readOnly) {
this.currentAccountDetailsForm.disable();
}
}
createCurrentAccountDetailsForm() {
@@ -453,6 +457,7 @@ export class CurrentAccountDetailsStepComponent implements OnInit {
}
isTileDisabled(value: string): boolean {
if (this.readOnly) return true;
if (value === 'MINOR') return this.clientAge === null || this.clientAge >= 18;
if (value === 'SENIOR_CITIZEN') return this.clientAge === null || this.clientAge < 60;
return false;
@@ -210,5 +210,29 @@
<span class="dig-toggle__track"><span class="dig-toggle__thumb"></span></span>
</label>
</div>
<div class="dig-card" [class.dig-card--on]="facilityConfig.internetBanking">
<div class="dig-card__icon"><i class="fas fa-globe"></i></div>
<div class="dig-card__body">
<span class="dig-card__label">Internet Banking</span>
<span class="dig-card__status">{{ facilityConfig.internetBanking ? 'Enabled' : 'Disabled' }}</span>
</div>
<label class="dig-toggle">
<input type="checkbox" [(ngModel)]="facilityConfig.internetBanking" />
<span class="dig-toggle__track"><span class="dig-toggle__thumb"></span></span>
</label>
</div>
<div class="dig-card" [class.dig-card--on]="facilityConfig.mobileBanking">
<div class="dig-card__icon"><i class="fas fa-mobile-screen-button"></i></div>
<div class="dig-card__body">
<span class="dig-card__label">Mobile Banking</span>
<span class="dig-card__status">{{ facilityConfig.mobileBanking ? 'Enabled' : 'Disabled' }}</span>
</div>
<label class="dig-toggle">
<input type="checkbox" [(ngModel)]="facilityConfig.mobileBanking" />
<span class="dig-toggle__track"><span class="dig-toggle__thumb"></span></span>
</label>
</div>
</div>
</div>
@@ -26,7 +26,9 @@ const DEFAULT_FACILITY_CONFIG = {
interBankTotalCapFacility: false,
withdrawalFacility: false,
depositFacilityKyc: false,
virtualDebitCard: false
virtualDebitCard: false,
internetBanking: false,
mobileBanking: false
};
@Component({
@@ -78,7 +78,9 @@ export class CurrentAccountPreviewStepComponent implements OnChanges {
{ key: 'interBankTotalCapFacility', label: 'Inter-Bank Total Cap' },
{ key: 'withdrawalFacility', label: 'Withdrawal Facility' },
{ key: 'depositFacilityKyc', label: 'Deposit Facility (KYC)' },
{ key: 'virtualDebitCard', label: 'Virtual Debit Card' }
{ key: 'virtualDebitCard', label: 'Virtual Debit Card' },
{ key: 'internetBanking', label: 'Internet Banking' },
{ key: 'mobileBanking', label: 'Mobile Banking' }
];
private translateService = inject(TranslateService);