diff --git a/src/app/deposits/recurring-deposits/create-recurring-deposits-account/create-recurring-deposits-account.component.ts b/src/app/deposits/recurring-deposits/create-recurring-deposits-account/create-recurring-deposits-account.component.ts index 46d217f0f..9a73f3c25 100644 --- a/src/app/deposits/recurring-deposits/create-recurring-deposits-account/create-recurring-deposits-account.component.ts +++ b/src/app/deposits/recurring-deposits/create-recurring-deposits-account/create-recurring-deposits-account.component.ts @@ -145,22 +145,41 @@ export class CreateRecurringDepositsAccountComponent { const locale = this.settingsService.language.code; const dateFormat = this.settingsService.dateFormat; const monthDayFormat = 'dd MMMM'; - const recurringDepositAccount = { - ...this.recurringDepositAccount, - ...this.recurringDepositsAccountCurrencyStep.currencyStepData, + + const details = this.recurringDepositAccount; + const currencyStep = this.recurringDepositsAccountCurrencyStep; + + const recurringDepositAccount: any = { + ...details, clientId: this.recurringDepositsAccountTemplate.clientId, charges: [], isCalendarInherited: false, - submittedOnDate: this.dateUtils.formatDate(this.recurringDepositAccount.submittedOnDate, dateFormat), - expectedFirstDepositOnDate: this.dateUtils.formatDate( - this.recurringDepositAccount.expectedFirstDepositOnDate, - dateFormat - ), + mandatoryRecommendedDepositAmount: 0, + recurringFrequency: 1, + recurringFrequencyType: 2, + submittedOnDate: this.dateUtils.formatDate(details.submittedOnDate, dateFormat), + expectedFirstDepositOnDate: this.dateUtils.formatDate(details.expectedFirstDepositOnDate, dateFormat), dateFormat, monthDayFormat, - locale + locale, + // Currency step overrides + balanceSwapOption: currencyStep?.balanceSwapOption ?? details.balanceSwapOption ?? false, + msme: currencyStep?.msme ?? details.msme ?? false, + autoDebitFacility: currencyStep?.autoDebitFacility ?? details.autoDebitFacility ?? false }; + // Tenure from interest rate chart step (depositPeriod in days) + const tenureDays = this.rdTenureDays; + if (tenureDays && tenureDays > 0) { + recurringDepositAccount.depositPeriod = tenureDays; + recurringDepositAccount.depositPeriodFrequencyId = 0; // 0 = Days + } + + // Nominee from currency step + if (currencyStep?.nomineeData) { + recurringDepositAccount.nominee = currencyStep.nomineeData; + } + this.recurringDepositsService.createRecurringDepositAccount(recurringDepositAccount).subscribe((response: any) => { this.router.navigate( [ diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.ts index 1bf189d93..62ea2c590 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.ts @@ -494,6 +494,13 @@ export class RecurringDepositsAccountDetailsStepComponent implements OnInit { get recurringDepositAccountDetails() { const value = this.recurringDepositAccountDetailsForm.value; + if (this.selectedAccountType) { + value.accountType = this.selectedAccountType; + } + if (this.selectedCustomerSegment) { + value.customerSegment = this.selectedCustomerSegment; + } + if (this.selectedAccountStatus) { value.accountStatus = this.selectedAccountStatus; } @@ -503,8 +510,8 @@ export class RecurringDepositsAccountDetailsStepComponent 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, @@ -513,8 +520,8 @@ export class RecurringDepositsAccountDetailsStepComponent 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, @@ -535,9 +542,9 @@ export class RecurringDepositsAccountDetailsStepComponent 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; } if (this.selectedLinkedAccount) { diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-preview-step/recurring-deposits-account-preview-step.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-preview-step/recurring-deposits-account-preview-step.component.html index d3699f0a1..38cf810f9 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-preview-step/recurring-deposits-account-preview-step.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-preview-step/recurring-deposits-account-preview-step.component.html @@ -43,6 +43,237 @@ + + @if (recurringDepositAccountData?.accountStatus) { +
| Sr. | +Holder Name | +CIF No. | +Ownership % | +Signing | +Role | +
|---|---|---|---|---|---|
| {{ i + 1 }} | ++ {{ holder.displayName || holder.clientName || '—' }} + @if (holder.isPrimary) { + Primary + } + | +{{ holder.cifNumber || holder.clientCif || '—' }} | +{{ holder.sharePercentage ?? '—' }}% | +{{ holder.isMandatory ? 'Mandatory' : 'Optional' }} | +{{ holder.isPrimary ? 'Primary Account Holder' : 'Co-Holder' }} | +