saving , current and RD account code update

This commit is contained in:
Nitesh Yadav
2026-04-22 18:28:14 +05:30
parent e9a9377148
commit fc1c5126fc
44 changed files with 5516 additions and 1552 deletions
@@ -13,7 +13,11 @@ import { Router, ActivatedRoute } from '@angular/router';
/** Custom Components */
import { CurrentAccountDetailsStepComponent } from '../current-account-stepper/current-account-details-step/current-account-details-step.component';
import { CurrentAccountTermsStepComponent } from '../current-account-stepper/current-account-terms-step/current-account-terms-step.component';
import { CurrentAccountTermStepComponent } from '../current-account-stepper/current-account-term-step/current-account-term-step.component';
import { CurrentAccountSettingsStepComponent } from '../current-account-stepper/current-account-settings-step/current-account-settings-step.component';
import { CurrentAccountChargesStepComponent } from '../current-account-stepper/current-account-charges-step/current-account-charges-step.component';
import { CurrentAccountCurrencyStepComponent } from '../current-account-stepper/current-account-currency-step/current-account-currency-step.component';
import { CurrentAccountDigitalStepComponent } from '../current-account-stepper/current-account-digital-step/current-account-digital-step.component';
/** Custom Services */
import { CurrentAccountsService } from '../current-accounts.service';
@@ -39,6 +43,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
MatStep,
MatStepLabel,
CurrentAccountDetailsStepComponent,
CurrentAccountCurrencyStepComponent,
CurrentAccountTermStepComponent,
CurrentAccountSettingsStepComponent,
CurrentAccountDigitalStepComponent,
CurrentAccountTermsStepComponent,
CurrentAccountChargesStepComponent,
CurrentAccountPreviewStepComponent
@@ -59,21 +67,19 @@ export class CreateCurrentAccountComponent {
/** Current Account Details Step */
@ViewChild(CurrentAccountDetailsStepComponent, { static: true })
currentAccountDetailsStep: CurrentAccountDetailsStepComponent;
/** Current Account Terms Step */
/** Current Account Term Step (new) */
@ViewChild(CurrentAccountTermStepComponent, { static: true })
currentAccountTermStep: CurrentAccountTermStepComponent;
/** Current Account Settings Step */
@ViewChild(CurrentAccountSettingsStepComponent, { static: true })
currentAccountSettingsStep: CurrentAccountSettingsStepComponent;
/** Current Account Terms Step (old — kept for currencyCode access) */
@ViewChild(CurrentAccountTermsStepComponent, { static: true })
currentAccountTermsStep: CurrentAccountTermsStepComponent;
/** Current Account Charges Step */
@ViewChild(CurrentAccountChargesStepComponent, { static: true })
currentAccountChargesStep: CurrentAccountChargesStepComponent;
/**
* Fetches current account template from `resolve`
* @param {ActivatedRoute} route Activated Route
* @param {Router} router Router
* @param {Dates} dateUtils Date Utils
* @param {CurrentAccountsService} currentAccountsService Current Accounts Service
* @param {SettingsService} settingsService Settings Service
*/
constructor() {
this.route.data.subscribe((data: { currentAccountTemplate: any }) => {
this.currentAccountTemplate = data.currentAccountTemplate;
@@ -82,7 +88,6 @@ export class CreateCurrentAccountComponent {
/**
* Sets current account product template.
* @param {any} $event API response
*/
setTemplate($event: any) {
this.currentAccountProductTemplate = $event;
@@ -96,7 +101,21 @@ export class CreateCurrentAccountComponent {
}
/**
* Retrieves current account terms form.
* Retrieves new term form (interest rate).
*/
get currentAccountTermForm() {
return this.currentAccountTermStep.currentAccountTermForm;
}
/**
* Retrieves settings form.
*/
get currentAccountSettingsForm() {
return this.currentAccountSettingsStep.currentAccountSettingsForm;
}
/**
* Retrieves old terms form — still used for currencyCode by charges step.
*/
get currentAccountTermsForm() {
return this.currentAccountTermsStep.currentAccountTermsForm;
@@ -106,7 +125,7 @@ export class CreateCurrentAccountComponent {
* Checks validity of overall current account form.
*/
get currentAccountFormValid() {
return this.currentAccountDetailsForm.valid && this.currentAccountTermsForm.valid;
return this.currentAccountDetailsForm.valid && this.currentAccountTermForm.valid;
}
/**
@@ -115,16 +134,16 @@ export class CreateCurrentAccountComponent {
get currentAccount() {
return {
...this.currentAccountDetailsStep.currentAccountDetails,
...this.currentAccountTermsStep.currentAccountTerms,
...this.currentAccountTermStep.currentAccountTerms,
...this.currentAccountSettingsStep.currentAccountSettings,
...this.currentAccountChargesStep.currentAccountCharges
};
}
/**
* Creates a new share account.
* Creates a new current account.
*/
submit() {
// TODO: Update once language and date settings are setup
const locale = this.settingsService.language.code;
const dateFormat = this.settingsService.dateFormat;
const monthDayFormat = 'dd MMMM';