rd account save api update

This commit is contained in:
Nitesh Yadav
2026-04-30 16:20:35 +05:30
parent 22c9375a55
commit 58cef1c20b
8 changed files with 384 additions and 43 deletions
@@ -145,22 +145,41 @@ export class CreateRecurringDepositsAccountComponent {
const locale = this.settingsService.language.code; const locale = this.settingsService.language.code;
const dateFormat = this.settingsService.dateFormat; const dateFormat = this.settingsService.dateFormat;
const monthDayFormat = 'dd MMMM'; const monthDayFormat = 'dd MMMM';
const recurringDepositAccount = {
...this.recurringDepositAccount, const details = this.recurringDepositAccount;
...this.recurringDepositsAccountCurrencyStep.currencyStepData, const currencyStep = this.recurringDepositsAccountCurrencyStep;
const recurringDepositAccount: any = {
...details,
clientId: this.recurringDepositsAccountTemplate.clientId, clientId: this.recurringDepositsAccountTemplate.clientId,
charges: [], charges: [],
isCalendarInherited: false, isCalendarInherited: false,
submittedOnDate: this.dateUtils.formatDate(this.recurringDepositAccount.submittedOnDate, dateFormat), mandatoryRecommendedDepositAmount: 0,
expectedFirstDepositOnDate: this.dateUtils.formatDate( recurringFrequency: 1,
this.recurringDepositAccount.expectedFirstDepositOnDate, recurringFrequencyType: 2,
dateFormat submittedOnDate: this.dateUtils.formatDate(details.submittedOnDate, dateFormat),
), expectedFirstDepositOnDate: this.dateUtils.formatDate(details.expectedFirstDepositOnDate, dateFormat),
dateFormat, dateFormat,
monthDayFormat, 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.recurringDepositsService.createRecurringDepositAccount(recurringDepositAccount).subscribe((response: any) => {
this.router.navigate( this.router.navigate(
[ [
@@ -494,6 +494,13 @@ export class RecurringDepositsAccountDetailsStepComponent implements OnInit {
get recurringDepositAccountDetails() { get recurringDepositAccountDetails() {
const value = this.recurringDepositAccountDetailsForm.value; const value = this.recurringDepositAccountDetailsForm.value;
if (this.selectedAccountType) {
value.accountType = this.selectedAccountType;
}
if (this.selectedCustomerSegment) {
value.customerSegment = this.selectedCustomerSegment;
}
if (this.selectedAccountStatus) { if (this.selectedAccountStatus) {
value.accountStatus = this.selectedAccountStatus; value.accountStatus = this.selectedAccountStatus;
} }
@@ -503,8 +510,8 @@ export class RecurringDepositsAccountDetailsStepComponent implements OnInit {
value.jointHolders = [ value.jointHolders = [
{ {
clientId: this.primaryClientId, clientId: this.primaryClientId,
clientName: this.primaryClientName, displayName: this.primaryClientName,
clientCif: this.primaryClientCif, cifNumber: this.primaryClientCif,
sharePercentage: this.primaryHolderShare, sharePercentage: this.primaryHolderShare,
isMandatory: true, isMandatory: true,
isPrimary: true, isPrimary: true,
@@ -513,8 +520,8 @@ export class RecurringDepositsAccountDetailsStepComponent implements OnInit {
}, },
...this.jointHolders.map((h) => ({ ...this.jointHolders.map((h) => ({
clientId: h.clientId, clientId: h.clientId,
clientName: h.clientName, displayName: h.clientName,
clientCif: h.clientCif, cifNumber: h.clientCif,
sharePercentage: h.sharePercentage, sharePercentage: h.sharePercentage,
isMandatory: h.isMandatory, isMandatory: h.isMandatory,
isPrimary: false, isPrimary: false,
@@ -535,9 +542,9 @@ export class RecurringDepositsAccountDetailsStepComponent implements OnInit {
if (this.selectedAccountStatus === 'MINOR') { if (this.selectedAccountStatus === 'MINOR') {
value.guardianClientId = this.guardianClientId; value.guardianClientId = this.guardianClientId;
value.guardianName = this.guardianName; value.guardianName = this.guardianName;
value.guardianCif = this.guardianCif; value.guardianCifNumber = this.guardianCif;
value.guardianRelationship = this.guardianRelationship; 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) { if (this.selectedLinkedAccount) {
@@ -43,6 +43,237 @@
</div> </div>
</div> </div>
<!-- ══ 1b. Status of Account ════════════════════════════════════ -->
@if (recurringDepositAccountData?.accountStatus) {
<div class="preview-section">
<div class="preview-section__header">
<i class="fas fa-id-card preview-section__icon"></i>
<span class="preview-section__title">Status of Account</span>
<span class="preview-section__badge">RBI Guidelines</span>
</div>
<div class="preview-body">
<!-- Status Tile -->
<div class="preview-soa-status-row">
<span class="preview-soa-tile">
@switch (recurringDepositAccountData.accountStatus) {
@case ('INDIVIDUAL_MALE') {
<i class="fas fa-male"></i> Individual (Male)
}
@case ('INDIVIDUAL_FEMALE') {
<i class="fas fa-female"></i> Individual (Female)
}
@case ('SINGLE') {
<i class="fas fa-user-circle"></i> Single Account
}
@case ('JOINT') {
<i class="fas fa-users"></i> Joint Account
}
@case ('MINOR') {
<i class="fas fa-child"></i> Minor Account
}
@case ('SENIOR_CITIZEN') {
<i class="fas fa-user-clock"></i> Senior Citizen
}
@default {
{{ recurringDepositAccountData.accountStatus }}
}
}
</span>
</div>
<!-- JOINT: Mode of Operation + Holders Table -->
@if (recurringDepositAccountData.accountStatus === 'JOINT') {
<div class="preview-grid preview-grid--three" style="margin-top: 12px">
<div class="preview-field">
<span class="preview-label">Mode of Operation</span>
<span class="preview-value">
@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 || '—' }}
}
}
</span>
</div>
</div>
@if (recurringDepositAccountData.jointHolders?.length) {
<div class="preview-soa-table-wrap">
<table class="preview-soa-tbl">
<thead>
<tr>
<th class="preview-soa-th">Sr.</th>
<th class="preview-soa-th">Holder Name</th>
<th class="preview-soa-th">CIF No.</th>
<th class="preview-soa-th">Ownership %</th>
<th class="preview-soa-th">Signing</th>
<th class="preview-soa-th">Role</th>
</tr>
</thead>
<tbody>
@for (holder of recurringDepositAccountData.jointHolders; track holder.clientId; let i = $index) {
<tr [class.preview-soa-tr--primary]="holder.isPrimary">
<td class="preview-soa-td">{{ i + 1 }}</td>
<td class="preview-soa-td">
{{ holder.displayName || holder.clientName || '—' }}
@if (holder.isPrimary) {
<span class="preview-soa-primary-tag">Primary</span>
}
</td>
<td class="preview-soa-td preview-mono">{{ holder.cifNumber || holder.clientCif || '—' }}</td>
<td class="preview-soa-td">{{ holder.sharePercentage ?? '—' }}%</td>
<td class="preview-soa-td">{{ holder.isMandatory ? 'Mandatory' : 'Optional' }}</td>
<td class="preview-soa-td">{{ holder.isPrimary ? 'Primary Account Holder' : 'Co-Holder' }}</td>
</tr>
}
</tbody>
</table>
</div>
}
}
<!-- INDIVIDUAL_MALE: Special Category -->
@if (
recurringDepositAccountData.accountStatus === 'INDIVIDUAL_MALE' && recurringDepositAccountData.specialCategory
) {
<div class="preview-grid preview-grid--three" style="margin-top: 12px">
<div class="preview-field">
<span class="preview-label">Special Category</span>
<span class="preview-value">
@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 }}
}
}
</span>
</div>
</div>
}
<!-- INDIVIDUAL_FEMALE: Weaker Section -->
@if (
recurringDepositAccountData.accountStatus === 'INDIVIDUAL_FEMALE' && recurringDepositAccountData.weakerSection
) {
<div class="preview-grid preview-grid--three" style="margin-top: 12px">
<div class="preview-field">
<span class="preview-label">Weaker Section</span>
<span class="preview-value">
@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 }}
}
}
</span>
</div>
</div>
}
<!-- MINOR: Guardian Details -->
@if (recurringDepositAccountData.accountStatus === 'MINOR') {
<div class="preview-grid preview-grid--three" style="margin-top: 12px">
@if (recurringDepositAccountData.guardianName) {
<div class="preview-field">
<span class="preview-label">Guardian Name</span>
<span class="preview-value">{{ recurringDepositAccountData.guardianName }}</span>
</div>
}
@if (recurringDepositAccountData.guardianCifNumber) {
<div class="preview-field">
<span class="preview-label">Guardian CIF</span>
<span class="preview-value preview-mono">{{ recurringDepositAccountData.guardianCifNumber }}</span>
</div>
}
@if (recurringDepositAccountData.guardianRelationship) {
<div class="preview-field">
<span class="preview-label">Relationship</span>
<span class="preview-value">{{ recurringDepositAccountData.guardianRelationship }}</span>
</div>
}
@if (recurringDepositAccountData.minorDateOfBirth) {
<div class="preview-field">
<span class="preview-label">Minor DOB</span>
<span class="preview-value">{{ recurringDepositAccountData.minorDateOfBirth }}</span>
</div>
}
</div>
}
</div>
</div>
}
<!-- ══ 1c. Linked Account ════════════════════════════════════════ -->
@if (recurringDepositAccountData?.linkedAccountId) {
<div class="preview-section">
<div class="preview-section__header">
<i class="fas fa-link preview-section__icon"></i>
<span class="preview-section__title">Linked Deposit Account</span>
<span class="preview-section__badge">{{ recurringDepositAccountData.linkedAccountType }}</span>
</div>
<div class="preview-body">
<div class="preview-grid preview-grid--three">
<div class="preview-field">
<span class="preview-label">Account No</span>
<span class="preview-value preview-mono">{{ recurringDepositAccountData.linkedAccountNo }}</span>
</div>
<div class="preview-field">
<span class="preview-label">Account Type</span>
<span class="preview-value">{{ recurringDepositAccountData.linkedAccountType }}</span>
</div>
<div class="preview-field">
<span class="preview-label">Account ID</span>
<span class="preview-value preview-mono">{{ recurringDepositAccountData.linkedAccountId }}</span>
</div>
</div>
</div>
</div>
}
<!-- ══ 2. Product Classification ════════════════════════════════ --> <!-- ══ 2. Product Classification ════════════════════════════════ -->
@if ( @if (
recurringDepositsAccountProductTemplate?.accountType || recurringDepositsAccountProductTemplate?.accountType ||
@@ -16,18 +16,18 @@
// ── Section card ───────────────────────────────────────────────────────────── // ── Section card ─────────────────────────────────────────────────────────────
.preview-section { .preview-section {
border: 1px solid #e0e0e0; border: 1px solid #e2e8f0;
border-radius: 8px; border-radius: 10px;
overflow: hidden; overflow: hidden;
background: #fff; background: #fff;
box-shadow: 0 1px 3px rgb(0 0 0 / 6%); box-shadow: 0 1px 4px rgb(0 0 0 / 5%);
&__header { &__header {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 8px; gap: 8px;
background: #f5f5f5; background: #f8fafc;
border-bottom: 1px solid #e0e0e0; border-bottom: 1px solid #e2e8f0;
padding: 0.6rem 1rem; padding: 0.6rem 1rem;
} }
@@ -40,11 +40,11 @@
&__title { &__title {
flex: 1; flex: 1;
font-size: 0.95rem; font-size: 0.82rem;
font-weight: 600; font-weight: 700;
color: #333; color: #1e293b;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.04em; letter-spacing: 0.06em;
} }
&__badge { &__badge {
@@ -93,7 +93,7 @@
// ── Grid ───────────────────────────────────────────────────────────────────── // ── Grid ─────────────────────────────────────────────────────────────────────
.preview-grid { .preview-grid {
display: grid; display: grid;
gap: 0.75rem 1.5rem; gap: 0.85rem 1.5rem;
&--three { &--three {
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(3, 1fr);
@@ -116,33 +116,38 @@
} }
.preview-label { .preview-label {
font-size: 0.72rem; font-size: 0.68rem;
color: #888; color: #94a3b8;
font-weight: 500; font-weight: 600;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.04em; letter-spacing: 0.05em;
} }
.preview-value { .preview-value {
font-size: 0.92rem; font-size: 0.9rem;
color: #222; color: #1e293b;
font-weight: 500; font-weight: 500;
} }
// ── Yes/No badge ───────────────────────────────────────────────────────────── // ── Yes/No badge ─────────────────────────────────────────────────────────────
.preview-badge { .preview-badge {
display: inline-block; display: inline-block;
padding: 0.1rem 0.55rem; padding: 0.15rem 0.6rem;
border-radius: 12px; border-radius: 12px;
font-size: 0.78rem; font-size: 0.75rem;
font-weight: 600; font-weight: 600;
background: #ffebee; background: #fef2f2;
color: #c62828; color: #dc2626;
width: fit-content; width: fit-content;
&--yes { &--yes {
background: #e8f5e9; background: #f0fdf4;
color: #2e7d32; 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) ──────────────────── // ── Product feature flag rows (same style as details step) ────────────────────
.preview-feature-list { .preview-feature-list {
margin-top: 1rem; margin-top: 1rem;
Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

+2 -2
View File
@@ -9,8 +9,8 @@
/* tslint:disable */ /* tslint:disable */
export default { export default {
'mifos_x': { 'mifos_x': {
'version': '260429', 'version': '260430',
'hash': '0d3d8379' 'hash': '2d4fb423'
}, },
'allow_switching_backend_instance': true 'allow_switching_backend_instance': true
}; };
+4 -2
View File
@@ -31,7 +31,8 @@
mifosx-loans-view, mifosx-loans-view,
mifosx-shares-account-view, mifosx-shares-account-view,
mifosx-recurring-deposits-account-view, mifosx-recurring-deposits-account-view,
mifosx-savings-account-view { mifosx-savings-account-view,
mifosx-current-account-account-view {
.account-card { .account-card {
margin: 0 auto; margin: 0 auto;
max-width: 90rem; max-width: 90rem;
@@ -98,7 +99,8 @@
} }
.content { .content {
.savings-account-tables { .savings-account-tables,
.current-account-tables {
padding: 1%; padding: 1%;
margin: 1%; margin: 1%;
+4 -2
View File
@@ -69,7 +69,8 @@
mifosx-loans-view, mifosx-loans-view,
mifosx-shares-account-view, mifosx-shares-account-view,
mifosx-recurring-deposits-account-view, mifosx-recurring-deposits-account-view,
mifosx-savings-account-view { mifosx-savings-account-view,
mifosx-current-account-account-view {
.account-card { .account-card {
margin: 0 auto; margin: 0 auto;
max-width: 90rem; max-width: 90rem;
@@ -137,7 +138,8 @@
} }
.content { .content {
.savings-account-tables { .savings-account-tables,
.current-account-tables {
padding: 1%; padding: 1%;
margin: 1%; margin: 1%;