diff --git a/src/app/deposits/recurring-deposits/create-recurring-deposits-account/create-recurring-deposits-account.component.ts b/src/app/deposits/recurring-deposits/create-recurring-deposits-account/create-recurring-deposits-account.component.ts index 46d217f0f..9a73f3c25 100644 --- a/src/app/deposits/recurring-deposits/create-recurring-deposits-account/create-recurring-deposits-account.component.ts +++ b/src/app/deposits/recurring-deposits/create-recurring-deposits-account/create-recurring-deposits-account.component.ts @@ -145,22 +145,41 @@ export class CreateRecurringDepositsAccountComponent { const locale = this.settingsService.language.code; const dateFormat = this.settingsService.dateFormat; const monthDayFormat = 'dd MMMM'; - const recurringDepositAccount = { - ...this.recurringDepositAccount, - ...this.recurringDepositsAccountCurrencyStep.currencyStepData, + + const details = this.recurringDepositAccount; + const currencyStep = this.recurringDepositsAccountCurrencyStep; + + const recurringDepositAccount: any = { + ...details, clientId: this.recurringDepositsAccountTemplate.clientId, charges: [], isCalendarInherited: false, - submittedOnDate: this.dateUtils.formatDate(this.recurringDepositAccount.submittedOnDate, dateFormat), - expectedFirstDepositOnDate: this.dateUtils.formatDate( - this.recurringDepositAccount.expectedFirstDepositOnDate, - dateFormat - ), + mandatoryRecommendedDepositAmount: 0, + recurringFrequency: 1, + recurringFrequencyType: 2, + submittedOnDate: this.dateUtils.formatDate(details.submittedOnDate, dateFormat), + expectedFirstDepositOnDate: this.dateUtils.formatDate(details.expectedFirstDepositOnDate, dateFormat), dateFormat, monthDayFormat, - locale + locale, + // Currency step overrides + balanceSwapOption: currencyStep?.balanceSwapOption ?? details.balanceSwapOption ?? false, + msme: currencyStep?.msme ?? details.msme ?? false, + autoDebitFacility: currencyStep?.autoDebitFacility ?? details.autoDebitFacility ?? false }; + // Tenure from interest rate chart step (depositPeriod in days) + const tenureDays = this.rdTenureDays; + if (tenureDays && tenureDays > 0) { + recurringDepositAccount.depositPeriod = tenureDays; + recurringDepositAccount.depositPeriodFrequencyId = 0; // 0 = Days + } + + // Nominee from currency step + if (currencyStep?.nomineeData) { + recurringDepositAccount.nominee = currencyStep.nomineeData; + } + this.recurringDepositsService.createRecurringDepositAccount(recurringDepositAccount).subscribe((response: any) => { this.router.navigate( [ diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.ts index 1bf189d93..62ea2c590 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component.ts @@ -494,6 +494,13 @@ export class RecurringDepositsAccountDetailsStepComponent implements OnInit { get recurringDepositAccountDetails() { const value = this.recurringDepositAccountDetailsForm.value; + if (this.selectedAccountType) { + value.accountType = this.selectedAccountType; + } + if (this.selectedCustomerSegment) { + value.customerSegment = this.selectedCustomerSegment; + } + if (this.selectedAccountStatus) { value.accountStatus = this.selectedAccountStatus; } @@ -503,8 +510,8 @@ export class RecurringDepositsAccountDetailsStepComponent implements OnInit { value.jointHolders = [ { clientId: this.primaryClientId, - clientName: this.primaryClientName, - clientCif: this.primaryClientCif, + displayName: this.primaryClientName, + cifNumber: this.primaryClientCif, sharePercentage: this.primaryHolderShare, isMandatory: true, isPrimary: true, @@ -513,8 +520,8 @@ export class RecurringDepositsAccountDetailsStepComponent implements OnInit { }, ...this.jointHolders.map((h) => ({ clientId: h.clientId, - clientName: h.clientName, - clientCif: h.clientCif, + displayName: h.clientName, + cifNumber: h.clientCif, sharePercentage: h.sharePercentage, isMandatory: h.isMandatory, isPrimary: false, @@ -535,9 +542,9 @@ export class RecurringDepositsAccountDetailsStepComponent implements OnInit { if (this.selectedAccountStatus === 'MINOR') { value.guardianClientId = this.guardianClientId; value.guardianName = this.guardianName; - value.guardianCif = this.guardianCif; + value.guardianCifNumber = this.guardianCif; value.guardianRelationship = this.guardianRelationship; - value.minorDob = this.minorDob ? this.dateUtils.formatDate(this.minorDob, 'yyyy-MM-dd') : null; + value.minorDateOfBirth = this.minorDob ? this.dateUtils.formatDate(this.minorDob, 'yyyy-MM-dd') : null; } if (this.selectedLinkedAccount) { diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-preview-step/recurring-deposits-account-preview-step.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-preview-step/recurring-deposits-account-preview-step.component.html index d3699f0a1..38cf810f9 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-preview-step/recurring-deposits-account-preview-step.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-stepper/recurring-deposits-account-preview-step/recurring-deposits-account-preview-step.component.html @@ -43,6 +43,237 @@ + + @if (recurringDepositAccountData?.accountStatus) { +
+
+ + Status of Account + RBI Guidelines +
+
+ +
+ + @switch (recurringDepositAccountData.accountStatus) { + @case ('INDIVIDUAL_MALE') { + Individual (Male) + } + @case ('INDIVIDUAL_FEMALE') { + Individual (Female) + } + @case ('SINGLE') { + Single Account + } + @case ('JOINT') { + Joint Account + } + @case ('MINOR') { + Minor Account + } + @case ('SENIOR_CITIZEN') { + Senior Citizen + } + @default { + {{ recurringDepositAccountData.accountStatus }} + } + } + +
+ + + @if (recurringDepositAccountData.accountStatus === 'JOINT') { +
+
+ Mode of Operation + + @switch (recurringDepositAccountData.modeOfOperation) { + @case ('EITHER_OR_SURVIVOR') { + Either or Survivor + } + @case ('FORMER_OR_SURVIVOR') { + Former or Survivor + } + @case ('JOINTLY') { + Jointly + } + @case ('ANYONE_OR_SURVIVOR') { + Anyone or Survivor + } + @default { + {{ recurringDepositAccountData.modeOfOperation || '—' }} + } + } + +
+
+ @if (recurringDepositAccountData.jointHolders?.length) { +
+ + + + + + + + + + + + + @for (holder of recurringDepositAccountData.jointHolders; track holder.clientId; let i = $index) { + + + + + + + + + } + +
Sr.Holder NameCIF No.Ownership %SigningRole
{{ i + 1 }} + {{ holder.displayName || holder.clientName || '—' }} + @if (holder.isPrimary) { + Primary + } + {{ holder.cifNumber || holder.clientCif || '—' }}{{ holder.sharePercentage ?? '—' }}%{{ holder.isMandatory ? 'Mandatory' : 'Optional' }}{{ holder.isPrimary ? 'Primary Account Holder' : 'Co-Holder' }}
+
+ } + } + + + @if ( + recurringDepositAccountData.accountStatus === 'INDIVIDUAL_MALE' && recurringDepositAccountData.specialCategory + ) { +
+
+ Special Category + + @switch (recurringDepositAccountData.specialCategory) { + @case ('DEFENCE') { + Defence Personnel + } + @case ('EX_SERVICEMAN') { + Ex-Serviceman + } + @case ('GOVT_EMPLOYEE') { + Government Employee + } + @case ('PHYSICALLY_CHALLENGED') { + Physically Challenged + } + @case ('NRI') { + NRI (Non-Resident Indian) + } + @case ('NONE') { + None / General + } + @default { + {{ recurringDepositAccountData.specialCategory }} + } + } + +
+
+ } + + + @if ( + recurringDepositAccountData.accountStatus === 'INDIVIDUAL_FEMALE' && recurringDepositAccountData.weakerSection + ) { +
+
+ Weaker Section + + @switch (recurringDepositAccountData.weakerSection) { + @case ('BPL') { + BPL (Below Poverty Line) + } + @case ('SC_ST') { + SC / ST Category + } + @case ('MINORITY') { + Minority Community + } + @case ('SHG') { + Self Help Group Member + } + @case ('PMJDY') { + PMJDY Beneficiary + } + @case ('NONE') { + None / General + } + @default { + {{ recurringDepositAccountData.weakerSection }} + } + } + +
+
+ } + + + @if (recurringDepositAccountData.accountStatus === 'MINOR') { +
+ @if (recurringDepositAccountData.guardianName) { +
+ Guardian Name + {{ recurringDepositAccountData.guardianName }} +
+ } + @if (recurringDepositAccountData.guardianCifNumber) { +
+ Guardian CIF + {{ recurringDepositAccountData.guardianCifNumber }} +
+ } + @if (recurringDepositAccountData.guardianRelationship) { +
+ Relationship + {{ recurringDepositAccountData.guardianRelationship }} +
+ } + @if (recurringDepositAccountData.minorDateOfBirth) { +
+ Minor DOB + {{ recurringDepositAccountData.minorDateOfBirth }} +
+ } +
+ } +
+
+ } + + + @if (recurringDepositAccountData?.linkedAccountId) { +
+
+ + Linked Deposit Account + {{ recurringDepositAccountData.linkedAccountType }} +
+
+
+
+ Account No + {{ recurringDepositAccountData.linkedAccountNo }} +
+
+ Account Type + {{ recurringDepositAccountData.linkedAccountType }} +
+
+ Account ID + {{ recurringDepositAccountData.linkedAccountId }} +
+
+
+
+ } + @if ( recurringDepositsAccountProductTemplate?.accountType || 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 99d36156b..d64f7dfdd 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 @@ -16,18 +16,18 @@ // ── Section card ───────────────────────────────────────────────────────────── .preview-section { - border: 1px solid #e0e0e0; - border-radius: 8px; + border: 1px solid #e2e8f0; + border-radius: 10px; overflow: hidden; background: #fff; - box-shadow: 0 1px 3px rgb(0 0 0 / 6%); + box-shadow: 0 1px 4px rgb(0 0 0 / 5%); &__header { display: flex; align-items: center; gap: 8px; - background: #f5f5f5; - border-bottom: 1px solid #e0e0e0; + background: #f8fafc; + border-bottom: 1px solid #e2e8f0; padding: 0.6rem 1rem; } @@ -40,11 +40,11 @@ &__title { flex: 1; - font-size: 0.95rem; - font-weight: 600; - color: #333; + font-size: 0.82rem; + font-weight: 700; + color: #1e293b; text-transform: uppercase; - letter-spacing: 0.04em; + letter-spacing: 0.06em; } &__badge { @@ -93,7 +93,7 @@ // ── Grid ───────────────────────────────────────────────────────────────────── .preview-grid { display: grid; - gap: 0.75rem 1.5rem; + gap: 0.85rem 1.5rem; &--three { grid-template-columns: repeat(3, 1fr); @@ -116,33 +116,38 @@ } .preview-label { - font-size: 0.72rem; - color: #888; - font-weight: 500; + font-size: 0.68rem; + color: #94a3b8; + font-weight: 600; text-transform: uppercase; - letter-spacing: 0.04em; + letter-spacing: 0.05em; } .preview-value { - font-size: 0.92rem; - color: #222; + font-size: 0.9rem; + color: #1e293b; font-weight: 500; } // ── Yes/No badge ───────────────────────────────────────────────────────────── .preview-badge { display: inline-block; - padding: 0.1rem 0.55rem; + padding: 0.15rem 0.6rem; border-radius: 12px; - font-size: 0.78rem; + font-size: 0.75rem; font-weight: 600; - background: #ffebee; - color: #c62828; + background: #fef2f2; + color: #dc2626; width: fit-content; &--yes { - background: #e8f5e9; - color: #2e7d32; + background: #f0fdf4; + color: #15803d; + } + + &--warn { + background: #fef3c7; + color: #92400e; } } @@ -339,6 +344,81 @@ } } +// ── Status of Account (SOA) ─────────────────────────────────────────────────── +.preview-soa-status-row { + display: flex; + align-items: center; + gap: 10px; +} + +.preview-soa-tile { + display: inline-flex; + align-items: center; + gap: 8px; + padding: 8px 20px; + border-radius: 999px; + font-size: 14px; + font-weight: 700; + background: #eff6ff; + color: #1d4ed8; + border: 2px solid #bfdbfe; + + i { + font-size: 16px; + } +} + +.preview-soa-table-wrap { + margin-top: 14px; + overflow-x: auto; + border-radius: 8px; + border: 1px solid #e2e8f0; +} + +.preview-soa-tbl { + width: 100%; + border-collapse: collapse; + font-size: 13px; +} + +.preview-soa-th { + background: #f8fafc; + padding: 8px 12px; + text-align: left; + font-weight: 600; + color: #475569; + border-bottom: 1px solid #e2e8f0; + white-space: nowrap; +} + +.preview-soa-td { + padding: 10px 12px; + border-bottom: 1px solid #f1f5f9; + color: #0f172a; + vertical-align: middle; +} + +.preview-soa-tr--primary { + background: #f0f9ff; + + .preview-soa-td { + font-weight: 600; + } +} + +.preview-soa-primary-tag { + display: inline-block; + margin-left: 6px; + padding: 1px 8px; + border-radius: 999px; + font-size: 10px; + font-weight: 700; + background: #dbeafe; + color: #1d4ed8; + border: 1px solid #bfdbfe; + vertical-align: middle; +} + // ── Product feature flag rows (same style as details step) ──────────────────── .preview-feature-list { margin-top: 1rem; diff --git a/src/assets/images/current_account_placeholder.png b/src/assets/images/current_account_placeholder.png new file mode 100644 index 000000000..b45fe9be0 Binary files /dev/null and b/src/assets/images/current_account_placeholder.png differ diff --git a/src/environments/.env.ts b/src/environments/.env.ts index 2a3c8fdfb..8ce4b3249 100644 --- a/src/environments/.env.ts +++ b/src/environments/.env.ts @@ -9,8 +9,8 @@ /* tslint:disable */ export default { 'mifos_x': { - 'version': '260429', - 'hash': '0d3d8379' + 'version': '260430', + 'hash': '2d4fb423' }, 'allow_switching_backend_instance': true }; diff --git a/src/theme/_content.scss b/src/theme/_content.scss index 59cfb8d60..a10b404fc 100644 --- a/src/theme/_content.scss +++ b/src/theme/_content.scss @@ -31,7 +31,8 @@ mifosx-loans-view, mifosx-shares-account-view, mifosx-recurring-deposits-account-view, - mifosx-savings-account-view { + mifosx-savings-account-view, + mifosx-current-account-account-view { .account-card { margin: 0 auto; max-width: 90rem; @@ -98,7 +99,8 @@ } .content { - .savings-account-tables { + .savings-account-tables, + .current-account-tables { padding: 1%; margin: 1%; diff --git a/src/theme/_dark_content.scss b/src/theme/_dark_content.scss index d3351b424..93b96e50f 100644 --- a/src/theme/_dark_content.scss +++ b/src/theme/_dark_content.scss @@ -69,7 +69,8 @@ mifosx-loans-view, mifosx-shares-account-view, mifosx-recurring-deposits-account-view, - mifosx-savings-account-view { + mifosx-savings-account-view, + mifosx-current-account-account-view { .account-card { margin: 0 auto; max-width: 90rem; @@ -137,7 +138,8 @@ } .content { - .savings-account-tables { + .savings-account-tables, + .current-account-tables { padding: 1%; margin: 1%;