update rd,fd,saving and current product update validation end date and and this all account nominee facility code
This commit is contained in:
@@ -52,6 +52,7 @@
|
||||
|
||||
<mifosx-current-account-currency-step
|
||||
[currentAccountProductTemplate]="currentAccountProductTemplate"
|
||||
[primaryClientId]="currentAccountTemplate?.clientId ?? null"
|
||||
></mifosx-current-account-currency-step>
|
||||
|
||||
<div class="layout-row align-center gap-2percent margin-t responsive-column">
|
||||
|
||||
+13
-2
@@ -119,7 +119,7 @@ export class CreateCurrentAccountComponent {
|
||||
}
|
||||
|
||||
get currentAccountNominee() {
|
||||
return this.currentAccountCurrencyStep?.nomineeData ?? null;
|
||||
return this.currentAccountCurrencyStep?.liveNomineeData ?? null;
|
||||
}
|
||||
|
||||
get currentAccountCurrencyFlags() {
|
||||
@@ -185,7 +185,18 @@ export class CreateCurrentAccountComponent {
|
||||
currentAccount.groupId = this.currentAccountTemplate.groupId;
|
||||
}
|
||||
|
||||
console.log('Current Account Payload:', JSON.stringify(currentAccount, null, 2));
|
||||
const nominee = this.currentAccountNominee;
|
||||
if (nominee) {
|
||||
currentAccount.nominee = {
|
||||
nomineeClientId: nominee.nomineeClientId,
|
||||
nominationType: nominee.nominationType,
|
||||
relationshipId: nominee.relationshipId,
|
||||
percentageShare: nominee.percentageShare,
|
||||
nomineeIsMinor: nominee.nomineeIsMinor,
|
||||
...(nominee.guardianClientId ? { guardianClientId: nominee.guardianClientId } : {}),
|
||||
remarks: nominee.remarks
|
||||
};
|
||||
}
|
||||
|
||||
this.currentAccountsService.createCurrentAccount(currentAccount).subscribe((response: any) => {
|
||||
this.router.navigate(
|
||||
|
||||
+5
-1
@@ -73,7 +73,11 @@
|
||||
</span>
|
||||
</div>
|
||||
@if (currentAccountProductTemplate?.nominationFacility) {
|
||||
<mifosx-nominee-form (nomineeChange)="onNomineeChange($event)"></mifosx-nominee-form>
|
||||
<mifosx-nominee-form
|
||||
[primaryClientId]="primaryClientId"
|
||||
[showActions]="false"
|
||||
(nomineeChange)="onNomineeChange($event)"
|
||||
></mifosx-nominee-form>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+7
-1
@@ -6,7 +6,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
import { Component, Input, OnChanges, SimpleChanges } from '@angular/core';
|
||||
import { Component, Input, OnChanges, SimpleChanges, ViewChild } from '@angular/core';
|
||||
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
import { NomineeFormComponent } from 'app/shared/nominee-form/nominee-form.component';
|
||||
import { DormancyAlertPanelComponent } from 'app/shared/dormancy-alert-panel/dormancy-alert-panel.component';
|
||||
@@ -27,6 +27,8 @@ import { FormsModule } from '@angular/forms';
|
||||
})
|
||||
export class CurrentAccountCurrencyStepComponent implements OnChanges {
|
||||
@Input() currentAccountProductTemplate: any;
|
||||
@Input() primaryClientId: number | null = null;
|
||||
@ViewChild(NomineeFormComponent) nomineeFormComp: NomineeFormComponent;
|
||||
|
||||
nomineeData: any = null;
|
||||
|
||||
@@ -48,6 +50,10 @@ export class CurrentAccountCurrencyStepComponent implements OnChanges {
|
||||
this.nomineeData = event;
|
||||
}
|
||||
|
||||
get liveNomineeData(): any {
|
||||
return this.nomineeFormComp?.currentNomineeData ?? this.nomineeData;
|
||||
}
|
||||
|
||||
/** Called by parent to collect currency step values */
|
||||
get currencyStepData() {
|
||||
return {
|
||||
|
||||
+10
-2
@@ -53,7 +53,11 @@
|
||||
@if (searchResults.length > 0) {
|
||||
<div class="arc-search-results">
|
||||
@for (client of searchResults; track client) {
|
||||
<div class="arc-search-result-item" (click)="selectClient(client)">
|
||||
<div
|
||||
class="arc-search-result-item"
|
||||
[class.arc-search-result-item--disabled]="isExcluded(client)"
|
||||
(click)="selectClient(client)"
|
||||
>
|
||||
<div class="arc-result-avatar">
|
||||
{{ (client.displayName || '?')[0].toUpperCase() }}
|
||||
</div>
|
||||
@@ -73,7 +77,11 @@
|
||||
}
|
||||
</span>
|
||||
</div>
|
||||
<mat-icon class="arc-result-arrow">chevron_right</mat-icon>
|
||||
@if (isExcluded(client)) {
|
||||
<span class="arc-excluded-tag">Already added</span>
|
||||
} @else {
|
||||
<mat-icon class="arc-result-arrow">chevron_right</mat-icon>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
+18
@@ -168,6 +168,24 @@ mifosx-add-related-client-dialog {
|
||||
transform: translateX(2px);
|
||||
}
|
||||
}
|
||||
|
||||
&--disabled {
|
||||
opacity: 0.45;
|
||||
cursor: not-allowed;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
.arc-excluded-tag {
|
||||
font-size: 10px;
|
||||
font-weight: 600;
|
||||
color: #dc2626;
|
||||
background: #fef2f2;
|
||||
border: 1px solid #fecaca;
|
||||
border-radius: 4px;
|
||||
padding: 1px 6px;
|
||||
white-space: nowrap;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.arc-result-avatar {
|
||||
|
||||
+9
-2
@@ -8,7 +8,7 @@
|
||||
|
||||
import { Component, inject, OnDestroy, ViewEncapsulation } from '@angular/core';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { MatDialogRef, MatDialogContent, MatDialogActions } from '@angular/material/dialog';
|
||||
import { MatDialogRef, MatDialogContent, MatDialogActions, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
import { MatProgressSpinner } from '@angular/material/progress-spinner';
|
||||
import { MatIcon } from '@angular/material/icon';
|
||||
import { ClientsService } from 'app/clients/clients.service';
|
||||
@@ -32,6 +32,7 @@ export class AddRelatedClientDialogComponent implements OnDestroy {
|
||||
private fb = inject(UntypedFormBuilder);
|
||||
private clientsService = inject(ClientsService);
|
||||
dialogRef = inject(MatDialogRef<AddRelatedClientDialogComponent>);
|
||||
data: { excludedClientIds?: number[] } = inject(MAT_DIALOG_DATA, { optional: true }) ?? {};
|
||||
|
||||
form: UntypedFormGroup = this.fb.group({
|
||||
searchText: [''],
|
||||
@@ -73,7 +74,7 @@ export class AddRelatedClientDialogComponent implements OnDestroy {
|
||||
}
|
||||
this.isSearching = true;
|
||||
this.searchTimer = setTimeout(() => {
|
||||
this.clientsService.searchByText(value.trim(), 0, 10).subscribe({
|
||||
this.clientsService.searchByText(value.trim(), 0, 10, '', '', true).subscribe({
|
||||
next: (res: any) => {
|
||||
this.searchResults = res?.content || [];
|
||||
this.isSearching = false;
|
||||
@@ -86,7 +87,13 @@ export class AddRelatedClientDialogComponent implements OnDestroy {
|
||||
}, 400);
|
||||
}
|
||||
|
||||
isExcluded(client: any): boolean {
|
||||
const excluded = this.data?.excludedClientIds ?? [];
|
||||
return excluded.includes(client.id);
|
||||
}
|
||||
|
||||
selectClient(client: any): void {
|
||||
if (this.isExcluded(client)) return;
|
||||
this.selectedClient = client;
|
||||
this.form.patchValue({ searchText: client.displayName });
|
||||
this.searchResults = [];
|
||||
|
||||
+8
-2
@@ -165,7 +165,10 @@
|
||||
</div>
|
||||
|
||||
@if (productTemplate?.introducerRequired) {
|
||||
<mifosx-introducer-search (introducerChange)="onIntroducerChange($event)"></mifosx-introducer-search>
|
||||
<mifosx-introducer-search
|
||||
[excludedClientIds]="primaryClientId ? [primaryClientId] : []"
|
||||
(introducerChange)="onIntroducerChange($event)"
|
||||
></mifosx-introducer-search>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -521,7 +524,10 @@
|
||||
<mat-icon>manage_accounts</mat-icon>
|
||||
<span>Search & Link Guardian (existing client)</span>
|
||||
</div>
|
||||
<mifosx-introducer-search (introducerChange)="onGuardianChange($event)"></mifosx-introducer-search>
|
||||
<mifosx-introducer-search
|
||||
[excludedClientIds]="primaryClientId ? [primaryClientId] : []"
|
||||
(introducerChange)="onGuardianChange($event)"
|
||||
></mifosx-introducer-search>
|
||||
|
||||
@if (guardianName) {
|
||||
<div class="soa-guardian-selected">
|
||||
|
||||
+12
-2
@@ -360,10 +360,15 @@ export class CurrentAccountDetailsStepComponent implements OnInit {
|
||||
|
||||
// ── Joint Account (Status of Account) ─────────────────────────────────
|
||||
openAddJointHolderDialog(): void {
|
||||
const excludedClientIds = [
|
||||
...(this.primaryClientId ? [this.primaryClientId] : []),
|
||||
...this.jointHolders.map((h: any) => h.clientId).filter(Boolean)
|
||||
];
|
||||
const ref = this.dialog.open(AddRelatedClientDialogComponent, {
|
||||
width: '500px',
|
||||
panelClass: 'arc-dialog-panel',
|
||||
disableClose: true
|
||||
disableClose: true,
|
||||
data: { excludedClientIds }
|
||||
});
|
||||
ref.afterClosed().subscribe((result) => {
|
||||
if (result) {
|
||||
@@ -434,10 +439,15 @@ export class CurrentAccountDetailsStepComponent implements OnInit {
|
||||
|
||||
// ── Non-Individual (existing) helpers ──────────────────────────────────
|
||||
openAddRelatedClientDialog(): void {
|
||||
const excludedClientIds = [
|
||||
...(this.primaryClientId ? [this.primaryClientId] : []),
|
||||
...this.relatedClients.map((c: any) => c.clientId).filter(Boolean)
|
||||
];
|
||||
const ref = this.dialog.open(AddRelatedClientDialogComponent, {
|
||||
width: '500px',
|
||||
panelClass: 'arc-dialog-panel',
|
||||
disableClose: true
|
||||
disableClose: true,
|
||||
data: { excludedClientIds }
|
||||
});
|
||||
ref.afterClosed().subscribe((result) => {
|
||||
if (result) {
|
||||
|
||||
+28
-36
@@ -570,72 +570,64 @@
|
||||
<div class="preview-section__header">
|
||||
<i class="fas fa-user-shield preview-section__icon"></i>
|
||||
<span class="preview-section__title">Nominee Details</span>
|
||||
<span class="preview-section__badge">
|
||||
{{ currentAccountNominee?.mode === 'linked' ? 'Linked Client' : 'Manual Entry' }}
|
||||
</span>
|
||||
<span class="preview-section__badge">{{ currentAccountNominee?.nominationType || 'DA1' }}</span>
|
||||
</div>
|
||||
<div class="preview-body">
|
||||
<div class="preview-grid preview-grid--three">
|
||||
<div class="preview-field">
|
||||
<span class="preview-label">Name</span>
|
||||
<span class="preview-value">{{
|
||||
currentAccountNominee?.fullName || currentAccountNominee?.displayName || '—'
|
||||
}}</span>
|
||||
<span class="preview-value">{{ currentAccountNominee?.nomineeDisplayName || '—' }}</span>
|
||||
</div>
|
||||
<div class="preview-field">
|
||||
<span class="preview-label">Client ID</span>
|
||||
<span class="preview-value preview-mono">{{ currentAccountNominee?.nomineeClientId || '—' }}</span>
|
||||
</div>
|
||||
@if (currentAccountNominee?.cifNumber) {
|
||||
<div class="preview-field">
|
||||
<span class="preview-label">CIF No</span>
|
||||
<span class="preview-value preview-mono">{{ currentAccountNominee.cifNumber }}</span>
|
||||
</div>
|
||||
}
|
||||
<div class="preview-field">
|
||||
<span class="preview-label">Relationship</span>
|
||||
<span class="preview-value">{{ currentAccountNominee?.relationship || '—' }}</span>
|
||||
<span class="preview-value">{{ currentAccountNominee?.relationshipName || '—' }}</span>
|
||||
</div>
|
||||
<div class="preview-field">
|
||||
<span class="preview-label">Share %</span>
|
||||
<span class="preview-value">{{ currentAccountNominee?.nomineeShare ?? '—' }}%</span>
|
||||
<span class="preview-value">{{ currentAccountNominee?.percentageShare ?? '—' }}%</span>
|
||||
</div>
|
||||
@if (currentAccountNominee?.dateOfBirth) {
|
||||
<div class="preview-field">
|
||||
<span class="preview-label">Minor</span>
|
||||
<span class="preview-value">{{ currentAccountNominee?.nomineeIsMinor ? 'Yes' : 'No' }}</span>
|
||||
</div>
|
||||
@if (currentAccountNominee?.nomineeDateOfBirth) {
|
||||
<div class="preview-field">
|
||||
<span class="preview-label">Date of Birth</span>
|
||||
<span class="preview-value">{{ currentAccountNominee?.dateOfBirth | dateFormat }}</span>
|
||||
<span class="preview-value">{{ currentAccountNominee?.nomineeDateOfBirth | dateFormat }}</span>
|
||||
</div>
|
||||
}
|
||||
@if (currentAccountNominee?.nationality) {
|
||||
<div class="preview-field">
|
||||
<span class="preview-label">Nationality</span>
|
||||
<span class="preview-value">{{ currentAccountNominee?.nationality }}</span>
|
||||
</div>
|
||||
}
|
||||
@if (currentAccountNominee?.mobileNo) {
|
||||
@if (currentAccountNominee?.nomineeMobileNo) {
|
||||
<div class="preview-field">
|
||||
<span class="preview-label">Mobile No</span>
|
||||
<span class="preview-value preview-mono">{{ currentAccountNominee?.mobileNo }}</span>
|
||||
<span class="preview-value preview-mono">{{ currentAccountNominee?.nomineeMobileNo }}</span>
|
||||
</div>
|
||||
}
|
||||
@if (currentAccountNominee?.aadhaarNumber) {
|
||||
@if (currentAccountNominee?.nomineeAadhaar) {
|
||||
<div class="preview-field">
|
||||
<span class="preview-label">Aadhaar No</span>
|
||||
<span class="preview-value preview-mono">{{ currentAccountNominee?.aadhaarNumber }}</span>
|
||||
<span class="preview-label">Aadhaar</span>
|
||||
<span class="preview-value preview-mono">{{ currentAccountNominee?.nomineeAadhaar }}</span>
|
||||
</div>
|
||||
}
|
||||
@if (currentAccountNominee?.panNumber) {
|
||||
@if (currentAccountNominee?.nomineePan) {
|
||||
<div class="preview-field">
|
||||
<span class="preview-label">PAN No</span>
|
||||
<span class="preview-value preview-mono">{{ currentAccountNominee?.panNumber }}</span>
|
||||
<span class="preview-label">PAN</span>
|
||||
<span class="preview-value preview-mono">{{ currentAccountNominee?.nomineePan }}</span>
|
||||
</div>
|
||||
}
|
||||
@if (currentAccountNominee?.guardianName) {
|
||||
@if (currentAccountNominee?.guardianDisplayName) {
|
||||
<div class="preview-field">
|
||||
<span class="preview-label">Guardian Name</span>
|
||||
<span class="preview-value">{{ currentAccountNominee?.guardianName }}</span>
|
||||
<span class="preview-label">Guardian</span>
|
||||
<span class="preview-value">{{ currentAccountNominee?.guardianDisplayName }}</span>
|
||||
</div>
|
||||
}
|
||||
@if (currentAccountNominee?.guardianRelationship) {
|
||||
@if (currentAccountNominee?.guardianClientId) {
|
||||
<div class="preview-field">
|
||||
<span class="preview-label">Guardian Relationship</span>
|
||||
<span class="preview-value">{{ currentAccountNominee?.guardianRelationship }}</span>
|
||||
<span class="preview-label">Guardian Client ID</span>
|
||||
<span class="preview-value preview-mono">{{ currentAccountNominee?.guardianClientId }}</span>
|
||||
</div>
|
||||
}
|
||||
@if (currentAccountNominee?.remarks) {
|
||||
|
||||
@@ -213,6 +213,15 @@
|
||||
</a>
|
||||
}
|
||||
</ng-container>
|
||||
<a
|
||||
mat-tab-link
|
||||
[routerLink]="['./nominees']"
|
||||
routerLinkActive
|
||||
#nominees="routerLinkActive"
|
||||
[active]="nominees.isActive"
|
||||
>
|
||||
Nominees
|
||||
</a>
|
||||
@for (currentAccountDatatable of currentAccountDatatables; track currentAccountDatatable) {
|
||||
<a
|
||||
mat-tab-link
|
||||
|
||||
@@ -46,6 +46,7 @@ import { CurrentAccountDocumentsResolver } from './common-resolvers/current-acco
|
||||
import { CurrentAccountTransactionGeneralTabComponent } from './current-account-view/transactions/view-transaction/current-accounts-transaction-general-tab/current-accounts-transaction-general-tab.component';
|
||||
import { GeneralTabComponent } from './current-account-view/general-tab/general-tab.component';
|
||||
import { PassbookTabComponent } from './current-account-view/passbook-tab/passbook-tab.component';
|
||||
import { AccountNomineesTabComponent } from 'app/shared/account-nominees-tab/account-nominees-tab.component';
|
||||
|
||||
/** Current Account Routes */
|
||||
const routes: Routes = [
|
||||
@@ -135,6 +136,17 @@ const routes: Routes = [
|
||||
currentAccountDocuments: CurrentAccountDocumentsResolver
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'nominees',
|
||||
component: AccountNomineesTabComponent,
|
||||
data: {
|
||||
title: 'Current Account Nominees',
|
||||
breadcrumb: 'Nominees',
|
||||
routeParamBreadcrumb: false,
|
||||
accountDataKey: 'currentAccountData',
|
||||
accountType: 'CB'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'datatables',
|
||||
children: [
|
||||
|
||||
Reference in New Issue
Block a user