From f2a5035c8bafdcd80592300a437abdd1402f27d1 Mon Sep 17 00:00:00 2001 From: Nitesh Yadav Date: Wed, 29 Apr 2026 15:10:26 +0530 Subject: [PATCH] feat: current account details step and client general tab updates --- .../general-tab/general-tab.component.html | 138 ++++++++++++++++-- .../general-tab/general-tab.component.ts | 3 + .../current-account-details-step.component.ts | 22 ++- src/app/pipes/accounts-filter.pipe.ts | 4 + src/environments/.env.ts | 5 +- 5 files changed, 147 insertions(+), 25 deletions(-) diff --git a/src/app/clients/clients-view/general-tab/general-tab.component.html b/src/app/clients/clients-view/general-tab/general-tab.component.html index 461b246c8..0da32a41a 100644 --- a/src/app/clients/clients-view/general-tab/general-tab.component.html +++ b/src/app/clients/clients-view/general-tab/general-tab.component.html @@ -7,7 +7,6 @@ -->
-

{{ 'labels.heading.Performance History' | translate }}

@@ -164,7 +163,9 @@
-

{{ 'labels.messages.No Active Saving Accounts Available' | translate }}

+

+ {{ 'labels.messages.No Active Saving Accounts Available' | translate }} +

@@ -211,7 +212,9 @@
-

{{ 'labels.messages.No Closed Saving Accounts Available' | translate }}

+

+ {{ 'labels.messages.No Closed Saving Accounts Available' | translate }} +

@@ -233,6 +236,89 @@ }
+ + @if (currentAccounts?.length > 0) { + + } +
- \ No newline at end of file + diff --git a/src/app/clients/clients-view/general-tab/general-tab.component.ts b/src/app/clients/clients-view/general-tab/general-tab.component.ts index ed9585096..dbbd1538d 100644 --- a/src/app/clients/clients-view/general-tab/general-tab.component.ts +++ b/src/app/clients/clients-view/general-tab/general-tab.component.ts @@ -228,6 +228,8 @@ export class GeneralTabComponent implements OnDestroy { loanAccounts: any[] = []; /** Savings Accounts Data */ savingAccounts: any[] = []; + /** Current Accounts Data */ + currentAccounts: any[] = []; /** Shares Accounts Data */ shareAccounts: any[] = []; /** Upcoming Charges Data */ @@ -273,6 +275,7 @@ export class GeneralTabComponent implements OnDestroy { (data: { clientAccountsData: any; clientChargesData: any; clientSummary: any; clientCollateralData: any }) => { this.clientAccountData = data.clientAccountsData; this.savingAccounts = data.clientAccountsData?.savingsAccounts ?? []; + this.currentAccounts = data.clientAccountsData?.currentAccounts ?? []; this.loanAccounts = data.clientAccountsData?.loanAccounts ?? []; this.shareAccounts = data.clientAccountsData?.shareAccounts ?? []; diff --git a/src/app/current-accounts/current-account-stepper/current-account-details-step/current-account-details-step.component.ts b/src/app/current-accounts/current-account-stepper/current-account-details-step/current-account-details-step.component.ts index cd2f8d1e4..cc44792be 100644 --- a/src/app/current-accounts/current-account-stepper/current-account-details-step/current-account-details-step.component.ts +++ b/src/app/current-accounts/current-account-stepper/current-account-details-step/current-account-details-step.component.ts @@ -472,10 +472,18 @@ export class CurrentAccountDetailsStepComponent implements OnInit { if (this.introducerId) { value.introducerId = this.introducerId; value.introducerName = this.introducerName; - value.introducerCif = this.introducerCif; + value.introducerCifNumber = this.introducerCif; } value.isNonIndividualClient = this.isNonIndividualClient; + // Product classification fields + if (this.selectedAccountType) { + value.accountType = this.selectedAccountType; + } + if (this.selectedCustomerSegment) { + value.customerSegment = this.selectedCustomerSegment; + } + // accountStatus applies to all client types value.accountStatus = this.selectedAccountStatus || null; if (this.selectedAccountStatus === 'INDIVIDUAL_MALE' && this.selectedSpecialCategory) @@ -487,8 +495,8 @@ export class CurrentAccountDetailsStepComponent implements OnInit { value.jointHolders = [ { clientId: this.primaryClientId, - clientName: this.primaryClientName, - clientCif: this.primaryClientCif, + displayName: this.primaryClientName, + cifNumber: this.primaryClientCif, sharePercentage: this.primaryHolderShare, isMandatory: true, isPrimary: true, @@ -497,8 +505,8 @@ export class CurrentAccountDetailsStepComponent implements OnInit { }, ...this.jointHolders.map((h) => ({ clientId: h.clientId, - clientName: h.clientName, - clientCif: h.clientCif, + displayName: h.clientName, + cifNumber: h.clientCif, sharePercentage: h.sharePercentage, isMandatory: h.isMandatory, isPrimary: false, @@ -510,9 +518,9 @@ export class CurrentAccountDetailsStepComponent implements OnInit { if (this.selectedAccountStatus === 'MINOR') { value.guardianClientId = this.guardianClientId; value.guardianName = this.guardianName; - value.guardianCif = this.guardianCif; + value.guardianCifNumber = this.guardianCif; value.guardianRelationship = this.guardianRelationship; - value.minorDob = this.minorDob ? this.dateUtils.formatDate(this.minorDob, 'yyyy-MM-dd') : null; + value.minorDateOfBirth = this.minorDob ? this.dateUtils.formatDate(this.minorDob, 'yyyy-MM-dd') : null; } // non-individual: partners are a separate dataset diff --git a/src/app/pipes/accounts-filter.pipe.ts b/src/app/pipes/accounts-filter.pipe.ts index a9f3a02b1..3b7363383 100644 --- a/src/app/pipes/accounts-filter.pipe.ts +++ b/src/app/pipes/accounts-filter.pipe.ts @@ -48,6 +48,10 @@ export class AccountsFilterPipe implements PipeTransform { accounts = accounts.filter((account: any) => { return account.depositType.value === 'Savings'; }); + } else if (checkSavings === 'isCurrent') { + accounts = accounts.filter((account: any) => { + return account.depositType.id === 400 || account.depositType.value === 'Current Deposit'; + }); } if (status === 'closed') { accounts = accounts.filter((account: any) => { diff --git a/src/environments/.env.ts b/src/environments/.env.ts index e826c099c..2a3c8fdfb 100644 --- a/src/environments/.env.ts +++ b/src/environments/.env.ts @@ -5,13 +5,12 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! /* tslint:disable */ export default { 'mifos_x': { - 'version': '260428', - 'hash': '31b2490f' + 'version': '260429', + 'hash': '0d3d8379' }, 'allow_switching_backend_instance': true };