-
{{ 'labels.heading.Details' | translate }}
-
-
-
- {{ 'labels.inputs.Product' | translate }}
- {{
- currentAccount.productId | find: currentAccountTemplate.productOptions : 'id' : 'name'
- }}
-
-
-
- {{ 'labels.inputs.Submitted On' | translate }}
- {{ currentAccount.submittedOnDate | dateFormat }}
-
-
-
- {{ 'labels.inputs.External Id' | translate }}
- @if (currentAccount.externalId) {
-
-
-
- }
- @if (!currentAccount.externalId) {
-
- {{ 'labels.inputs.Unassigned' | translate }}
-
- }
-
-
-
- {{ 'labels.inputs.Field Officer' | translate }}
- {{
- currentAccount.fieldOfficerId | find: currentAccountProductTemplate.fieldOfficerOptions : 'id' : 'displayName'
- }}
-
-
- @if (activeClientMembers) {
-
{{ 'labels.heading.Client Members' | translate }}
-
-
-
-
-
- | {{ 'labels.inputs.Client ID' | translate }} |
- {{ element.id }} |
-
-
-
- {{ 'labels.inputs.Client Name' | translate }} |
- {{ element.displayName }} |
-
-
-
-
+
+
+
+
- }
-
-
{{ 'labels.heading.Terms' | translate }}
-
-
-
- {{ 'labels.inputs.Currency' | translate }}
- {{ currentAccountTermsForm.get('currencyCode').value }}
-
-
-
- {{ 'labels.inputs.Decimal Places' | translate }}
- {{ currentAccountTermsForm.get('decimal').value }}
-
-
-
- {{ 'labels.inputs.Nominal Annual Interest' | translate }}:
- {{ currentAccount.nominalAnnualInterestRate | formatNumber }} %
-
-
-
- {{ 'labels.inputs.Interest Compounding Period' | translate }}:
- {{
- getCatalogTranslation(
- currentAccount.interestCompoundingPeriodType
- | find: currentAccountProductTemplate.interestCompoundingPeriodTypeOptions : 'id' : 'value'
- )
- }}
-
-
-
- {{ 'labels.inputs.Interest Posting Period' | translate }}:
- {{
- getCatalogTranslation(
- currentAccount.interestPostingPeriodType
- | find: currentAccountProductTemplate.interestPostingPeriodTypeOptions : 'id' : 'value'
- )
- }}
-
-
-
- {{ 'labels.inputs.Interest Calculated using' | translate }}:
- {{
- getCatalogTranslation(
- currentAccount.interestCalculationType
- | find: currentAccountProductTemplate.interestCalculationTypeOptions : 'id' : 'value'
- )
- }}
-
-
-
- {{ 'labels.inputs.Days in Year' | translate }}:
- {{
- getCatalogTranslation(
- currentAccount.interestCalculationDaysInYearType
- | find: currentAccountProductTemplate.interestCalculationDaysInYearTypeOptions : 'id' : 'value'
- )
- }}
-
-
- @if (currentAccount.minRequiredOpeningBalance) {
-
-
{{ 'labels.inputs.Minimum Opening Balance' | translate }}:
-
{{ currentAccount.minRequiredOpeningBalance | formatNumber }}
+
+
+
+ {{ 'labels.inputs.Product' | translate }}
+ {{
+ currentAccount?.productId | find: currentAccountTemplate?.productOptions : 'id' : 'name'
+ }}
+
+
+ {{ 'labels.inputs.Submitted On' | translate }}
+ {{ currentAccount?.submittedOnDate | dateFormat }}
+
+
+ {{ 'labels.inputs.Field Officer' | translate }}
+ {{
+ currentAccount?.fieldOfficerId
+ | find: currentAccountProductTemplate?.fieldOfficerOptions : 'id' : 'displayName'
+ }}
+
+
+ {{ 'labels.inputs.External Id' | translate }}
+ @if (currentAccount?.externalId) {
+
+
+
+ } @else {
+ {{ 'labels.inputs.Unassigned' | translate }}
+ }
+
+
- }
-
-
- {{ 'labels.inputs.Apply Withdrawal Fee for Transfers' | translate }}:
- {{ currentAccount.withdrawalFeeForTransfers | yesNo }}
- @if (currentAccount.lockinPeriodFrequency) {
-
- {{ 'labels.inputs.Lock-in Period' | translate }}:
- {{
- getCatalogTranslation(
- currentAccount.lockinPeriodFrequency +
- ' ' +
- (currentAccount.lockinPeriodFrequencyType
- | find: currentAccountProductTemplate.lockinPeriodFrequencyTypeOptions : 'id' : 'value')
- )
- }}
-
- }
-
-
- {{ 'labels.inputs.Is Overdraft Allowed' | translate }}:
- {{ currentAccount.allowOverdraft | yesNo }}
-
-
- @if (currentAccount.minOverdraftForInterestCalculation) {
-
- {{ 'labels.inputs.Minimum Overdraft Required for Interest Calculation' | translate }}:
- {{ currentAccount.minOverdraftForInterestCalculation | formatNumber }}
-
- }
-
- @if (currentAccount.nominalAnnualInterestRateOverdraft) {
-
- {{ 'labels.inputs.Nominal Annual Interest for Overdraft' | translate }}:
- {{ currentAccount.nominalAnnualInterestRateOverdraft | formatNumber }} %
-
- }
-
- @if (currentAccount.overdraftLimit) {
-
- {{ 'labels.inputs.Maximum Overdraft Amount Limit' | translate }}:
- {{ currentAccount.overdraftLimit | formatNumber }}
-
- }
-
-
- {{ 'labels.inputs.Enforce Minimum Balance' | translate }}:
- {{ currentAccount.enforceMinRequiredBalance | yesNo }}
-
-
- @if (currentAccount.minRequiredBalance) {
-
- {{ 'labels.inputs.Minimum Balance' | translate }}:
- {{ currentAccount.minRequiredBalance }}
-
- }
-
- @if (currentAccount.charges.length) {
-
-
{{ 'labels.inputs.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.Date' | translate }} |
-
- @if (charge.chargeTimeType.value === 'Specified due date' || charge.chargeTimeType.value === 'Weekly Fee') {
-
- {{ (charge.dueDate | dateFormat) || 'Unassigned' }}
+
+ @if (
+ currentAccountProductTemplate?.accountType ||
+ currentAccountProductTemplate?.customerSegment ||
+ currentAccountProductTemplate?.productCode ||
+ currentAccountProductTemplate?.effectiveDate ||
+ currentAccountProductTemplate?.effectiveTo ||
+ currentAccountProductTemplate?.endDate ||
+ currentAccountProductTemplate?.introducerRequired !== undefined ||
+ currentAccountProductTemplate?.shareLinkingEnabled !== undefined
+ ) {
+
+
+
+
+ @if (currentAccountProductTemplate?.accountType) {
+
+ Account Type
+ {{ currentAccountProductTemplate?.accountType }}
+
+ }
+ @if (currentAccountProductTemplate?.customerSegment) {
+
+ Customer Segment
+ {{ currentAccountProductTemplate?.customerSegment }}
+
+ }
+ @if (currentAccountProductTemplate?.productCode) {
+
+ Product Code
+ {{ currentAccountProductTemplate?.productCode }}
+
+ }
+ @if (currentAccountProductTemplate?.effectiveDate) {
+
+ Effective Date
+ {{ currentAccountProductTemplate?.effectiveDate | dateFormat }}
+
+ }
+ @if (currentAccountProductTemplate?.effectiveTo) {
+
+ Effective To
+ {{ currentAccountProductTemplate?.effectiveTo | dateFormat }}
+
+ }
+ @if (currentAccountProductTemplate?.endDate) {
+
+ End Date
+ {{ currentAccountProductTemplate?.endDate | dateFormat }}
+
+ }
+ @if (
+ currentAccountProductTemplate?.introducerRequired !== undefined &&
+ currentAccountProductTemplate?.introducerRequired !== null
+ ) {
+
+ Introducer Required
+
+ {{ currentAccountProductTemplate?.introducerRequired | yesNo }}
- }
- @if (charge.chargeTimeType.value === 'Monthly Fee' || charge.chargeTimeType.value === 'Annual Fee') {
-
- {{ (charge.feeOnMonthDay | dateFormat) || 'Unassigned' }}
+
+ }
+ @if (
+ currentAccountProductTemplate?.shareLinkingEnabled !== undefined &&
+ currentAccountProductTemplate?.shareLinkingEnabled !== null
+ ) {
+
+ Share Linking Enabled
+
+ {{ currentAccountProductTemplate?.shareLinkingEnabled | yesNo }}
- }
- @if (
- !(
- charge.chargeTimeType.value === 'Monthly Fee' ||
- charge.chargeTimeType.value === 'Annual Fee' ||
- charge.chargeTimeType.value === 'Specified due date' ||
- charge.chargeTimeType.value === 'Weekly Fee'
- )
- ) {
- N/A
- }
- |
-
-
- {{ 'labels.inputs.Repayments Every' | translate }} |
-
- {{ charge.feeInterval || 'Not Provided' }}
- |
-
-
- {{ 'labels.inputs.Collected On' | translate }} |
-
- {{ charge.chargeTimeType.value }}
- |
-
-
-
-
+
+ }
+
+
+
+ }
+
+
+
+
+
+
+
+ {{ 'labels.inputs.Currency' | translate }}
+ {{ currentAccountTermsForm?.get('currencyCode')?.value }}
+
+
+ {{ 'labels.inputs.Decimal Places' | translate }}
+ {{ currentAccountProductTemplate?.currency?.decimalPlaces }}
+
+
+ {{ 'labels.inputs.Currency In Multiples Of' | translate }}
+ {{ currentAccountProductTemplate?.currency?.inMultiplesOf }}
+
+ @if (
+ currentAccountProductTemplate?.dormancyAlert !== undefined &&
+ currentAccountProductTemplate?.dormancyAlert !== null
+ ) {
+
+ Dormancy Alert
+
+ {{ currentAccountProductTemplate?.dormancyAlert | yesNo }}
+
+
+ }
+ @if (
+ currentAccountProductTemplate?.balanceSwapOption !== undefined &&
+ currentAccountProductTemplate?.balanceSwapOption !== null
+ ) {
+
+ Balance Swap Option
+
+ {{ currentAccountProductTemplate?.balanceSwapOption | yesNo }}
+
+
+ }
+ @if (currentAccountProductTemplate?.msme !== undefined && currentAccountProductTemplate?.msme !== null) {
+
+ MSME
+
+ {{ currentAccountProductTemplate?.msme | yesNo }}
+
+
+ }
+ @if (
+ currentAccountProductTemplate?.nominationFacility !== undefined &&
+ currentAccountProductTemplate?.nominationFacility !== null
+ ) {
+
+ Nomination Facility
+
+ {{ currentAccountProductTemplate?.nominationFacility | yesNo }}
+
+
+ }
+ @if (
+ currentAccountProductTemplate?.autoDebitFacility !== undefined &&
+ currentAccountProductTemplate?.autoDebitFacility !== null
+ ) {
+
+ Auto Debit Facility
+
+ {{ currentAccountProductTemplate?.autoDebitFacility | yesNo }}
+
+
+ }
+
+
+
+
+
+
+
+
+
+
+ Interest Posting Frequency
+ {{
+ termPreview?.interestPostingPeriodType
+ | find: currentAccountProductTemplate?.interestPostingPeriodTypeOptions : 'id' : 'value'
+ | translateKey: 'catalogs'
+ }}
+
+
+ Auto Interest Post
+
+ {{ termPreview?.autoPost | yesNo }}
+
+
+ @if (termPreview?.frequencyFixDay !== undefined && termPreview?.frequencyFixDay !== null) {
+
+ Frequency Fix Day
+ {{ termPreview?.frequencyFixDay }} Days
+
+ }
+ @if (termPreview?.lastInterestDate) {
+
+ Last Interest Date
+ {{ termPreview?.lastInterestDate | dateFormat }}
+
+ }
+
+
+
+
+
+
+
+
+
+ @if (
+ settingsPreview?.minRequiredOpeningBalance !== undefined &&
+ settingsPreview?.minRequiredOpeningBalance !== null &&
+ settingsPreview?.minRequiredOpeningBalance !== ''
+ ) {
+
+ {{ 'labels.inputs.Minimum Opening Balance' | translate }}
+ {{ settingsPreview?.minRequiredOpeningBalance | formatNumber }}
+
+ }
+
+ {{ 'labels.inputs.Enforce Minimum Balance' | translate }}
+
+ {{ settingsPreview?.enforceMinRequiredBalance | yesNo }}
+
+
+ @if (
+ settingsPreview?.minRequiredBalance !== undefined &&
+ settingsPreview?.minRequiredBalance !== null &&
+ settingsPreview?.minRequiredBalance !== ''
+ ) {
+
+ {{ 'labels.inputs.Minimum Balance' | translate }}
+ {{ settingsPreview?.minRequiredBalance | formatNumber }}
+
+ }
+
+ Balance Frequency
+ {{ settingsPreview?.balanceFrequency || 'Unassigned' }}
+
+
+ {{ 'labels.inputs.Apply Withdrawal Fee for Transfers' | translate }}
+
+ {{ settingsPreview?.withdrawalFeeForTransfers | yesNo }}
+
+
+
+ Enable Lock-in Period
+
+ {{ settingsPreview?.enableLockinPeriod || !!settingsPreview?.lockinPeriodFrequency | yesNo }}
+
+
+ @if (settingsPreview?.lockinPeriodFrequency) {
+
+ {{ 'labels.inputs.Lock-in Period' | translate }}
+
+ {{ settingsPreview?.lockinPeriodFrequency }}
+ {{
+ settingsPreview?.lockinPeriodFrequencyType
+ | find: currentAccountProductTemplate?.lockinPeriodFrequencyTypeOptions : 'id' : 'value'
+ | translateKey: 'catalogs'
+ }}
+
+
+ }
+
+ Account Closed Zero Balance In Day Closing
+
+ {{ settingsPreview?.accountClosedZeroBalanceInDayClosing | yesNo }}
+
+
+
+ {{ 'labels.inputs.Is Overdraft Allowed' | translate }}
+
+ {{ settingsPreview?.allowOverdraft | yesNo }}
+
+
+ @if (settingsPreview?.allowOverdraft) {
+
+ Avg Balance Calc Period
+ {{ settingsPreview?.avgBalanceCalcPeriod || 'Unassigned' }}
+
+
+ Valid For Period
+ {{ settingsPreview?.validForPeriod || 'Unassigned' }}
+
+ @if (
+ settingsPreview?.overdraftLimit !== undefined &&
+ settingsPreview?.overdraftLimit !== null &&
+ settingsPreview?.overdraftLimit !== ''
+ ) {
+
+ OD Limit %
+ {{ settingsPreview?.overdraftLimit | formatNumber }}
+
+ }
+ @if (
+ settingsPreview?.nominalAnnualInterestRateOverdraft !== undefined &&
+ settingsPreview?.nominalAnnualInterestRateOverdraft !== null &&
+ settingsPreview?.nominalAnnualInterestRateOverdraft !== ''
+ ) {
+
+ Interest on OD %
+ {{
+ settingsPreview?.nominalAnnualInterestRateOverdraft | formatNumber
+ }}
+
+ }
+
+ OD Account Closed Zero Balance In Day Closing
+
+ {{ settingsPreview?.odAccountClosedZeroBalanceInDayClosing | yesNo }}
+
+
+ }
+
+
+
+
+ @if (hasDigitalSection) {
+
+
+
+
+ @for (facility of digitalFacilityLabels; track facility.key) {
+
+ {{ facility.label }}
+
+ {{ digitalPreview?.accountFacilityConfig?.[facility.key] | yesNo }}
+
+
+ }
+
+
+ @if (digitalPreview?.accountFacilityLimits?.length) {
+
+
+
+ | Limit Type |
+ General Limit |
+ Minor Account Limit |
+ Small Saving Limit |
+
+
+
+ @for (row of digitalPreview.accountFacilityLimits; track row.limitType) {
+
+ | {{ row.limitType }} |
+ {{ row.generalLimit || 'Unassigned' }} |
+ {{ row.minorAccountLimit || 'Unassigned' }} |
+ {{ row.smallSavingLimit || 'Unassigned' }} |
+
+ }
+
+
+ }
+
+ @if (digitalPreview?.depositLimitKyc?.general) {
+
+
+
+ | Account Type |
+ KYC Type |
+ Limit |
+
+
+
+
+ | General |
+ {{ digitalPreview.depositLimitKyc.general.kycType || 'Unassigned' }} |
+ {{ digitalPreview.depositLimitKyc.general.limit || 'Unassigned' }} |
+
+
+ | Minor |
+ {{ digitalPreview.depositLimitKyc.minor?.kycType || 'Unassigned' }} |
+ {{ digitalPreview.depositLimitKyc.minor?.limit || 'Unassigned' }} |
+
+
+ | Small Saving |
+ {{ digitalPreview.depositLimitKyc.smallSaving?.kycType || 'Unassigned' }} |
+ {{ digitalPreview.depositLimitKyc.smallSaving?.limit || 'Unassigned' }} |
+
+
+
+ }
+
+
+ }
+
+
+ @if (currentAccount?.charges?.length) {
+
+
+
+
+
+ | {{ '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 }} |
+
+ @if (
+ charge.chargeTimeType?.value === 'Specified due date' || charge.chargeTimeType?.value === 'Weekly Fee'
+ ) {
+ {{ (charge.dueDate | dateFormat) || 'Unassigned' }}
+ } @else if (
+ charge.chargeTimeType?.value === 'Monthly Fee' || charge.chargeTimeType?.value === 'Annual Fee'
+ ) {
+ {{ (charge.feeOnMonthDay | dateFormat) || 'Unassigned' }}
+ } @else {
+ N/A
+ }
+ |
+
+
+ {{ 'labels.inputs.Repayments Every' | translate }} |
+ {{ charge.feeInterval || 'Not Provided' }} |
+
+
+
+
+
}
diff --git a/src/app/current-accounts/current-account-stepper/current-account-preview-step/current-account-preview-step.component.scss b/src/app/current-accounts/current-account-stepper/current-account-preview-step/current-account-preview-step.component.scss
index 6a4a4b201..bec5645fb 100644
--- a/src/app/current-accounts/current-account-stepper/current-account-preview-step/current-account-preview-step.component.scss
+++ b/src/app/current-accounts/current-account-stepper/current-account-preview-step/current-account-preview-step.component.scss
@@ -6,27 +6,95 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-table {
- width: 100%;
+.preview-wrapper {
+ display: flex;
+ flex-direction: column;
+ gap: 1.25rem;
+ padding: 0.5rem 0;
}
-.mat-elevation-z1 {
- margin: 1em 0 1.5em;
+.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;
+.preview-body {
+ padding: 1rem 1.25rem;
+}
+
+.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;
+ }
+ }
+}
+
+.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;
+.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;
+.preview-table {
+ width: 100%;
+ margin-top: 1rem;
}
.margin-t {
diff --git a/src/app/current-accounts/current-account-stepper/current-account-preview-step/current-account-preview-step.component.ts b/src/app/current-accounts/current-account-stepper/current-account-preview-step/current-account-preview-step.component.ts
index 50cd396a7..4daf9abfe 100644
--- a/src/app/current-accounts/current-account-stepper/current-account-preview-step/current-account-preview-step.component.ts
+++ b/src/app/current-accounts/current-account-stepper/current-account-preview-step/current-account-preview-step.component.ts
@@ -36,7 +36,7 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
* Current account preview step
*/
@Component({
- selector: 'mifosx-current-account-account-preview-step',
+ selector: 'mifosx-current-account-preview-step',
templateUrl: './current-account-preview-step.component.html',
styleUrls: ['./current-account-preview-step.component.scss'],
imports: [
@@ -62,6 +62,25 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
]
})
export class CurrentAccountPreviewStepComponent implements OnChanges {
+ readonly digitalFacilityLabels = [
+ { key: 'atmFacility', label: 'ATM Facility' },
+ { key: 'atmWithdrawalFacility', label: 'ATM Withdrawal' },
+ { key: 'upiFacility', label: 'UPI Facility' },
+ { key: 'posTransactionsFacility', label: 'POS Transactions' },
+ { key: 'chequeBook', label: 'Cheque Book' },
+ { key: 'impsFacility', label: 'IMPS Facility' },
+ { key: 'smsAlerts', label: 'SMS Alerts' },
+ { key: 'bbpsFacility', label: 'BBPS Facility' },
+ { key: 'insuranceCover', label: 'Insurance Cover' },
+ { key: 'bepgFacility', label: 'BEPG Facility' },
+ { key: 'neftFacility', label: 'NEFT Facility' },
+ { key: 'rtgsFacility', label: 'RTGS Facility' },
+ { key: 'interBankTotalCapFacility', label: 'Inter-Bank Total Cap' },
+ { key: 'withdrawalFacility', label: 'Withdrawal Facility' },
+ { key: 'depositFacilityKyc', label: 'Deposit Facility (KYC)' },
+ { key: 'virtualDebitCard', label: 'Virtual Debit Card' }
+ ];
+
private translateService = inject(TranslateService);
/** Current Account Product Template */
@@ -70,6 +89,10 @@ export class CurrentAccountPreviewStepComponent implements OnChanges {
@Input() currentAccountTemplate: any;
/** Current Account Terms Form */
@Input() currentAccountTermsForm: any;
+ /** Current Account Term Form */
+ @Input() currentAccountTermForm: any;
+ /** Current Account Settings Form */
+ @Input() currentAccountSettingsForm: any;
/** Current Account */
@Input() currentAccount: any;
@Input() activeClientMembers?: any;
@@ -104,4 +127,24 @@ export class CurrentAccountPreviewStepComponent implements OnChanges {
getCatalogTranslation(text: string): string {
return this.translateService.instant('labels.catalogs.' + text);
}
+
+ get termPreview(): any {
+ return this.currentAccountTermForm?.getRawValue?.() || this.currentAccount || {};
+ }
+
+ get settingsPreview(): any {
+ return this.currentAccountSettingsForm?.getRawValue?.() || this.currentAccount || {};
+ }
+
+ get digitalPreview(): any {
+ return this.currentAccountProductTemplate || {};
+ }
+
+ get hasDigitalSection(): boolean {
+ return !!(
+ this.digitalPreview?.accountFacilityConfig ||
+ this.digitalPreview?.accountFacilityLimits?.length ||
+ this.digitalPreview?.depositLimitKyc
+ );
+ }
}
diff --git a/src/app/current-accounts/current-account-stepper/current-account-settings-step/current-account-settings-step.component.html b/src/app/current-accounts/current-account-stepper/current-account-settings-step/current-account-settings-step.component.html
new file mode 100644
index 000000000..c2ca039e2
--- /dev/null
+++ b/src/app/current-accounts/current-account-stepper/current-account-settings-step/current-account-settings-step.component.html
@@ -0,0 +1,174 @@
+
+
+
diff --git a/src/app/current-accounts/current-account-stepper/current-account-settings-step/current-account-settings-step.component.scss b/src/app/current-accounts/current-account-stepper/current-account-settings-step/current-account-settings-step.component.scss
new file mode 100644
index 000000000..a329a6057
--- /dev/null
+++ b/src/app/current-accounts/current-account-stepper/current-account-settings-step/current-account-settings-step.component.scss
@@ -0,0 +1,255 @@
+/**
+ * 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;
+
+.sps-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 {
+ font-size: 14px;
+ font-weight: 600;
+ color: $gray-900;
+ }
+ }
+}
+
+.sps-section__badge {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ width: 24px;
+ height: 24px;
+ border-radius: 6px;
+ background: #eff6ff;
+ font-size: 14px;
+}
+
+.sps-body {
+ background: #fff;
+ padding: 18px 24px 24px;
+}
+
+.sps-field {
+ width: 100%;
+
+ &--full {
+ grid-column: 1 / -1;
+ }
+
+ &--compact {
+ width: 100%;
+ }
+}
+
+.sps-layout {
+ display: grid;
+ gap: 16px;
+}
+
+.sps-layout--balance {
+ gap: 22px;
+}
+
+.sps-layout--additional {
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ align-items: start;
+
+ @media (width <= 1100px) {
+ grid-template-columns: 1fr;
+ }
+}
+
+.sps-row {
+ display: grid;
+ gap: 18px;
+ align-items: start;
+}
+
+.sps-row--three {
+ grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
+ align-items: center;
+
+ .sps-field--compact:first-child {
+ min-width: 0;
+ }
+
+ .sps-toggle--inline {
+ align-self: center;
+ min-height: 56px;
+ }
+}
+
+.sps-row--two {
+ grid-template-columns: minmax(0, 1fr) auto;
+ align-items: center;
+
+ .sps-field--compact {
+ min-width: 0;
+ }
+}
+
+.sps-toggle {
+ display: flex;
+ align-items: center;
+ min-height: 56px;
+
+ mat-checkbox {
+ font-size: 14px;
+ color: $gray-900;
+ }
+
+ &--full {
+ min-height: auto;
+ margin-bottom: 8px;
+ }
+
+ &--inline {
+ padding-top: 0;
+ }
+
+ &--right {
+ justify-content: flex-start;
+ }
+}
+
+.sps-lockin-row {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 16px;
+ margin-bottom: 16px;
+ padding-bottom: 16px;
+ border-bottom: 1px solid $gray-200;
+ font-size: 14px;
+ color: $gray-900;
+}
+
+.sps-lockin-row mat-checkbox {
+ margin-right: 2px;
+}
+
+.sps-lockin-fields {
+ display: grid;
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ gap: 16px;
+
+ @media (width <= 640px) {
+ grid-template-columns: 1fr;
+ }
+}
+
+// ── Overdraft (OD) Facility ───────────────────────────────────────────────
+
+.sps-od-layout {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: 24px;
+ align-items: start;
+
+ @media (width <= 900px) {
+ grid-template-columns: 1fr;
+ }
+}
+
+.sps-od-checks {
+ display: flex;
+ flex-direction: column;
+ gap: 12px;
+}
+
+.sps-od-check-row {
+ padding: 14px 16px;
+ border: 1px solid $border;
+ border-radius: 8px;
+ background: $gray-50;
+
+ mat-checkbox {
+ font-size: 14px;
+ font-weight: 500;
+ color: $gray-900;
+ }
+}
+
+.sps-od-check-hint {
+ margin: 6px 0 0 28px;
+ font-size: 11.5px;
+ color: #64748b;
+ line-height: 1.5;
+}
+
+.sps-od-panel {
+ background: #f0f7ff;
+ border: 1px solid #bfdbfe;
+ border-radius: 10px;
+ padding: 20px 24px;
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+}
+
+.sps-od-radio-group {
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+ padding-bottom: 16px;
+ border-bottom: 1px solid #dbeafe;
+
+ &:last-of-type {
+ border-bottom: none;
+ padding-bottom: 0;
+ }
+}
+
+.sps-od-radio-label {
+ font-size: 10.5px;
+ font-weight: 700;
+ letter-spacing: 0.07em;
+ color: #3b82f6;
+ text-transform: uppercase;
+}
+
+.sps-od-radio-choices {
+ display: flex;
+ gap: 20px;
+ flex-wrap: wrap;
+}
+
+.sps-od-inputs {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: 16px;
+
+ @media (width <= 640px) {
+ grid-template-columns: 1fr;
+ }
+}
diff --git a/src/app/current-accounts/current-account-stepper/current-account-settings-step/current-account-settings-step.component.ts b/src/app/current-accounts/current-account-stepper/current-account-settings-step/current-account-settings-step.component.ts
new file mode 100644
index 000000000..32c02bdfd
--- /dev/null
+++ b/src/app/current-accounts/current-account-stepper/current-account-settings-step/current-account-settings-step.component.ts
@@ -0,0 +1,163 @@
+/**
+ * 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, OnInit, inject } from '@angular/core';
+import { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';
+import { MatCheckbox } from '@angular/material/checkbox';
+import { MatRadioGroup, MatRadioButton } from '@angular/material/radio';
+import { FormatNumberPipe } from '../../../pipes/format-number.pipe';
+import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
+
+@Component({
+ selector: 'mifosx-current-account-settings-step',
+ templateUrl: './current-account-settings-step.component.html',
+ styleUrls: ['./current-account-settings-step.component.scss'],
+ imports: [
+ ...STANDALONE_SHARED_IMPORTS,
+ MatCheckbox,
+ MatRadioGroup,
+ MatRadioButton,
+ FormatNumberPipe
+ ]
+})
+export class CurrentAccountSettingsStepComponent implements OnInit {
+ private formBuilder = inject(UntypedFormBuilder);
+
+ private _currentAccountProductTemplate: any;
+
+ @Input()
+ set currentAccountProductTemplate(value: any) {
+ this._currentAccountProductTemplate = value;
+ if (value && this.currentAccountSettingsForm) {
+ this.applyTemplate(value);
+ }
+ }
+ get currentAccountProductTemplate(): any {
+ return this._currentAccountProductTemplate;
+ }
+
+ currentAccountSettingsForm: UntypedFormGroup;
+
+ lockinPeriodFrequencyTypeData: any[] = [];
+
+ periodFrequencyData: any[] = [
+ { value: 'Daily' },
+ { value: 'Weekly' },
+ { value: 'Monthly' },
+ { value: 'Quarterly' },
+ { value: 'Half Yearly' },
+ { value: 'Yearly' }];
+
+ constructor() {
+ this.createForm();
+ this.buildDependencies();
+ }
+
+ createForm() {
+ this.currentAccountSettingsForm = this.formBuilder.group({
+ minRequiredOpeningBalance: [
+ '',
+ [Validators.min(0)]
+ ],
+ withdrawalFeeForTransfers: [false],
+ enforceMinRequiredBalance: [false],
+ minRequiredBalance: [
+ '',
+ [Validators.min(0)]
+ ],
+ balanceFrequency: ['Monthly'],
+ enableLockinPeriod: [false],
+ lockinPeriodFrequency: [''],
+ lockinPeriodFrequencyType: [''],
+ accountClosedZeroBalanceInDayClosing: [false],
+ allowOverdraft: [false],
+ odAccountClosedZeroBalanceInDayClosing: [false],
+ avgBalanceCalcPeriod: ['6M'],
+ validForPeriod: ['3M'],
+ overdraftLimit: [
+ '',
+ [Validators.min(0)]
+ ],
+ nominalAnnualInterestRateOverdraft: [
+ '',
+ [Validators.min(0)]
+ ]
+ });
+ }
+
+ ngOnInit() {
+ if (this._currentAccountProductTemplate) {
+ this.applyTemplate(this._currentAccountProductTemplate);
+ }
+ }
+
+ private applyTemplate(t: any) {
+ this.lockinPeriodFrequencyTypeData = t.lockinPeriodFrequencyTypeOptions || [];
+ const hasLockin = !!(t.lockinPeriodFrequency && t.lockinPeriodFrequency > 0);
+
+ this.currentAccountSettingsForm.patchValue({
+ minRequiredOpeningBalance: t.minRequiredOpeningBalance,
+ withdrawalFeeForTransfers: t.withdrawalFeeForTransfers || false,
+ enforceMinRequiredBalance: t.enforceMinRequiredBalance || false,
+ minRequiredBalance: t.minRequiredBalance,
+ balanceFrequency: t.balanceFrequency || 'Monthly',
+ enableLockinPeriod: hasLockin,
+ lockinPeriodFrequency: hasLockin ? t.lockinPeriodFrequency : '',
+ lockinPeriodFrequencyType: hasLockin ? t.lockinPeriodFrequencyType?.id || '' : '',
+ accountClosedZeroBalanceInDayClosing: t.accountClosedZeroBalanceInDayClosing || false,
+ allowOverdraft: t.allowOverdraft || false,
+ odAccountClosedZeroBalanceInDayClosing: t.odAccountClosedZeroBalanceInDayClosing || false,
+ avgBalanceCalcPeriod: t.avgBalanceCalcPeriod || '6M',
+ validForPeriod: t.validForPeriod || '3M',
+ overdraftLimit: t.overdraftLimit || '',
+ nominalAnnualInterestRateOverdraft: t.nominalAnnualInterestRateOverdraft || ''
+ });
+ }
+
+ buildDependencies() {
+ this.currentAccountSettingsForm.get('enableLockinPeriod').valueChanges.subscribe((enabled: boolean) => {
+ const freq = this.currentAccountSettingsForm.get('lockinPeriodFrequency');
+ const type = this.currentAccountSettingsForm.get('lockinPeriodFrequencyType');
+ if (enabled) {
+ freq.setValidators([
+ Validators.required,
+ Validators.min(1)
+ ]);
+ type.setValidators([Validators.required]);
+ } else {
+ freq.setValue('');
+ type.setValue('');
+ freq.clearValidators();
+ type.clearValidators();
+ }
+ freq.updateValueAndValidity();
+ type.updateValueAndValidity();
+ });
+ }
+
+ get currentAccountSettings() {
+ const value = { ...this.currentAccountSettingsForm.getRawValue() };
+
+ if (!value.enableLockinPeriod) {
+ value.lockinPeriodFrequency = null;
+ value.lockinPeriodFrequencyType = null;
+ }
+ delete value.enableLockinPeriod;
+ delete value.balanceFrequency;
+
+ if (!value.allowOverdraft) {
+ delete value.overdraftLimit;
+ delete value.nominalAnnualInterestRateOverdraft;
+ delete value.avgBalanceCalcPeriod;
+ delete value.validForPeriod;
+ delete value.odAccountClosedZeroBalanceInDayClosing;
+ }
+
+ return value;
+ }
+}
diff --git a/src/app/current-accounts/current-account-stepper/current-account-term-step/current-account-term-step.component.html b/src/app/current-accounts/current-account-stepper/current-account-term-step/current-account-term-step.component.html
new file mode 100644
index 000000000..3dd3b12b0
--- /dev/null
+++ b/src/app/current-accounts/current-account-stepper/current-account-term-step/current-account-term-step.component.html
@@ -0,0 +1,71 @@
+
+
+
diff --git a/src/app/current-accounts/current-account-stepper/current-account-term-step/current-account-term-step.component.scss b/src/app/current-accounts/current-account-stepper/current-account-term-step/current-account-term-step.component.scss
new file mode 100644
index 000000000..038977265
--- /dev/null
+++ b/src/app/current-accounts/current-account-stepper/current-account-term-step/current-account-term-step.component.scss
@@ -0,0 +1,166 @@
+/**
+ * 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;
+
+.sat-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;
+
+ span {
+ font-size: 14px;
+ font-weight: 600;
+ color: $gray-900;
+ }
+ }
+}
+
+.sat-section__badge {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ width: 24px;
+ height: 24px;
+ border-radius: 6px;
+ background: #eff6ff;
+ font-size: 14px;
+}
+
+.sat-body {
+ background: #fff;
+ padding: 18px 24px 24px;
+}
+
+.sat-banner {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ padding: 10px 14px;
+ margin-bottom: 18px;
+ border-radius: 8px;
+ background: #eff6ff;
+ border: 1px solid #bfdbfe;
+ font-size: 13px;
+ color: $gray-900;
+
+ &__icon {
+ font-size: 16px;
+ }
+}
+
+.sat-grid {
+ display: grid;
+ grid-template-columns: repeat(3, minmax(0, 1fr));
+ gap: 4px 16px;
+
+ @media (width <= 900px) {
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ }
+
+ @media (width <= 600px) {
+ grid-template-columns: 1fr;
+ }
+}
+
+.sat-field {
+ width: 100%;
+}
+
+.sat-footer {
+ margin-top: 16px;
+ padding-top: 16px;
+ border-top: 1px solid $border;
+
+ &__grid {
+ display: grid;
+ grid-template-columns: auto 1fr 1fr;
+ gap: 4px 16px;
+ align-items: start;
+
+ @media (width <= 900px) {
+ grid-template-columns: 1fr 1fr;
+ }
+
+ @media (width <= 600px) {
+ grid-template-columns: 1fr;
+ }
+ }
+}
+
+.sat-toggle-card {
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+ padding: 10px 14px;
+ border: 1px solid $border;
+ border-radius: 8px;
+ background: $gray-50;
+ min-height: 56px;
+
+ h4 {
+ margin: 0;
+ font-size: 12px;
+ font-weight: 600;
+ color: #64748b;
+ text-transform: uppercase;
+ letter-spacing: 0.04em;
+ }
+
+ &__choices {
+ display: flex;
+ gap: 16px;
+ align-items: center;
+ }
+}
+
+.sat-radio-label {
+ display: flex;
+ align-items: center;
+ gap: 6px;
+ font-size: 14px;
+ color: $gray-900;
+ cursor: pointer;
+
+ [type='radio'] {
+ accent-color: $accent;
+ width: 16px;
+ height: 16px;
+ cursor: pointer;
+ }
+}
+
+.sat-note {
+ display: flex;
+ align-items: flex-start;
+ gap: 8px;
+ margin-top: 12px;
+ padding: 10px 14px;
+ border-radius: 8px;
+ background: #fffbeb;
+ border: 1px solid #fde68a;
+ font-size: 13px;
+ color: #92400e;
+}
diff --git a/src/app/current-accounts/current-account-stepper/current-account-term-step/current-account-term-step.component.ts b/src/app/current-accounts/current-account-stepper/current-account-term-step/current-account-term-step.component.ts
new file mode 100644
index 000000000..5ff76ab13
--- /dev/null
+++ b/src/app/current-accounts/current-account-stepper/current-account-term-step/current-account-term-step.component.ts
@@ -0,0 +1,102 @@
+/**
+ * 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, OnInit, inject } from '@angular/core';
+import { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';
+import { Dates } from 'app/core/utils/dates';
+import { SettingsService } from 'app/settings/settings.service';
+import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
+
+@Component({
+ selector: 'mifosx-current-account-term-step',
+ templateUrl: './current-account-term-step.component.html',
+ styleUrls: ['./current-account-term-step.component.scss'],
+ imports: [...STANDALONE_SHARED_IMPORTS]
+})
+export class CurrentAccountTermStepComponent implements OnInit {
+ private formBuilder = inject(UntypedFormBuilder);
+ private dateUtils = inject(Dates);
+ private settingsService = inject(SettingsService);
+
+ private _currentAccountProductTemplate: any;
+
+ @Input()
+ set currentAccountProductTemplate(value: any) {
+ this._currentAccountProductTemplate = value;
+ if (value && this.currentAccountTermForm) {
+ this.applyTemplate(value);
+ }
+ }
+ get currentAccountProductTemplate(): any {
+ return this._currentAccountProductTemplate;
+ }
+
+ currentAccountTermForm: UntypedFormGroup;
+
+ interestPostingPeriodTypeData: any[] = [];
+
+ yesNoOptions = [
+ { value: true, label: 'Yes' },
+ { value: false, label: 'No' }
+ ];
+
+ minDate = new Date(2000, 0, 1);
+ maxDate = new Date();
+
+ constructor() {
+ this.createForm();
+ }
+
+ createForm() {
+ this.currentAccountTermForm = this.formBuilder.group({
+ currencyCode: [{ value: '', disabled: true }],
+ interestPostingPeriodType: [
+ '',
+ Validators.required
+ ],
+ autoPost: [true],
+ frequencyFixDay: [
+ 30,
+ [Validators.min(0)]
+ ],
+ lastInterestDate: ['']
+ });
+ }
+
+ ngOnInit() {
+ this.maxDate = this.settingsService.businessDate;
+ if (this._currentAccountProductTemplate) {
+ this.applyTemplate(this._currentAccountProductTemplate);
+ }
+ }
+
+ private applyTemplate(t: any) {
+ this.maxDate = this.settingsService.businessDate;
+ this.interestPostingPeriodTypeData = t.interestPostingPeriodTypeOptions || [];
+
+ this.currentAccountTermForm.patchValue({
+ currencyCode: t.currency?.code,
+ interestPostingPeriodType: t.interestPostingPeriodType?.id,
+ autoPost: t.autoPost ?? true,
+ frequencyFixDay: t.frequencyFixDay ?? 30,
+ lastInterestDate: t.lastInterestDate ? new Date(t.lastInterestDate) : ''
+ });
+ }
+
+ get currentAccountTerms() {
+ const value = { ...this.currentAccountTermForm.getRawValue() };
+ const dateFormat = this.settingsService.dateFormat;
+
+ if (value.lastInterestDate instanceof Date) {
+ value.lastInterestDate = this.dateUtils.formatDate(value.lastInterestDate, dateFormat) || '';
+ }
+
+ delete value.currencyCode;
+ return value;
+ }
+}
diff --git a/src/app/deposits/recurring-deposits/create-recurring-deposits-account/create-recurring-deposits-account.component.html b/src/app/deposits/recurring-deposits/create-recurring-deposits-account/create-recurring-deposits-account.component.html
index 95803a7d0..889528426 100644
--- a/src/app/deposits/recurring-deposits/create-recurring-deposits-account/create-recurring-deposits-account.component.html
+++ b/src/app/deposits/recurring-deposits/create-recurring-deposits-account/create-recurring-deposits-account.component.html
@@ -93,6 +93,7 @@
[recurringDepositsAccountTemplate]="recurringDepositsAccountTemplate"
[recurringDepositsAccountProductTemplate]="recurringDepositsAccountProductTemplate"
[recurringDepositAccountData]="recurringDepositAccountData"
+ [rdInterestRates]="rdInterestRates"
(submitEvent)="submit()"
>
diff --git a/src/app/deposits/recurring-deposits/edit-recurring-deposit-account/edit-recurring-deposit-account.component.html b/src/app/deposits/recurring-deposits/edit-recurring-deposit-account/edit-recurring-deposit-account.component.html
index e44e07f33..372966041 100644
--- a/src/app/deposits/recurring-deposits/edit-recurring-deposit-account/edit-recurring-deposit-account.component.html
+++ b/src/app/deposits/recurring-deposits/edit-recurring-deposit-account/edit-recurring-deposit-account.component.html
@@ -94,6 +94,7 @@
[recurringDepositsAccountTemplate]="recurringDepositsAccountAndTemplate"
[recurringDepositsAccountProductTemplate]="recurringDepositsAccountProductTemplate"
[recurringDepositAccountData]="recurringDepositAccountData"
+ [rdInterestRates]="rdInterestRates"
(submitEvent)="submit()"
>
diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-charges-step/recurring-deposits-account-charges-step.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-charges-step/recurring-deposits-account-charges-step.component.ts
index 8690f6248..f0ed84272 100644
--- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-charges-step/recurring-deposits-account-charges-step.component.ts
+++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-charges-step/recurring-deposits-account-charges-step.component.ts
@@ -79,7 +79,7 @@ export class RecurringDepositsAccountChargesStepComponent implements OnInit, OnC
@Input() recurringDepositAccountFormValid: boolean;
/** Charges Data */
- chargeData: any;
+ chargeData: any[] = [];
/** Charges Data Source */
chargesDataSource: {}[] = [];
/** Charges table columns */
@@ -102,8 +102,10 @@ export class RecurringDepositsAccountChargesStepComponent implements OnInit, OnC
ngOnInit() {
this.chargesDataSource = [];
if (this.recurringDepositsAccountTemplate.id && this.recurringDepositsAccountTemplate.charges) {
+ // Edit mode: load saved charges from existing account
this.chargesDataSource =
this.recurringDepositsAccountTemplate.charges.map((charge: any) => ({ ...charge, id: charge.chargeId })) || [];
+ this.isChargesPatched = true;
}
}
@@ -120,8 +122,17 @@ export class RecurringDepositsAccountChargesStepComponent implements OnInit, OnC
}
if (this.recurringDepositsAccountProductTemplate) {
this.chargeData = this.recurringDepositsAccountProductTemplate.chargeOptions.filter(
- (c: Charge) => c.currency.code === this.currency.code
+ (c: Charge) => c.currency.code === this.currency?.code
);
+
+ // New account: pre-populate charges from product template
+ if (!this.isChargesPatched && !this.recurringDepositsAccountTemplate?.id) {
+ const productCharges = this.recurringDepositsAccountProductTemplate.charges;
+ if (Array.isArray(productCharges) && productCharges.length > 0) {
+ this.chargesDataSource = productCharges.map((charge: any) => ({ ...charge, id: charge.chargeId }));
+ }
+ this.isChargesPatched = true;
+ }
}
}
diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.html
index df70f6d6c..194eeefec 100644
--- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.html
+++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.html
@@ -7,80 +7,207 @@
-->