diff --git a/src/app/current-accounts/create-current-account/create-current-account.component.html b/src/app/current-accounts/create-current-account/create-current-account.component.html index e6ffe3794..9b5c5211b 100644 --- a/src/app/current-accounts/create-current-account/create-current-account.component.html +++ b/src/app/current-accounts/create-current-account/create-current-account.component.html @@ -34,6 +34,7 @@ + {{ 'labels.inputs.DETAILS' | translate }} @@ -44,14 +45,43 @@ - - {{ 'labels.inputs.TERMS' | translate }} + + + CURRENCY - + > + + + {{ 'labels.inputs.TERMS' | translate }} + + + + + + + SETTINGS + + + + + + + DIGITAL + + + + + {{ 'labels.inputs.CHARGES' | translate }} @@ -61,14 +91,25 @@ [currencyCode]="currentAccountTermsForm.get('currencyCode')" > + + +
+ +
+ @if (currentAccountFormValid) { {{ 'labels.inputs.PREVIEW' | translate }} { 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'; diff --git a/src/app/current-accounts/current-account-stepper/current-account-charges-step/current-account-charges-step.component.ts b/src/app/current-accounts/current-account-stepper/current-account-charges-step/current-account-charges-step.component.ts index 8ac930f21..c9c5a906d 100644 --- a/src/app/current-accounts/current-account-stepper/current-account-charges-step/current-account-charges-step.component.ts +++ b/src/app/current-accounts/current-account-stepper/current-account-charges-step/current-account-charges-step.component.ts @@ -7,7 +7,7 @@ */ /** Angular Imports */ -import { Component, OnInit, OnChanges, Input, inject } from '@angular/core'; +import { Component, OnInit, Input, inject } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { UntypedFormControl } from '@angular/forms'; @@ -69,13 +69,27 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; FormatNumberPipe ] }) -export class CurrentAccountChargesStepComponent implements OnInit, OnChanges { +export class CurrentAccountChargesStepComponent implements OnInit { private dialog = inject(MatDialog); private dateUtils = inject(Dates); private translateService = inject(TranslateService); /** Current Account Product Template */ - @Input() currentAccountProductTemplate: any; + private _currentAccountProductTemplate: any; + @Input() + set currentAccountProductTemplate(value: any) { + this._currentAccountProductTemplate = value; + if (value) { + this.chargeData = value.chargeOptions || []; + // Only pre-populate from product template for new accounts + if (!this.currentAccountTemplate?.id) { + this.chargesDataSource = (value.charges || []).map((charge: any) => ({ ...charge, id: charge.chargeId })); + } + } + } + get currentAccountProductTemplate(): any { + return this._currentAccountProductTemplate; + } /** Current Account Template */ @Input() currentAccountTemplate: any; /** Currency Code */ @@ -88,8 +102,6 @@ export class CurrentAccountChargesStepComponent implements OnInit, OnChanges { chargesDataSource: {}[] = []; /** Component is pristine if there has been no changes by user interaction */ pristine = true; - /** For Edit Current Account Form */ - isChargesPatched = false; /** Display columns for charges table */ displayedColumns: string[] = [ 'name', @@ -114,22 +126,10 @@ export class CurrentAccountChargesStepComponent implements OnInit, OnChanges { ]; ngOnInit() { - if (this.currentAccountTemplate) { - if (!this.isChargesPatched && this.currentAccountTemplate.charges) { - this.chargesDataSource = - this.currentAccountProductTemplate.charges.map((charge: any) => ({ ...charge, id: charge.chargeId })) || []; - this.isChargesPatched = true; - } else { - this.chargesDataSource = []; - } - } - } - - ngOnChanges() { - if (this.currentAccountProductTemplate) { - this.chargeData = this.currentAccountProductTemplate.chargeOptions; + if (this.currentAccountTemplate?.id && this.currentAccountTemplate?.charges) { + // Edit mode: load saved charges from existing account this.chargesDataSource = - this.currentAccountProductTemplate.charges.map((charge: any) => ({ ...charge, id: charge.chargeId })) || []; + this.currentAccountTemplate.charges.map((charge: any) => ({ ...charge, id: charge.chargeId })) || []; } } diff --git a/src/app/current-accounts/current-account-stepper/current-account-currency-step/current-account-currency-step.component.html b/src/app/current-accounts/current-account-stepper/current-account-currency-step/current-account-currency-step.component.html new file mode 100644 index 000000000..e9ba49bac --- /dev/null +++ b/src/app/current-accounts/current-account-stepper/current-account-currency-step/current-account-currency-step.component.html @@ -0,0 +1,79 @@ + + +
+
+ + Currency & Account Status Configuration +
+
+
+ + Currency + + Inherited from selected product + + + + Decimal Places + + Inherited from selected product + +
+ +
+
+

Dormancy Alert

+

Enable automated notifications when an account becomes inactive based on product rules.

+
+ + {{ currentAccountProductTemplate?.dormancyAlert ? 'Yes' : 'No' }} + +
+ +
+
+

Balance Swap Option

+

Allows balance to be swapped or transferred between linked accounts as per product configuration.

+
+ + {{ currentAccountProductTemplate?.balanceSwapOption ? 'Yes' : 'No' }} + +
+ +
+
+

MSME

+

Account is categorized under the Micro, Small and Medium Enterprises segment.

+
+ + {{ currentAccountProductTemplate?.msme ? 'Yes' : 'No' }} + +
+ +
+
+

Nomination Facility

+

Allow account holders to designate individuals to receive funds in the event of account holder's death.

+
+ + {{ currentAccountProductTemplate?.nominationFacility ? 'Yes' : 'No' }} + +
+ +
+
+

Auto Debit Facility

+

Enable automatic debit instructions for recurring payments linked to this account.

+
+ + {{ currentAccountProductTemplate?.autoDebitFacility ? 'Yes' : 'No' }} + +
+
+
diff --git a/src/app/current-accounts/current-account-stepper/current-account-currency-step/current-account-currency-step.component.scss b/src/app/current-accounts/current-account-stepper/current-account-currency-step/current-account-currency-step.component.scss new file mode 100644 index 000000000..17712a898 --- /dev/null +++ b/src/app/current-accounts/current-account-stepper/current-account-currency-step/current-account-currency-step.component.scss @@ -0,0 +1,116 @@ +/** + * Copyright since 2025 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * 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/. + */ + +$accent: #0ea5e9; +$border: #e2e8f0; +$gray-50: #f8f9fa; +$gray-200: #e8eaed; +$gray-900: #202124; + +.sac-section { + border: 1px solid $border; + border-radius: 10px; + overflow: hidden; + background: #fff; + + & + & { + margin-top: 16px; + } + + &__header { + display: flex; + align-items: center; + gap: 10px; + padding: 12px 24px; + background: $gray-50; + border-bottom: 1px solid $gray-200; + + i { + font-size: 14px; + color: $accent; + } + + span { + margin: 0; + font-size: 14px; + font-weight: 600; + color: $gray-900; + } + } +} + +.sac-body { + background: #fff; +} + +.sac-grid { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 4px 16px; + padding: 16px 24px; + + @media (width <= 600px) { + grid-template-columns: 1fr; + } +} + +.sac-field { + width: 100%; +} + +.sac-alert { + display: flex; + align-items: center; + justify-content: space-between; + gap: 24px; + padding: 18px 24px; + border-top: 1px solid $border; + background: #f8fafc; + + @media (width <= 760px) { + flex-direction: column; + align-items: flex-start; + } + + &__content { + h4 { + margin: 0 0 6px; + font-size: 14px; + font-weight: 600; + color: $gray-900; + } + + p { + margin: 0; + font-size: 12px; + line-height: 1.5; + color: #64748b; + max-width: 540px; + } + } +} + +.sac-badge { + display: inline-flex; + align-items: center; + justify-content: center; + min-width: 48px; + padding: 4px 14px; + border-radius: 999px; + font-size: 12px; + font-weight: 700; + background: #fee2e2; + color: #b91c1c; + border: 1px solid #fecaca; + + &--yes { + background: #dcfce7; + color: #15803d; + border-color: #bbf7d0; + } +} diff --git a/src/app/current-accounts/current-account-stepper/current-account-currency-step/current-account-currency-step.component.ts b/src/app/current-accounts/current-account-stepper/current-account-currency-step/current-account-currency-step.component.ts new file mode 100644 index 000000000..805c4336b --- /dev/null +++ b/src/app/current-accounts/current-account-stepper/current-account-currency-step/current-account-currency-step.component.ts @@ -0,0 +1,20 @@ +/** + * Copyright since 2025 Mifos Initiative + * + * This Source Code Form is subject to the terms of the Mozilla Public + * 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/. + */ + +import { Component, Input } from '@angular/core'; +import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; + +@Component({ + selector: 'mifosx-current-account-currency-step', + templateUrl: './current-account-currency-step.component.html', + styleUrls: ['./current-account-currency-step.component.scss'], + imports: [...STANDALONE_SHARED_IMPORTS] +}) +export class CurrentAccountCurrencyStepComponent { + @Input() currentAccountProductTemplate: any; +} diff --git a/src/app/current-accounts/current-account-stepper/current-account-details-step/current-account-details-step.component.html b/src/app/current-accounts/current-account-stepper/current-account-details-step/current-account-details-step.component.html index 52c79fcb1..e5914fe18 100644 --- a/src/app/current-accounts/current-account-stepper/current-account-details-step/current-account-details-step.component.html +++ b/src/app/current-accounts/current-account-stepper/current-account-details-step/current-account-details-step.component.html @@ -7,63 +7,126 @@ -->
-
- - {{ 'labels.inputs.Product Name' | translate }} - - @for (product of productData; track product) { - - {{ product.name }} - - } - - - {{ 'labels.inputs.Product Name' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - @if (currentAccountProductSelected) { - - {{ 'labels.inputs.Submitted On' | translate }} - - - + +
+
+ +

Account Details

+
+
+ + {{ 'labels.inputs.Product Name' | translate }} + + @for (product of productData; track product) { + {{ product.name }} + } + - {{ 'labels.inputs.Submitted On' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.inputs.Product Name' | translate }} {{ 'labels.commons.is' | translate }} {{ 'labels.commons.required' | translate }} - } - @if (currentAccountProductSelected) { - - {{ 'labels.inputs.Field Officer' | translate }} - - @for (officer of fieldOfficerData; track officer) { - - {{ officer.displayName }} - - } - - - } + @if (currentAccountProductSelected) { + + {{ 'labels.inputs.Submitted On' | translate }} + + + + + {{ 'labels.inputs.Submitted On' | translate }} {{ 'labels.commons.is' | translate }} + {{ 'labels.commons.required' | translate }} + + + } - @if (currentAccountProductSelected) { - - {{ 'labels.inputs.External ID' | translate }} - - - } + @if (currentAccountProductSelected) { + + {{ 'labels.inputs.Field Officer' | translate }} + + @for (officer of fieldOfficerData; track officer) { + {{ officer.displayName }} + } + + + } + + @if (currentAccountProductSelected) { + + {{ 'labels.inputs.External ID' | translate }} + + + } +
+ + @if (currentAccountProductSelected && productTemplate) { +
+
+ +

Product Classification

+ From Product +
+
+ + Account Type + + + + + Customer Segment + + + + + Product Code + + + + @if (productTemplate.effectiveDate) { + + Effective Date + + + } + + @if (productTemplate.effectiveTo) { + + Effective To + + + } + + @if (productTemplate.endDate) { + + End Date + + + } + + + Introducer Required + + + +
+ Share Linking Enabled + + {{ productTemplate.shareLinkingEnabled ? 'Yes' : 'No' }} + +
+
+
+ } +
- diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.scss b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.scss index d59bc82ee..45ea9fcab 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.scss +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.scss @@ -6,6 +6,180 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -.margin-t { - margin-top: 1em; +$accent: #0ea5e9; +$border: #e2e8f0; +$gray-50: #f8f9fa; +$gray-200: #e8eaed; +$gray-900: #202124; + +// ── Section card ─────────────────────────────────────────────── +.rad-section { + border: 1px solid $border; + border-radius: 10px; + overflow: hidden; + background: #fff; + + &--mt { + margin-top: 16px; + } + + &__header { + display: flex; + align-items: center; + gap: 10px; + padding: 12px 24px; + background: $gray-50; + border-bottom: 1px solid $gray-200; + + i { + font-size: 14px; + color: $accent; + } + + h3 { + margin: 0; + font-size: 14px; + font-weight: 600; + color: $gray-900; + flex: 1; + } + } +} + +// ── 2-col grid (Account Details inputs) ─────────────────────── +.rad-grid { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 4px 16px; + padding: 16px 24px; + + @media (width <= 600px) { + grid-template-columns: 1fr; + } +} + +// ── 3-col grid (Product Classification) ─────────────────────── +.rad-grid--classification { + grid-template-columns: repeat(3, 1fr); + + @media (width <= 900px) { + grid-template-columns: repeat(2, 1fr); + } + + @media (width <= 600px) { + grid-template-columns: 1fr; + } +} + +.rad-field { + width: 100%; +} + +// ── Share Linking badge row ──────────────────────────────────── +.rad-info-row { + display: flex; + align-items: center; + gap: 12px; + min-height: 56px; +} + +.rad-info-label { + font-size: 14px; + color: $gray-900; + font-weight: 500; +} + +.rad-badge { + display: inline-flex; + align-items: center; + justify-content: center; + padding: 3px 12px; + border-radius: 999px; + font-size: 11px; + font-weight: 700; + background: #dbeafe; + color: #1d4ed8; + border: 1px solid #bfdbfe; + + &--yes { + background: #dcfce7; + color: #15803d; + border-color: #bbf7d0; + } +} + +// ── Currency section body ────────────────────────────────────── +.rad-body { + background: #fff; +} + +// ── Yes / No alert rows (same as rdpc-alert) ────────────────── +.rad-alert { + display: flex; + align-items: center; + justify-content: space-between; + gap: 24px; + padding: 18px 24px 24px; + border-top: 1px solid $border; + background: #f8fafc; + + @media (width <= 760px) { + flex-direction: column; + align-items: flex-start; + } + + &__content { + h4 { + margin: 0 0 6px; + font-size: 14px; + font-weight: 600; + color: $gray-900; + } + + p { + margin: 0; + font-size: 12px; + line-height: 1.5; + color: #64748b; + max-width: 540px; + } + } + + &__choices { + display: flex; + align-items: center; + gap: 18px; + flex-wrap: wrap; + } +} + +// ── yes / no indicator pills ─────────────────────────────────── +.rad-yn { + display: inline-flex; + align-items: center; + gap: 6px; + font-size: 14px; + color: #94a3b8; + cursor: default; + + &::before { + content: ''; + display: inline-block; + width: 18px; + height: 18px; + border-radius: 50%; + border: 2px solid #cbd5e1; + background: #fff; + flex-shrink: 0; + } + + &--active { + color: $gray-900; + font-weight: 500; + + &::before { + border-color: #22c55e; + background: radial-gradient(circle, #22c55e 45%, #fff 46%); + } + } } 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 5deb072dc..a399f42da 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 @@ -7,9 +7,10 @@ */ /** Angular Imports */ -import { Component, OnInit, Input, Output, EventEmitter, inject } from '@angular/core'; -import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms'; +import { Component, OnInit, Input, Output, EventEmitter, inject, ChangeDetectorRef } from '@angular/core'; +import { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms'; import { SettingsService } from 'app/settings/settings.service'; +import { Dates } from 'app/core/utils/dates'; /** Custom Services */ import { RecurringDepositsService } from '../../recurring-deposits.service'; @@ -37,6 +38,8 @@ export class RecurringDepositsAccountDetailsStepComponent implements OnInit { private formBuilder = inject(UntypedFormBuilder); private recurringDepositsService = inject(RecurringDepositsService); private settingsService = inject(SettingsService); + private dateUtils = inject(Dates); + private cdr = inject(ChangeDetectorRef); /** Recurring Deposits Account Template */ @Input() recurringDepositsAccountTemplate: any; @@ -52,19 +55,16 @@ export class RecurringDepositsAccountDetailsStepComponent implements OnInit { /** For edit recurring deposits form */ isFieldOfficerPatched = false; /** Recurring Deposits Account Details Form */ - recurringDepositAccountDetailsForm: UntypedFormGroup; + recurringDepositAccountDetailsForm!: UntypedFormGroup; isProductSelected = false; /** Recurring Deposits Account Template with product data */ @Output() recurringDepositsAccountProductTemplate = new EventEmitter(); - /** - * Sets recurring deposits account details form. - * @param {FormBuilder} formBuilder Form Builder. - * @param {RecurringDepositsService} recurringDepositsService Recurring Deposits Service. - * @param {SettingsService} settingsService Settings Service - */ + /** Local copy of product template for displaying classification info */ + productTemplate: any = null; + constructor() { this.createRecurringDepositsAccountDetailsForm(); } @@ -75,6 +75,7 @@ export class RecurringDepositsAccountDetailsStepComponent implements OnInit { if (this.recurringDepositsAccountTemplate) { this.productData = this.recurringDepositsAccountTemplate.productOptions; if (this.recurringDepositsAccountTemplate.depositProductId) { + // Edit mode: patch from saved data this.recurringDepositAccountDetailsForm.patchValue({ productId: this.recurringDepositsAccountTemplate.depositProductId, submittedOnDate: @@ -82,6 +83,11 @@ export class RecurringDepositsAccountDetailsStepComponent implements OnInit { new Date(this.recurringDepositsAccountTemplate.timeline.submittedOnDate), externalId: this.recurringDepositsAccountTemplate.externalId }); + } else { + // New account: default submittedOnDate to today's business date + this.recurringDepositAccountDetailsForm.patchValue({ + submittedOnDate: this.settingsService.businessDate + }); } } } @@ -109,25 +115,72 @@ export class RecurringDepositsAccountDetailsStepComponent implements OnInit { */ buildDependencies() { const clientId = this.recurringDepositsAccountTemplate.clientId; - this.recurringDepositAccountDetailsForm.get('productId').valueChanges.subscribe((productId: string) => { + this.recurringDepositAccountDetailsForm.get('productId')!.valueChanges.subscribe((productId: string) => { this.recurringDepositsService .getRecurringDepositsAccountTemplate(clientId, productId) .subscribe((response: any) => { + // Ensure currency is included in the product template + if (!response.currency) { + // Try to get currency from the selected product + const selectedProduct = this.recurringDepositsAccountTemplate.productOptions?.find( + (product: any) => product.id == productId + ); + if (selectedProduct?.currency) { + response.currency = selectedProduct.currency; + } else if (this.recurringDepositsAccountTemplate.currency) { + response.currency = this.recurringDepositsAccountTemplate.currency; + } + } + this.productTemplate = response; this.recurringDepositsAccountProductTemplate.emit(response); this.fieldOfficerData = response.fieldOfficerOptions; this.isProductSelected = true; + this.cdr.detectChanges(); if (!this.isFieldOfficerPatched && this.recurringDepositsAccountTemplate.fieldOfficerId) { this.recurringDepositAccountDetailsForm - .get('fieldOfficerId') + .get('fieldOfficerId')! .patchValue(this.recurringDepositsAccountTemplate.fieldOfficerId); this.isFieldOfficerPatched = true; } else { - this.recurringDepositAccountDetailsForm.get('fieldOfficerId').patchValue(''); + this.recurringDepositAccountDetailsForm.get('fieldOfficerId')!.patchValue(''); } }); }); } + /** + * Returns true if a value is not null, undefined, or empty string. + */ + hasValue(val: any): boolean { + return val !== null && val !== undefined && val !== ''; + } + + /** + * Formats template dates into the current CBS date format. + * Handles backend date arrays like [2026, 4, 20] as well as strings and Date objects. + */ + formatTemplateDate(value: any): string { + if (!value) { + return ''; + } + + let dateValue: Date | null = null; + + if (value instanceof Date) { + dateValue = value; + } else if (Array.isArray(value) && value.length >= 3) { + dateValue = new Date(value[0], value[1] - 1, value[2]); + } else { + dateValue = new Date(value); + } + + if (!dateValue || Number.isNaN(dateValue.getTime())) { + return Array.isArray(value) ? value.join('/') : String(value); + } + + return this.dateUtils.formatDate(dateValue, 'M/d/yyyy') || ''; + } + /** * Returns recurring deposits account details form value. */ diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-interest-rate-chart-step/recurring-deposits-account-interest-rate-chart-step.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-interest-rate-chart-step/recurring-deposits-account-interest-rate-chart-step.component.html index b4d0cf3a0..c38bb2cc0 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-interest-rate-chart-step/recurring-deposits-account-interest-rate-chart-step.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-interest-rate-chart-step/recurring-deposits-account-interest-rate-chart-step.component.html @@ -49,30 +49,30 @@ @if (!_activeRdVersion) { -
+
{{ 'labels.inputs.name' | translate }}: - {{ recurringDepositsAccountProductTemplate.accountChart.name }} + {{ recurringDepositsAccountProductTemplate?.accountChart?.name }}
{{ 'labels.inputs.Valid from Date' | translate }}: - {{ recurringDepositsAccountProductTemplate?.accountChart.fromDate | dateFormat }} + {{ recurringDepositsAccountProductTemplate?.accountChart?.fromDate | dateFormat }}
-
+
{{ 'labels.inputs.End Date' | translate }}: - {{ recurringDepositsAccountProductTemplate?.accountChart.endDate | dateFormat }} + {{ recurringDepositsAccountProductTemplate?.accountChart?.endDate | dateFormat }}
-
+
{{ 'labels.inputs.Description' | translate }}: - {{ recurringDepositsAccountProductTemplate?.accountChart.description }} + {{ recurringDepositsAccountProductTemplate?.accountChart?.description }}
{{ 'labels.inputs.Primary Grouping by Amount' | translate }}: {{ - recurringDepositsAccountProductTemplate?.accountChart.isPrimaryGroupingByAmount | yesNo + recurringDepositsAccountProductTemplate?.accountChart?.isPrimaryGroupingByAmount | yesNo }}
} diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-interest-rate-chart-step/recurring-deposits-account-interest-rate-chart-step.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-interest-rate-chart-step/recurring-deposits-account-interest-rate-chart-step.component.ts index d194eeb9a..0836f8502 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-interest-rate-chart-step/recurring-deposits-account-interest-rate-chart-step.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-interest-rate-chart-step/recurring-deposits-account-interest-rate-chart-step.component.ts @@ -120,7 +120,7 @@ export class RecurringDepositsAccountInterestRateChartStepComponent implements O ngOnChanges() { if (this.recurringDepositsAccountProductTemplate) { - this.interestRateChartData = this.recurringDepositsAccountProductTemplate.accountChart.chartSlabs; + this.interestRateChartData = this.recurringDepositsAccountProductTemplate.accountChart?.chartSlabs ?? []; } } 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 ed080c025..7b64f8833 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 @@ -6,416 +6,846 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. --> -
-

{{ 'labels.heading.Details' | translate }}

- - -
- {{ 'labels.inputs.Product' | translate }} - {{ - recurringDepositAccountData.productId | find: recurringDepositsAccountTemplate.productOptions : 'id' : 'name' - }} -
- -
- {{ 'labels.inputs.Submitted On' | translate }} - {{ recurringDepositAccountData.submittedOnDate | dateFormat }} -
- -
- {{ 'labels.inputs.Field Officer' | translate }} - {{ - recurringDepositAccountData.fieldOfficerId - | find: recurringDepositsAccountProductTemplate.fieldOfficerOptions : 'id' : 'displayName' - }} -
- -

{{ 'labels.heading.Currency' | translate }}

- - -
- {{ 'labels.inputs.Currency' | translate }} - {{ recurringDepositsAccountProductTemplate.currency.code }} -
- -
- {{ 'labels.inputs.Decimal Places' | translate }} - {{ recurringDepositsAccountProductTemplate.currency.decimalPlaces }} -
- -
- {{ 'labels.inputs.Currency In Multiples Of' | translate }} - {{ recurringDepositsAccountProductTemplate.currency.inMultiplesOf }} -
- -

{{ 'labels.heading.Terms' | translate }}

- -
- {{ 'labels.inputs.Interest Compounding Period' | translate }}: - {{ - recurringDepositAccountData.interestCompoundingPeriodType - | find: recurringDepositsAccountProductTemplate.interestCompoundingPeriodTypeOptions : 'id' : 'value' - | translateKey: 'catalogs' - }} -
- -
- {{ 'labels.inputs.Interest Posting Period' | translate }}: - {{ - recurringDepositAccountData.interestPostingPeriodType - | find: recurringDepositsAccountProductTemplate.interestPostingPeriodTypeOptions : 'id' : 'value' - | translateKey: 'catalogs' - }} -
- -
- {{ 'labels.inputs.Interest Calculated using' | translate }}: - {{ - recurringDepositAccountData.interestCalculationType - | find: recurringDepositsAccountProductTemplate.interestCalculationTypeOptions : 'id' : 'value' - | translateKey: 'catalogs' - }} -
- -
- {{ 'labels.inputs.Days in Year' | translate }}: - {{ - recurringDepositAccountData.interestCalculationDaysInYearType - | find: recurringDepositsAccountProductTemplate.interestCalculationDaysInYearTypeOptions : 'id' : 'value' - | translateKey: 'catalogs' - }} -
- -

{{ 'labels.heading.Settings' | translate }}

- - -
- {{ 'labels.inputs.Lock-in Period' | translate }}: - {{ recurringDepositAccountData.lockinPeriodFrequency }} - {{ - recurringDepositAccountData.lockinPeriodFrequencyType - | find: recurringDepositsAccountProductTemplate.lockinPeriodFrequencyTypeOptions : 'id' : 'value' - | translateKey: 'catalogs' - }} -
- -
- {{ 'labels.inputs.Recurring Deposit Amount' | translate }}: - {{ recurringDepositAccountData.mandatoryRecommendedDepositAmount | formatNumber }} -
- -
- {{ 'labels.inputs.Deposit Period' | translate }}: - {{ recurringDepositAccountData.depositPeriod }} - {{ - recurringDepositAccountData.depositPeriodFrequencyId - | find: recurringDepositsAccountProductTemplate.periodFrequencyTypeOptions : 'id' : 'value' - | translateKey: 'catalogs' - }} -
- -
- {{ 'labels.inputs.Deposit Frequency Same as Group/Center meeting' | translate }}: - {{ recurringDepositsAccountProductTemplate.isCalendarInherited | yesNo }} -
- - -
- {{ 'labels.inputs.Deposit Start Date' | translate }}: - {{ recurringDepositAccountData.expectedFirstDepositOnDate | dateFormat }} +
+ +
+
+ {{ 'labels.heading.Details' | translate }}
- -
- {{ 'labels.inputs.Deposit Frequency' | translate }}: - {{ recurringDepositAccountData.recurringFrequency }} - {{ - recurringDepositAccountData.recurringFrequencyType - | find: recurringDepositsAccountProductTemplate.periodFrequencyTypeOptions : 'id' : 'value' - | translateKey: 'catalogs' - }} -
- - -
- {{ 'labels.inputs.Minimum Deposit Term' | translate }}: - {{ - recurringDepositsAccountProductTemplate.minDepositTerm - ? recurringDepositsAccountProductTemplate.minDepositTerm - : '' - }} - {{ - (this.recurringDepositsAccountProductTemplate.minDepositTermType - ? this.recurringDepositsAccountProductTemplate.minDepositTermType.value - : '' - ) | translateKey: 'catalogs' - }} -
- -
- {{ 'labels.inputs.In Multiples Of' | translate }}: - {{ - recurringDepositsAccountProductTemplate.inMultiplesOfDepositTerm - ? recurringDepositsAccountProductTemplate.inMultiplesOfDepositTerm - : '' - }} - {{ - (this.recurringDepositsAccountProductTemplate.inMultiplesOfDepositTermType - ? this.recurringDepositsAccountProductTemplate.inMultiplesOfDepositTermType.value - : '' - ) | translateKey: 'catalogs' - }} -
- -
- {{ 'labels.inputs.Maximum Deposit Term' | translate }} - {{ - recurringDepositsAccountProductTemplate.maxDepositTerm - ? recurringDepositsAccountProductTemplate.maxDepositTerm - : '' - }} - {{ - (this.recurringDepositsAccountProductTemplate.maxDepositTermType - ? this.recurringDepositsAccountProductTemplate.maxDepositTermType.value - : '' - ) | translateKey: 'catalogs' - }} -
- -

{{ 'labels.inputs.Interest Rate Chart' | translate }}

- - -
- {{ 'labels.inputs.name' | translate }}: - {{ recurringDepositsAccountProductTemplate?.accountChart.name }} -
- -
- {{ 'labels.inputs.Valid from Date' | translate }}: - {{ recurringDepositsAccountProductTemplate?.accountChart.fromDate | dateFormat }} -
- -
- {{ 'labels.inputs.End Date' | translate }}: - {{ recurringDepositsAccountProductTemplate?.accountChart.endDate | dateFormat }} -
- -
- {{ 'labels.inputs.Description' | translate }}: - {{ recurringDepositsAccountProductTemplate?.accountChart.description }} -
- -
- {{ 'labels.inputs.Primary Grouping by Amount' | translate }}: - {{ - recurringDepositsAccountProductTemplate?.accountChart.isPrimaryGroupingByAmount | yesNo - }} -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{ 'labels.inputs.Period' | translate }} - {{ chartSlab.fromPeriod }} - {{ chartSlab.toPeriod }} {{ - chartSlab.periodType.value | translateKey: 'catalogs' - }} - {{ 'labels.inputs.Amount Range' | translate }} - {{ chartSlab.amountRangeFrom | formatNumber }} - {{ chartSlab.amountRangeTo | formatNumber }} - {{ 'labels.inputs.Interest' | translate }}{{ chartSlab.annualInterestRate | formatNumber }} %{{ 'labels.inputs.Description' | translate }}{{ chartSlab.description }}{{ 'labels.inputs.Actions' | translate }} - - -
- -

- {{ 'labels.heading.Incentives' | translate }} -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{ 'labels.inputs.Entity Type' | translate }} - {{ incentive.entityType.value }} - {{ 'labels.inputs.Attribute Name' | translate }} - {{ incentive.attributeName.value }} - {{ 'labels.inputs.Condition Type' | translate }} - {{ incentive.conditionType.value | titlecase }} - {{ 'labels.inputs.Attribute Value' | translate }} - {{ incentive.attributeValueDesc }} - {{ 'labels.inputs.Incentive Type' | translate }} - {{ incentive.incentiveType.value }} - {{ 'labels.inputs.Interest' | translate }} - {{ incentive.amount }} -
-
+
+
+
+ {{ 'labels.inputs.Product' | translate }} + {{ + recurringDepositAccountData?.productId + | find: recurringDepositsAccountTemplate?.productOptions : 'id' : 'name' + }}
-
+
+ {{ 'labels.inputs.Submitted On' | translate }} + {{ recurringDepositAccountData?.submittedOnDate | dateFormat }} +
-
-

{{ 'labels.heading.Charges' | translate }}

+
+ {{ 'labels.inputs.Field Officer' | translate }} + {{ + recurringDepositAccountData?.fieldOfficerId + | find: recurringDepositsAccountProductTemplate?.fieldOfficerOptions : 'id' : 'displayName' + }} +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{ 'labels.inputs.name' | translate }} - {{ charge.name + ', ' + charge.currency.displaySymbol }} - {{ 'labels.inputs.Type' | translate }} - {{ charge.chargeCalculationType.value | translateKey: 'catalogs' }} - {{ 'labels.inputs.Amount' | translate }} - {{ charge.amount | formatNumber }} - {{ 'labels.inputs.Date' | translate }} - - {{ (charge.dueDate | dateFormat) || 'Unassigned' }} - - - {{ (charge.feeOnMonthDay | dateFormat) || 'Unassigned' }} - - - {{ 'labels.inputs.N/A' | translate }} - - {{ 'labels.inputs.Repayments Every' | translate }} - {{ charge.feeInterval || 'Not Provided' }} - {{ 'labels.inputs.Collected On' | translate }} - {{ charge.chargeTimeType.value }} -
+ @if (recurringDepositAccountData?.externalId) { +
+ {{ 'labels.inputs.External Id' | translate }} + {{ recurringDepositAccountData?.externalId }} +
+ } +
+
+ + + @if ( + recurringDepositsAccountProductTemplate?.accountType || + recurringDepositsAccountProductTemplate?.customerSegment || + recurringDepositsAccountProductTemplate?.productCode || + recurringDepositsAccountProductTemplate?.effectiveDate || + recurringDepositsAccountProductTemplate?.endDate || + recurringDepositsAccountProductTemplate?.introducerRequired !== undefined || + recurringDepositsAccountProductTemplate?.shareLinkingEnabled !== undefined + ) { +
+
+ Product Classification +
+
+
+ @if (recurringDepositsAccountProductTemplate?.accountType) { +
+ Account Type + {{ recurringDepositsAccountProductTemplate?.accountType }} +
+ } + @if (recurringDepositsAccountProductTemplate?.customerSegment) { +
+ Customer Segment + {{ recurringDepositsAccountProductTemplate?.customerSegment }} +
+ } + @if (recurringDepositsAccountProductTemplate?.productCode) { +
+ Product Code + {{ recurringDepositsAccountProductTemplate?.productCode }} +
+ } + @if (recurringDepositsAccountProductTemplate?.effectiveDate) { +
+ Effective Date + {{ + recurringDepositsAccountProductTemplate?.effectiveDate | dateFormat + }} +
+ } + @if (recurringDepositsAccountProductTemplate?.endDate) { +
+ End Date + {{ recurringDepositsAccountProductTemplate?.endDate | dateFormat }} +
+ } + @if ( + recurringDepositsAccountProductTemplate?.introducerRequired !== undefined && + recurringDepositsAccountProductTemplate?.introducerRequired !== null + ) { +
+ Introducer Required + + {{ recurringDepositsAccountProductTemplate?.introducerRequired | yesNo }} + +
+ } + @if ( + recurringDepositsAccountProductTemplate?.shareLinkingEnabled !== undefined && + recurringDepositsAccountProductTemplate?.shareLinkingEnabled !== null + ) { +
+ Share Linking Enabled + + {{ recurringDepositsAccountProductTemplate?.shareLinkingEnabled | yesNo }} + +
+ } +
+
+
+ } + + +
+
+ {{ 'labels.heading.Currency' | translate }} +
+
+
+
+ {{ 'labels.inputs.Currency' | translate }} + {{ + recurringDepositsAccountProductTemplate?.currency?.code || + recurringDepositsAccountProductTemplate?.currency?.name || + '—' + }} +
+ +
+ {{ 'labels.inputs.Decimal Places' | translate }} + {{ recurringDepositsAccountProductTemplate?.currency?.decimalPlaces }} +
+ +
+ {{ 'labels.inputs.Currency In Multiples Of' | translate }} + {{ recurringDepositsAccountProductTemplate?.currency?.inMultiplesOf }} +
+ + @if (recurringDepositsAccountProductTemplate?.withHoldTax) { +
+ {{ 'labels.inputs.Is Withhold Tax Applicable' | translate }} + + {{ recurringDepositAccountData?.withHoldTax | yesNo }} + +
+ } + + @if (recurringDepositAccountData?.withHoldTax && recurringDepositsAccountProductTemplate?.taxGroup?.name) { +
+ {{ 'labels.inputs.Tax Group' | translate }} + {{ recurringDepositsAccountProductTemplate?.taxGroup?.name }} +
+ } + + @if ( + recurringDepositsAccountProductTemplate?.dormancyAlert !== undefined && + recurringDepositsAccountProductTemplate?.dormancyAlert !== null + ) { +
+ Dormancy Alert + + {{ recurringDepositsAccountProductTemplate?.dormancyAlert | yesNo }} + +
+ } + + @if ( + recurringDepositsAccountProductTemplate?.balanceSwapOption !== undefined && + recurringDepositsAccountProductTemplate?.balanceSwapOption !== null + ) { +
+ Balance Swap Option + + {{ recurringDepositsAccountProductTemplate?.balanceSwapOption | yesNo }} + +
+ } + + @if ( + recurringDepositsAccountProductTemplate?.msme !== undefined && + recurringDepositsAccountProductTemplate?.msme !== null + ) { +
+ MSME + + {{ recurringDepositsAccountProductTemplate?.msme | yesNo }} + +
+ } + + @if ( + recurringDepositsAccountProductTemplate?.nominationFacility !== undefined && + recurringDepositsAccountProductTemplate?.nominationFacility !== null + ) { +
+ Nomination Facility + + {{ recurringDepositsAccountProductTemplate?.nominationFacility | yesNo }} + +
+ } + + @if ( + recurringDepositsAccountProductTemplate?.autoDebitFacility !== undefined && + recurringDepositsAccountProductTemplate?.autoDebitFacility !== null + ) { +
+ Auto Debit Facility + + {{ recurringDepositsAccountProductTemplate?.autoDebitFacility | yesNo }} + +
+ } +
+
+
+ + +
+
+ {{ 'labels.heading.Terms' | translate }} +
+
+
+
+ {{ 'labels.inputs.Nominal Annual Interest' | translate }} + + {{ recurringDepositsAccountProductTemplate?.nominalAnnualInterestRate ?? '—' }} + @if (recurringDepositsAccountProductTemplate?.nominalAnnualInterestRate != null) { + % + } + +
+ + @if (recurringDepositsAccountProductTemplate?.effectiveDate) { +
+ Effective Date + {{ recurringDepositsAccountProductTemplate?.effectiveDate | dateFormat }} +
+ } + +
+ {{ 'labels.inputs.Interest Compounding Period' | translate }} + {{ + recurringDepositAccountData?.interestCompoundingPeriodType + | find: recurringDepositsAccountProductTemplate?.interestCompoundingPeriodTypeOptions : 'id' : 'value' + | translateKey: 'catalogs' + }} +
+ +
+ {{ 'labels.inputs.Interest Posting Period' | translate }} + {{ + recurringDepositAccountData?.interestPostingPeriodType + | find: recurringDepositsAccountProductTemplate?.interestPostingPeriodTypeOptions : 'id' : 'value' + | translateKey: 'catalogs' + }} +
+ + @if (recurringDepositsAccountProductTemplate?.averagePeriod) { +
+ Average Period + {{ recurringDepositsAccountProductTemplate?.averagePeriod }} +
+ } + +
+ {{ 'labels.inputs.Interest Calculated using' | translate }} + {{ + recurringDepositAccountData?.interestCalculationType + | find: recurringDepositsAccountProductTemplate?.interestCalculationTypeOptions : 'id' : 'value' + | translateKey: 'catalogs' + }} +
+ +
+ {{ 'labels.inputs.Days in Year' | translate }} + {{ + recurringDepositAccountData?.interestCalculationDaysInYearType + | find: recurringDepositsAccountProductTemplate?.interestCalculationDaysInYearTypeOptions : 'id' : 'value' + | translateKey: 'catalogs' + }} +
+ + @if ( + recurringDepositsAccountProductTemplate?.autoPost !== undefined && + recurringDepositsAccountProductTemplate?.autoPost !== null + ) { +
+ Auto Interest Post + + {{ recurringDepositsAccountProductTemplate?.autoPost | yesNo }} + +
+ } + + @if ( + recurringDepositsAccountProductTemplate?.frequencyFixDay !== undefined && + recurringDepositsAccountProductTemplate?.frequencyFixDay !== null + ) { +
+ Frequency (Fix Day) + {{ recurringDepositsAccountProductTemplate?.frequencyFixDay }} +
+ } + + @if (recurringDepositsAccountProductTemplate?.lastInterestDate) { +
+ Last Interest Date + {{ + recurringDepositsAccountProductTemplate?.lastInterestDate | dateFormat + }} +
+ } + + @if (recurringDepositsAccountProductTemplate?.interestCalculationTypeName) { +
+ Interest Calculation Type + {{ + recurringDepositsAccountProductTemplate?.interestCalculationTypeName + }} +
+ } +
+
+
+ + +
+
+ {{ 'labels.heading.Settings' | translate }} +
+
+ +
+
Premature Option
+
+
+ Loan Facility + + {{ recurringDepositAccountData?.loanFacility | yesNo }} + +
+
+ Premature Withdrawal Option + + {{ recurringDepositAccountData?.prematureWithdrawalOption | yesNo }} + +
+
+ Tenure Flexibility + + {{ recurringDepositAccountData?.tenureFlexibility | yesNo }} + +
+
+ Lien Marked + + {{ recurringDepositAccountData?.lienMarked | yesNo }} + +
+
+ Withdrawal Fee for Transfers + + {{ recurringDepositAccountData?.withdrawalFeeForTransfers | yesNo }} + +
+
+
+ + + + +
+
{{ 'labels.inputs.Lock-in Period' | translate }}
+
+
+ Enable Lock-in Period + + {{ recurringDepositAccountData?.enableLockinPeriod | yesNo }} + +
+ @if (recurringDepositAccountData?.enableLockinPeriod) { +
+ Lock-in Frequency + + {{ recurringDepositAccountData?.lockinPeriodFrequency }} + {{ + recurringDepositAccountData?.lockinPeriodFrequencyType + | find: recurringDepositsAccountProductTemplate?.lockinPeriodFrequencyTypeOptions : 'id' : 'value' + | translateKey: 'catalogs' + }} + +
+ } +
+
+ + + + +
+
Maturity Instructions
+
+
+ Maturity Instructions + + {{ recurringDepositAccountData?.maturityInstructions | yesNo }} + +
+
+ Credit Maturity Proceeds + + {{ recurringDepositAccountData?.creditMaturityProceeds | yesNo }} + +
+
+ Penalty / Grace Period for Missed Installments + + {{ recurringDepositAccountData?.penaltyGracePeriodMissedInstallments | yesNo }} + +
+
+ Panel Request Applicable + + {{ recurringDepositAccountData?.panelRequestApplicable | yesNo }} + +
+
+ No Penalty for Nominee / Legal Heir Closure + + {{ recurringDepositAccountData?.noPenaltyNomineeHeirClosure | yesNo }} + +
+
+ Deceased Settlement + + {{ recurringDepositAccountData?.deceasedSettlement | yesNo }} + +
+
+ Allow Debit Txn after Due Date + + {{ recurringDepositAccountData?.allowDebitTxnAfterDueDate | yesNo }} + +
+
+
+ + + + +
+
Additional Rules
+
+
+ Account Closed with Zero Balance in Day Closing + + {{ recurringDepositAccountData?.accountClosedZeroBalanceInDayClosing | yesNo }} + +
+ @if (recurringDepositAccountData?.minBalanceForInterestCalculation) { +
+ Min. Balance for Interest Calculation + {{ + recurringDepositAccountData?.minBalanceForInterestCalculation | formatNumber + }} +
+ } + @if (recurringDepositAccountData?.mandatoryRecommendedDepositAmount) { +
+ {{ 'labels.inputs.Recurring Deposit Amount' | translate }} + {{ + recurringDepositAccountData?.mandatoryRecommendedDepositAmount | formatNumber + }} +
+ } +
+
+
+
+ + + @if (_activeRdVersion || recurringDepositsAccountProductTemplate?.accountChart) { +
+
+ {{ 'labels.inputs.Interest Rate Chart' | translate }} +
+
+ @if (_activeRdVersion) { +
+
+ Version + {{ _activeRdVersion.versionLabel }} +
+
+ Active + Yes +
+
+ Effective From + {{ _activeRdVersion.effectiveFromDate }} +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Sr.{{ slab.srNo }}Particular{{ slab.description }}From{{ slab.fromPeriod }}To{{ slab.toPeriod ?? 'Unassigned' }}Period Type{{ slab.periodTypeLabel }}Annual Rate (%){{ slab.annualInterestRate | formatNumber }}
+ } @else { +
+ @if (recurringDepositsAccountProductTemplate?.accountChart?.name) { +
+ {{ 'labels.inputs.name' | translate }} + {{ recurringDepositsAccountProductTemplate?.accountChart?.name }} +
+ } + + @if (recurringDepositsAccountProductTemplate?.accountChart?.fromDate) { +
+ {{ 'labels.inputs.Valid from Date' | translate }} + {{ + recurringDepositsAccountProductTemplate?.accountChart?.fromDate | dateFormat + }} +
+ } + + @if (recurringDepositsAccountProductTemplate?.accountChart?.endDate) { +
+ {{ 'labels.inputs.End Date' | translate }} + {{ + recurringDepositsAccountProductTemplate?.accountChart?.endDate | dateFormat + }} +
+ } + + @if (recurringDepositsAccountProductTemplate?.accountChart?.description) { +
+ {{ 'labels.inputs.Description' | translate }} + {{ + recurringDepositsAccountProductTemplate?.accountChart?.description + }} +
+ } + +
+ {{ 'labels.inputs.Primary Grouping by Amount' | translate }} + {{ + recurringDepositsAccountProductTemplate?.accountChart?.isPrimaryGroupingByAmount | yesNo + }} +
+
+ + @if (interestRateChartData?.length) { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{ 'labels.inputs.Period' | translate }} + {{ chartSlab.fromPeriod }} - {{ chartSlab.toPeriod }} {{ + chartSlab.periodType?.value | translateKey: 'catalogs' + }} + {{ 'labels.inputs.Amount Range' | translate }} + {{ chartSlab.amountRangeFrom | formatNumber }} - {{ chartSlab.amountRangeTo | formatNumber }} + {{ 'labels.inputs.Interest' | translate }}{{ chartSlab.annualInterestRate | formatNumber }} %{{ 'labels.inputs.Description' | translate }}{{ chartSlab.description }}{{ 'labels.inputs.Actions' | translate }} + + +
+ +

{{ 'labels.heading.Incentives' | translate }}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{ 'labels.inputs.Entity Type' | translate }}{{ incentive.entityType?.value }}{{ 'labels.inputs.Attribute Name' | translate }}{{ incentive.attributeName?.value }}{{ 'labels.inputs.Condition Type' | translate }}{{ incentive.conditionType?.value | titlecase }}{{ 'labels.inputs.Attribute Value' | translate }}{{ incentive.attributeValueDesc }}{{ 'labels.inputs.Incentive Type' | translate }}{{ incentive.incentiveType?.value }}{{ 'labels.inputs.Interest' | translate }}{{ incentive.amount }}
+
+
+
+ } + } +
+
+ } + + + @if (recurringDepositAccountData?.charges?.length) { +
+
+ {{ 'labels.heading.Charges' | translate }} +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{ 'labels.inputs.name' | translate }}{{ charge.name + ', ' + charge.currency?.displaySymbol }}{{ 'labels.inputs.Type' | translate }} + {{ charge.chargeCalculationType?.value | translateKey: 'catalogs' }} + {{ 'labels.inputs.Amount' | translate }}{{ charge.amount | formatNumber }}{{ 'labels.inputs.Collected On' | translate }}{{ charge.chargeTimeType?.value }}{{ 'labels.inputs.Date' | translate }} + + {{ (charge.dueDate | dateFormat) || 'Unassigned' }} + + + {{ (charge.feeOnMonthDay | dateFormat) || 'Unassigned' }} + + + {{ 'labels.inputs.N/A' | translate }} + + {{ 'labels.inputs.Repayments Every' | translate }}{{ charge.feeInterval || 'Not Provided' }}
+
+
+ }
diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-preview-step/recurring-deposits-account-preview-step.component.scss b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-preview-step/recurring-deposits-account-preview-step.component.scss index 4c9f978a6..433db21ac 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-preview-step/recurring-deposits-account-preview-step.component.scss +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-preview-step/recurring-deposits-account-preview-step.component.scss @@ -6,35 +6,120 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -table { - width: 100%; +// ── Wrapper ────────────────────────────────────────────────────────────────── +.preview-wrapper { + display: flex; + flex-direction: column; + gap: 1.25rem; + padding: 0.5rem 0; } -.mat-elevation-z1 { - margin: 1em 0 1.5em; +// ── Section card ───────────────────────────────────────────────────────────── +.preview-section { + border: 1px solid #e0e0e0; + border-radius: 8px; + overflow: hidden; + background: #fff; + box-shadow: 0 1px 3px rgb(0 0 0 / 6%); + + &__header { + background: #f5f5f5; + border-bottom: 1px solid #e0e0e0; + padding: 0.6rem 1rem; + } + + &__title { + font-size: 0.95rem; + font-weight: 600; + color: #333; + text-transform: uppercase; + letter-spacing: 0.04em; + } } -h2, -h3, -h4 { - margin: 0; +// ── Body ───────────────────────────────────────────────────────────────────── +.preview-body { + padding: 1rem 1.25rem; +} + +// ── Subsection (inside Settings) ───────────────────────────────────────────── +.preview-subsection { + margin-bottom: 1rem; + + &__title { + font-size: 0.82rem; + font-weight: 600; + text-transform: uppercase; + letter-spacing: 0.05em; + color: #666; + margin-bottom: 0.6rem; + } +} + +.preview-divider { + margin: 0.75rem 0 1rem; +} + +// ── Grid ───────────────────────────────────────────────────────────────────── +.preview-grid { + display: grid; + gap: 0.75rem 1.5rem; + + &--three { + grid-template-columns: repeat(3, 1fr); + + @media (width <= 768px) { + grid-template-columns: repeat(2, 1fr); + } + + @media (width <= 480px) { + grid-template-columns: 1fr; + } + } +} + +// ── Field ───────────────────────────────────────────────────────────────────── +.preview-field { + display: flex; + flex-direction: column; + gap: 0.15rem; +} + +.preview-label { + font-size: 0.72rem; + color: #888; + font-weight: 500; + text-transform: uppercase; + letter-spacing: 0.04em; +} + +.preview-value { + font-size: 0.92rem; + color: #222; font-weight: 500; } -span { - margin: 0.5em 0; +// ── Yes/No badge ───────────────────────────────────────────────────────────── +.preview-badge { + display: inline-block; + padding: 0.1rem 0.55rem; + border-radius: 12px; + font-size: 0.78rem; + font-weight: 600; + background: #ffebee; + color: #c62828; + width: fit-content; + + &--yes { + background: #e8f5e9; + color: #2e7d32; + } } -mat-divider { - margin: 0 0 0.5em; -} - -.margin-t { - margin-top: 1em; -} - -.margin-b { - margin-bottom: 0.25em; +// ── Tables ─────────────────────────────────────────────────────────────────── +.preview-table { + width: 100%; + margin-top: 1rem; } .irc-table { @@ -56,3 +141,78 @@ mat-divider { } } } + +.margin-t { + margin-top: 1em; +} + +// ── Product feature flag rows (same style as details step) ──────────────────── +.preview-feature-list { + margin-top: 1rem; + border-top: 1px solid #e0e0e0; +} + +.preview-feature-row { + display: flex; + align-items: center; + justify-content: space-between; + padding: 0.75rem 0; + border-bottom: 1px solid #f0f0f0; + gap: 1rem; +} + +.preview-feature-info { + display: flex; + flex-direction: column; + gap: 0.15rem; + + strong { + font-size: 0.88rem; + font-weight: 600; + color: #222; + } + + span { + font-size: 0.78rem; + color: #26a69a; + margin: 0; + } +} + +.preview-feature-choices { + display: flex; + gap: 0.5rem; + flex-shrink: 0; +} + +.rad-yn { + display: inline-flex; + align-items: center; + gap: 0.3rem; + padding: 0.2rem 0.75rem; + border-radius: 20px; + border: 2px solid #ccc; + font-size: 0.82rem; + color: #999; + cursor: default; + + &::before { + content: ''; + width: 12px; + height: 12px; + border-radius: 50%; + border: 2px solid #ccc; + display: inline-block; + } + + &--active { + border-color: #4caf50; + color: #2e7d32; + font-weight: 600; + + &::before { + border-color: #4caf50; + background: #4caf50; + } + } +} diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-preview-step/recurring-deposits-account-preview-step.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-preview-step/recurring-deposits-account-preview-step.component.ts index d3d3a1a9f..d3186524f 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-preview-step/recurring-deposits-account-preview-step.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-preview-step/recurring-deposits-account-preview-step.component.ts @@ -73,9 +73,25 @@ export class RecurringDepositsAccountPreviewStepComponent implements OnChanges { @Input() recurringDepositsAccountTemplate: any; @Input() recurringDepositsAccountProductTemplate: any; @Input() recurringDepositAccountData: any; + @Input() set rdInterestRates(rates: any[]) { + this._rdInterestRates = rates || []; + this._activeRdVersion = this._rdInterestRates.find((v: any) => v.isActive) ?? this._rdInterestRates[0] ?? null; + } /** Output the submit action */ @Output() submitEvent = new EventEmitter(); + _rdInterestRates: any[] = []; + _activeRdVersion: any = null; + + readonly rdSlabColumns = [ + 'srNo', + 'description', + 'fromPeriod', + 'toPeriod', + 'periodTypeLabel', + 'annualInterestRate' + ]; + /** Charges Displayed Columns */ chargesDisplayedColumns: string[] = [ 'name', @@ -113,7 +129,7 @@ export class RecurringDepositsAccountPreviewStepComponent implements OnChanges { ngOnChanges() { if (this.recurringDepositsAccountProductTemplate) { - this.interestRateChartData = this.recurringDepositsAccountProductTemplate.accountChart.chartSlabs; + this.interestRateChartData = this.recurringDepositsAccountProductTemplate.accountChart?.chartSlabs ?? []; } } } diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-settings-step/recurring-deposits-account-settings-step.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-settings-step/recurring-deposits-account-settings-step.component.html index 083d8f2bb..696f8780a 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-settings-step/recurring-deposits-account-settings-step.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-settings-step/recurring-deposits-account-settings-step.component.html @@ -7,219 +7,145 @@ --> -
- - {{ 'labels.inputs.Is Mandatory Deposit' | translate }}? - - - - {{ 'labels.inputs.Adjust advance payments toward future installments' | translate }}? - - - - {{ 'labels.inputs.Allow Withdrawals' | translate }}? - - -

{{ 'labels.heading.Lock-in Period' | translate }}

- - - {{ 'labels.inputs.Frequency' | translate }} - - - - - {{ 'labels.inputs.Type' | translate }} - - @for (lockinPeriodFrequencyType of lockinPeriodFrequencyTypeData; track lockinPeriodFrequencyType) { - - {{ lockinPeriodFrequencyType.value | translateKey: 'catalogs' }} - - } - - - -

{{ 'labels.heading.Recurring Deposit Details' | translate }}

- @if (currency) { - - - } - -

{{ 'labels.heading.Deposit Period' | translate }}

- - - {{ 'labels.inputs.Deposit Period' | translate }} - - - - - {{ 'labels.inputs.Type' | translate }} - - @for (periodFrequencyType of periodFrequencyTypeData; track periodFrequencyType) { - - {{ periodFrequencyType.value | translateKey: 'catalogs' }} - - } - - - - - {{ 'labels.inputs.Deposit Frequency Same as Group/Center meeting' | translate }} - - - @if (!recurringDepositAccountSettingsForm.value.isCalendarInherited) { - - {{ 'labels.inputs.Deposit Start Date' | translate }} - - - - -

{{ 'labels.heading.Deposit Frequency' | translate }}

- - {{ 'labels.inputs.Deposit Frequency' | translate }} - - - {{ 'labels.inputs.Deposit Frequency' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - {{ 'labels.inputs.Type' | translate }} - - @for (periodFrequencyType of periodFrequencyTypeData; track periodFrequencyType) { - - {{ periodFrequencyType.value | translateKey: 'catalogs' }} - - } - - - {{ 'labels.inputs.Deposit Frequency Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - } - - - -

{{ 'labels.heading.Minimum Deposit Term' | translate }}

- - - {{ 'labels.inputs.Frequency' | translate }} - - - {{ 'labels.inputs.Minimum Deposit Term Frequency' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - - - {{ 'labels.inputs.Frequency Type' | translate }} - - @for (periodFrequencyType of periodFrequencyTypeData; track periodFrequencyType) { - - {{ periodFrequencyType.value | translateKey: 'catalogs' }} - - } - - - {{ 'labels.inputs.Minimum Deposit Term Frequency Type' | translate }} {{ 'labels.commons.is' | translate }} - {{ 'labels.commons.required' | translate }} - - - -

{{ 'labels.heading.And thereafter, in Multiples of' | translate }}

- - - {{ 'labels.inputs.Frequency' | translate }} - - - - - {{ 'labels.inputs.Type' | translate }} - - @for (periodFrequencyType of periodFrequencyTypeData; track periodFrequencyType) { - - {{ periodFrequencyType.value | translateKey: 'catalogs' }} - - } - - - -

{{ 'labels.heading.Maximum Deposit Term' | translate }}

- - - {{ 'labels.inputs.Frequency' | translate }} - - - - - {{ 'labels.inputs.Type' | translate }} - - @for (periodFrequencyType of periodFrequencyTypeData; track periodFrequencyType) { - - {{ periodFrequencyType.value | translateKey: 'catalogs' }} - - } - - - - - -

{{ 'labels.heading.For Pre-mature closure' | translate }}

- - - {{ 'labels.inputs.Apply Penal Interest (less)' | translate }} - - - - {{ 'labels.inputs.Penal Interest' | translate }} (%) - - - - - {{ 'labels.inputs.Period' | translate }} - - @for (preClosurePenalInterestOnType of preClosurePenalInterestOnTypeData; track preClosurePenalInterestOnType) { - - {{ preClosurePenalInterestOnType.value | translateKey: 'catalogs' }} - - } - - - - - - - {{ 'labels.inputs.Minimum Balance For Interest Calculation' | translate }} - - - - @if (taxGroup) { -

{{ 'labels.heading.Tax Group' | translate }}

- - {{ 'labels.inputs.Is Withhold Tax Applicable' | translate }}? - - @if (recurringDepositAccountSettingsForm.controls.taxGroupId) { - - {{ 'labels.inputs.Tax Group' | translate }} - - - } - } + +
+
+ + Premature option +
+
+
+ Loan Facility + Premature Withdrawal option + Tenure Flexibility + Lien Marked + Apply Withdrawal Fee for Transfers +
+
+ +
+
+ + {{ 'labels.inputs.Lock-in Period' | translate }} +
+
+
+ Enable Lock-in Period + +
+ + @if (recurringDepositAccountSettingsForm.value.enableLockinPeriod) { +
+ + Frequency* + + + + + Type* + + @for (lockinPeriodFrequencyType of lockinPeriodFrequencyTypeData; track lockinPeriodFrequencyType) { + + {{ lockinPeriodFrequencyType.value | translateKey: 'catalogs' }} + + } + + +
+ } +
+
+ + +
+
+ + Maturity Instructions +
+
+
+ Maturity Instructions + +
+
+ Option to credit maturity proceeds directly to the linked account or reinvest in another product (like + FD). + +
+
+ Penalty / Grace Period for Missed Installments + +
+
+ Panel Request Applicable + +
+
+ No penalty for nominee / legal heir closure + +
+
+ Deceased Settlement + +
+
+ Allow Debit Txn after due date + +
+
+
+ + +
+
+ + Additional Rules +
+
+
+
+ + Account Closed with Zero balance in Day Closing + +
+ + + Balance Required for Interest Calculation + + +
+
+
+ + + @if (recurringDepositAccountSettingsForm.contains('withHoldTax')) { +
+
+ + {{ 'labels.inputs.Is Withhold Tax Applicable' | translate }} +
+
+
+ {{ 'labels.inputs.Is Withhold Tax Applicable' | translate }} + +
+ @if ( + recurringDepositAccountSettingsForm.value.withHoldTax && + recurringDepositAccountSettingsForm.contains('taxGroupId') + ) { + + {{ 'labels.inputs.Tax Group' | translate }} + + + } +
+
+ } +