diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-charges-step/fixed-deposit-product-charges-step.component.scss b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-charges-step/fixed-deposit-product-charges-step.component.scss
index ccfe94921..21e98cf16 100644
--- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-charges-step/fixed-deposit-product-charges-step.component.scss
+++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-charges-step/fixed-deposit-product-charges-step.component.scss
@@ -12,10 +12,6 @@
overflow: hidden;
background: #fff;
- & + & {
- margin-top: 16px;
- }
-
&__header {
display: flex;
align-items: center;
@@ -36,30 +32,22 @@
color: #202124;
}
}
-}
-.fdpch-grid {
- display: grid;
- grid-template-columns: repeat(2, 1fr);
- gap: 4px 16px;
- padding: 16px 24px;
-
- @media (width <= 600px) {
- grid-template-columns: 1fr;
+ &__body {
+ padding: 16px 24px;
}
}
-.fdpch-field {
- width: 100%;
-
- &--full {
- grid-column: 1 / -1;
- }
-}
-
-.fdpch-btn-wrap {
+.fdpch-add-row {
display: flex;
align-items: center;
+ gap: 16px;
+ flex-wrap: wrap;
+
+ &__select {
+ flex: 1;
+ min-width: 200px;
+ }
}
.fdpch-add-btn {
@@ -73,7 +61,7 @@
border: 1px solid #e2e8f0;
border-radius: 8px;
overflow: hidden;
- margin: 0 24px 16px;
+ margin-top: 12px;
table {
width: 100%;
diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-currency-step/fixed-deposit-product-currency-step.component.html b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-currency-step/fixed-deposit-product-currency-step.component.html
index 68ed1a8f3..df8a5251d 100644
--- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-currency-step/fixed-deposit-product-currency-step.component.html
+++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-currency-step/fixed-deposit-product-currency-step.component.html
@@ -10,60 +10,102 @@
-
-
- {{ 'labels.inputs.Currency' | translate }}
-
- @for (currency of currencyData; track currency) {
-
- {{ currency.name }}
-
- }
-
-
- {{ 'labels.inputs.Currency' | translate }} {{ 'labels.commons.is' | translate }}
- {{ 'labels.commons.required' | translate }}
-
-
-
-
- {{ 'labels.inputs.Decimal Places' | translate }}
-
-
- {{ 'labels.inputs.Decimal Places' | translate }} {{ 'labels.commons.is' | translate }}
- {{ 'labels.commons.required' | translate }}
-
-
- {{ 'labels.inputs.Decimal Places' | translate }} {{ 'labels.commons.Minimum Value must be' | translate }}
- 0
-
-
-
-
-
- {{ 'labels.inputs.Set the fixed deposit installment in multiples of' | translate }}
-
-
-
- @if (fixedDepositProductCurrencyForm.value.setMultiples) {
+
+
- {{ 'labels.inputs.Currency in multiples of' | translate }}
-
+ {{ 'labels.inputs.Currency' | translate }}
+
+ @for (currency of currencyData; track currency) {
+
+ {{ currency.name }}
+
+ }
+
+ Default: Indian Rupee - auto-set for domestic products
- {{ 'labels.inputs.Currency in multiples of' | translate }} {{ 'labels.commons.is' | translate }}
+ {{ 'labels.inputs.Currency' | translate }} {{ 'labels.commons.is' | translate }}
{{ 'labels.commons.required' | translate }}
- }
+
+
+ {{ 'labels.inputs.Decimal Places' | translate }}
+
+ @for (places of decimalPlacesData; track places) {
+ {{ places }}
+ }
+
+
+ {{ 'labels.inputs.Decimal Places' | translate }} {{ 'labels.commons.is' | translate }}
+ {{ 'labels.commons.required' | translate }}
+
+
+
+
+
+
+
Dormancy Alert
+
Enable automated notifications when an account becomes inactive based on product rules.
+
+
+ yes
+ no
+
+
+
+
+
+
Balance Swap Option
+
Enable automated transfer of excess funds to linked deposits or vice-versa to maintain liquidity.
+
+
+ yes
+ no
+
+
+
+
+
+
MSME
+
Micro, Small and Medium Enterprises
+
+
+ yes
+ no
+
+
+
+
+
+
Nomination Facility
+
Allow account holders to designate individuals to receive funds in the event of account holder's death.
+
+
+ yes
+ no
+
+
+
+
+
+
Auto Debit Facility
+
Enable automatic deduction of funds for recurring payments, utility bills, or EMI obligations.
+
+
+ yes
+ no
+
+
diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-currency-step/fixed-deposit-product-currency-step.component.scss b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-currency-step/fixed-deposit-product-currency-step.component.scss
index fe1c47dc5..f32a534a6 100644
--- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-currency-step/fixed-deposit-product-currency-step.component.scss
+++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-currency-step/fixed-deposit-product-currency-step.component.scss
@@ -6,8 +6,14 @@
* 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;
+
.fdpc-section {
- border: 1px solid #e2e8f0;
+ border: 1px solid $border;
border-radius: 10px;
overflow: hidden;
background: #fff;
@@ -21,23 +27,27 @@
align-items: center;
gap: 10px;
padding: 12px 24px;
- background: #f8f9fa;
- border-bottom: 1px solid #e8eaed;
+ background: $gray-50;
+ border-bottom: 1px solid $gray-200;
i {
font-size: 14px;
- color: #0ea5e9;
+ color: $accent;
}
- h3 {
+ span {
margin: 0;
font-size: 14px;
font-weight: 600;
- color: #202124;
+ color: $gray-900;
}
}
}
+.fdpc-body {
+ background: #fff;
+}
+
.fdpc-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
@@ -51,14 +61,43 @@
.fdpc-field {
width: 100%;
-
- &--full {
- grid-column: 1 / -1;
- }
}
-.fdpc-checkbox-row {
+.fdpc-alert {
display: flex;
align-items: center;
- padding: 4px 0;
+ 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;
+ }
}
diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-currency-step/fixed-deposit-product-currency-step.component.ts b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-currency-step/fixed-deposit-product-currency-step.component.ts
index 3fb6c6f2d..6e0466dfa 100644
--- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-currency-step/fixed-deposit-product-currency-step.component.ts
+++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-currency-step/fixed-deposit-product-currency-step.component.ts
@@ -6,12 +6,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-import { Component, OnInit, Input, inject, DestroyRef } from '@angular/core';
-import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
-import { startWith } from 'rxjs/operators';
-import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
-import { MatCheckbox } from '@angular/material/checkbox';
+import { Component, OnInit, Input, inject } from '@angular/core';
+import { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';
import { MatTooltip } from '@angular/material/tooltip';
+import { MatRadioGroup, MatRadioButton } from '@angular/material/radio';
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
@Component({
@@ -21,18 +19,23 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
imports: [
...STANDALONE_SHARED_IMPORTS,
MatTooltip,
- MatCheckbox
+ MatRadioGroup,
+ MatRadioButton
]
})
export class FixedDepositProductCurrencyStepComponent implements OnInit {
private formBuilder = inject(UntypedFormBuilder);
- private destroyRef = inject(DestroyRef);
@Input() fixedDepositProductsTemplate: any;
fixedDepositProductCurrencyForm: UntypedFormGroup;
currencyData: any;
+ decimalPlacesData = [
+ 2,
+ 0,
+ 3
+ ];
constructor() {
this.createFixedDepositProductCurrencyForm();
@@ -42,13 +45,17 @@ export class FixedDepositProductCurrencyStepComponent implements OnInit {
this.currencyData = this.fixedDepositProductsTemplate.currencyOptions;
this.fixedDepositProductCurrencyForm.patchValue({
- currencyCode: this.fixedDepositProductsTemplate.currency?.code || this.currencyData[0].code,
- digitsAfterDecimal: this.fixedDepositProductsTemplate.digitsAfterDecimal ?? '',
- setMultiples: !!this.fixedDepositProductsTemplate.inMultiplesOf,
- inMultiplesOf: this.fixedDepositProductsTemplate.inMultiplesOf ?? ''
+ currencyCode: this.fixedDepositProductsTemplate.currency?.code || this.currencyData?.[0]?.code || '',
+ digitsAfterDecimal:
+ this.fixedDepositProductsTemplate.digitsAfterDecimal ??
+ this.fixedDepositProductsTemplate.currency?.decimalPlaces ??
+ 2,
+ dormancyAlert: this.fixedDepositProductsTemplate.dormancyAlert ?? false,
+ balanceSwapOption: this.fixedDepositProductsTemplate.balanceSwapOption ?? false,
+ msme: this.fixedDepositProductsTemplate.msme ?? false,
+ nominationFacility: this.fixedDepositProductsTemplate.nominationFacility ?? false,
+ autoDebitFacility: this.fixedDepositProductsTemplate.autoDebitFacility ?? false
});
-
- this.setupConditionalValidation();
}
createFixedDepositProductCurrencyForm() {
@@ -58,48 +65,30 @@ export class FixedDepositProductCurrencyStepComponent implements OnInit {
Validators.required
],
digitsAfterDecimal: [
- '',
+ 2,
[
Validators.required,
Validators.min(0)
]
],
- setMultiples: [false],
- inMultiplesOf: ['']
+ dormancyAlert: [false],
+ balanceSwapOption: [false],
+ msme: [false],
+ nominationFacility: [false],
+ autoDebitFacility: [false]
});
}
- setupConditionalValidation() {
- const inMultiplesOfControl = this.fixedDepositProductCurrencyForm.get('inMultiplesOf');
- const setMultiplesControl = this.fixedDepositProductCurrencyForm.get('setMultiples');
-
- setMultiplesControl?.valueChanges
- .pipe(startWith(setMultiplesControl.value), takeUntilDestroyed(this.destroyRef))
- .subscribe((checked) => {
- if (checked) {
- inMultiplesOfControl?.setValidators([
- Validators.required,
- Validators.min(1)
- ]);
- } else {
- inMultiplesOfControl?.clearValidators();
- inMultiplesOfControl?.setValue('');
- }
- inMultiplesOfControl?.updateValueAndValidity();
- });
- }
-
get fixedDepositProductCurrency() {
const formValue = this.fixedDepositProductCurrencyForm.value;
- const result: any = {
+ return {
currencyCode: formValue.currencyCode,
- digitsAfterDecimal: formValue.digitsAfterDecimal
+ digitsAfterDecimal: formValue.digitsAfterDecimal,
+ dormancyAlert: formValue.dormancyAlert,
+ balanceSwapOption: formValue.balanceSwapOption,
+ msme: formValue.msme,
+ nominationFacility: formValue.nominationFacility,
+ autoDebitFacility: formValue.autoDebitFacility
};
-
- if (formValue.inMultiplesOf !== '' && formValue.inMultiplesOf !== null && formValue.inMultiplesOf !== undefined) {
- result.inMultiplesOf = formValue.inMultiplesOf;
- }
-
- return result;
}
}
diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-details-step/fixed-deposit-product-details-step.component.html b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-details-step/fixed-deposit-product-details-step.component.html
index 92f540da7..98add2dc8 100644
--- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-details-step/fixed-deposit-product-details-step.component.html
+++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-details-step/fixed-deposit-product-details-step.component.html
@@ -9,13 +9,18 @@
diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-details-step/fixed-deposit-product-details-step.component.scss b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-details-step/fixed-deposit-product-details-step.component.scss
index 7747019fc..59c20ba02 100644
--- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-details-step/fixed-deposit-product-details-step.component.scss
+++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-details-step/fixed-deposit-product-details-step.component.scss
@@ -6,8 +6,14 @@
* 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;
+
.fdpd-section {
- border: 1px solid #e2e8f0;
+ border: 1px solid $border;
border-radius: 10px;
overflow: hidden;
background: #fff;
@@ -21,19 +27,19 @@
align-items: center;
gap: 10px;
padding: 12px 24px;
- background: #f8f9fa;
- border-bottom: 1px solid #e8eaed;
+ background: $gray-50;
+ border-bottom: 1px solid $gray-200;
i {
font-size: 14px;
- color: #0ea5e9;
+ color: $accent;
}
h3 {
margin: 0;
font-size: 14px;
font-weight: 600;
- color: #202124;
+ color: $gray-900;
}
}
}
@@ -49,6 +55,18 @@
}
}
+.fdpd-grid--classification {
+ grid-template-columns: repeat(3, 1fr);
+
+ @media (width <= 900px) {
+ grid-template-columns: repeat(2, 1fr);
+ }
+
+ @media (width <= 600px) {
+ grid-template-columns: 1fr;
+ }
+}
+
.fdpd-field {
width: 100%;
@@ -56,3 +74,9 @@
grid-column: 1 / -1;
}
}
+
+.fdpd-checkbox-row {
+ display: flex;
+ align-items: center;
+ min-height: 56px;
+}
diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-details-step/fixed-deposit-product-details-step.component.ts b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-details-step/fixed-deposit-product-details-step.component.ts
index bce5e5a57..30b91dffb 100644
--- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-details-step/fixed-deposit-product-details-step.component.ts
+++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-details-step/fixed-deposit-product-details-step.component.ts
@@ -6,8 +6,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-import { Component, OnInit, Input, inject } from '@angular/core';
-import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
+import { Component, OnInit, OnChanges, Input, SimpleChanges, inject, ChangeDetectorRef } from '@angular/core';
+import { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';
+import { CdkTextareaAutosize } from '@angular/cdk/text-field';
+import { MatTooltip } from '@angular/material/tooltip';
+import { Dates } from 'app/core/utils/dates';
+import { SettingsService } from 'app/settings/settings.service';
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
@Component({
@@ -15,27 +19,41 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
templateUrl: './fixed-deposit-product-details-step.component.html',
styleUrls: ['./fixed-deposit-product-details-step.component.scss'],
imports: [
- ...STANDALONE_SHARED_IMPORTS
+ ...STANDALONE_SHARED_IMPORTS,
+ CdkTextareaAutosize,
+ MatTooltip
]
})
-export class FixedDepositProductDetailsStepComponent implements OnInit {
+export class FixedDepositProductDetailsStepComponent implements OnInit, OnChanges {
private formBuilder = inject(UntypedFormBuilder);
+ private dateUtils = inject(Dates);
+ private settingsService = inject(SettingsService);
+ private cdr = inject(ChangeDetectorRef);
@Input() fixedDepositProductsTemplate: any;
fixedDepositProductDetailsForm: UntypedFormGroup;
+ accountTypeData: string[] = [];
+ customerSegmentData: string[] = [];
+ liabilityAccountOptions: any[] = [];
+ yesNoOptions: Array<{ value: boolean; label: string }> = [
+ { value: true, label: 'Yes' },
+ { value: false, label: 'No' }
+ ];
constructor() {
this.createFixedDepositProductDetailsForm();
}
ngOnInit() {
- if (!(this.fixedDepositProductsTemplate === undefined) && this.fixedDepositProductsTemplate.id) {
- this.fixedDepositProductDetailsForm.patchValue({
- name: this.fixedDepositProductsTemplate.name,
- shortName: this.fixedDepositProductsTemplate.shortName,
- description: this.fixedDepositProductsTemplate.description
- });
+ if (this.fixedDepositProductsTemplate) {
+ this.applyTemplate(this.fixedDepositProductsTemplate);
+ }
+ }
+
+ ngOnChanges(changes: SimpleChanges) {
+ if (changes.fixedDepositProductsTemplate?.currentValue) {
+ this.applyTemplate(changes.fixedDepositProductsTemplate.currentValue);
}
}
@@ -49,14 +67,66 @@ export class FixedDepositProductDetailsStepComponent implements OnInit {
'',
Validators.required
],
- description: [
- '',
+ description: [''],
+ accountType: [
+ null,
Validators.required
- ]
+ ],
+ customerSegment: [null],
+ glAccountId: [null],
+ effectiveTo: [''],
+ endDate: [''],
+ introducerRequired: [false],
+ shareLinkingEnabled: [false]
+ });
+ }
+
+ private getOptionNames(options: any[]): string[] {
+ if (!Array.isArray(options)) return [];
+ return options.map((o) => o?.name ?? o?.value ?? o).filter((v) => typeof v === 'string' && v.trim().length > 0);
+ }
+
+ private parseDate(dateValue: any): Date | null {
+ if (!dateValue) return null;
+ if (Array.isArray(dateValue)) return new Date(dateValue[0], dateValue[1] - 1, dateValue[2]);
+ if (dateValue instanceof Date) return dateValue;
+ return new Date(dateValue);
+ }
+
+ compareById(o1: any, o2: any): boolean {
+ return o1 != null && o2 != null && Number(o1) === Number(o2);
+ }
+
+ private applyTemplate(template: any) {
+ this.accountTypeData = this.getOptionNames(template.accountTypeOptions);
+ this.customerSegmentData = this.getOptionNames(template.customerSegmentOptions);
+ this.liabilityAccountOptions = template.accountingMappingOptions?.liabilityAccountOptions ?? [];
+ this.cdr.detectChanges();
+
+ const isEditing = !!template.id;
+ this.fixedDepositProductDetailsForm.patchValue({
+ name: isEditing ? template.name : template.name || '',
+ shortName: isEditing ? template.shortName : template.shortName || '',
+ description: template.description || '',
+ accountType: template.accountType ?? this.accountTypeData[0] ?? null,
+ customerSegment: template.customerSegment ?? this.customerSegmentData[0] ?? null,
+ glAccountId: template.glAccountId ?? null,
+ effectiveTo: this.parseDate(template.effectiveTo),
+ endDate: this.parseDate(template.endDate),
+ introducerRequired: template.introducerRequired === true || template.introducerRequired === 'Yes',
+ shareLinkingEnabled: !!template.shareLinkingEnabled
});
}
get fixedDepositProductDetails() {
- return this.fixedDepositProductDetailsForm.value;
+ const formValue = { ...this.fixedDepositProductDetailsForm.value };
+ const dateFormat = this.settingsService.dateFormat;
+ if (formValue.effectiveTo instanceof Date) {
+ formValue.effectiveTo = this.dateUtils.formatDate(formValue.effectiveTo, dateFormat) || '';
+ }
+ if (formValue.endDate instanceof Date) {
+ formValue.endDate = this.dateUtils.formatDate(formValue.endDate, dateFormat) || '';
+ }
+ return formValue;
}
}
diff --git a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-settings-step/fixed-deposit-product-settings-step.component.html b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-settings-step/fixed-deposit-product-settings-step.component.html
index 5c8f66550..7843f2654 100644
--- a/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-settings-step/fixed-deposit-product-settings-step.component.html
+++ b/src/app/products/fixed-deposit-products/fixed-deposit-product-stepper/fixed-deposit-product-settings-step/fixed-deposit-product-settings-step.component.html
@@ -7,204 +7,124 @@
-->