+ This approves and activates the account in one step -- it goes straight to Active.
{{ 'labels.inputs.Approved On Date' | translate }}
diff --git a/src/app/current-accounts/current-account-actions/approve-current-account/approve-current-account.component.ts b/src/app/current-accounts/current-account-actions/approve-current-account/approve-current-account.component.ts
index ca8791c73..f71db9650 100644
--- a/src/app/current-accounts/current-account-actions/approve-current-account/approve-current-account.component.ts
+++ b/src/app/current-accounts/current-account-actions/approve-current-account/approve-current-account.component.ts
@@ -81,8 +81,9 @@ export class ApproveCurrentAccountComponent implements OnInit {
}
/**
- * Submits the form and approves the current account,
- * if successful redirects to the current account.
+ * Submits the form, approves the current account, then immediately activates it on the same
+ * date -- Approve and Activate are still two separate Fineract commands underneath (each shows
+ * up in the audit trail), but the officer only sees and clicks through one step.
*/
submit() {
const approveCurrentAccountFormData = this.approveCurrentAccountForm.value;
@@ -98,7 +99,16 @@ export class ApproveCurrentAccountComponent implements OnInit {
locale
};
this.currentAccountsService.executeCurrentAccountCommand(this.accountId, 'approve', data).subscribe(() => {
- this.router.navigate(['../../transactions'], { relativeTo: this.route });
+ const activationData = {
+ activatedOnDate: approveCurrentAccountFormData.approvedOnDate,
+ dateFormat,
+ locale
+ };
+ this.currentAccountsService
+ .executeCurrentAccountCommand(this.accountId, 'activate', activationData)
+ .subscribe(() => {
+ this.router.navigate(['../../transactions'], { relativeTo: this.route });
+ });
});
}
}
diff --git a/src/app/current-accounts/current-account-actions/current-account-actions.component.html b/src/app/current-accounts/current-account-actions/current-account-actions.component.html
index b89775310..b1442a445 100644
--- a/src/app/current-accounts/current-account-actions/current-account-actions.component.html
+++ b/src/app/current-accounts/current-account-actions/current-account-actions.component.html
@@ -13,9 +13,7 @@
}
@if (actions['Activate']) {
-
+
}
@if (actions['Undo Approval']) {
diff --git a/src/app/current-accounts/current-account-stepper/current-account-digital-step/current-account-digital-step.component.html b/src/app/current-accounts/current-account-stepper/current-account-digital-step/current-account-digital-step.component.html
index ae448a85a..f13275c06 100644
--- a/src/app/current-accounts/current-account-stepper/current-account-digital-step/current-account-digital-step.component.html
+++ b/src/app/current-accounts/current-account-stepper/current-account-digital-step/current-account-digital-step.component.html
@@ -15,7 +15,6 @@
-
diff --git a/src/app/current-accounts/current-account-stepper/current-account-digital-step/current-account-digital-step.component.ts b/src/app/current-accounts/current-account-stepper/current-account-digital-step/current-account-digital-step.component.ts
index 6e5cc09d5..bcfb111da 100644
--- a/src/app/current-accounts/current-account-stepper/current-account-digital-step/current-account-digital-step.component.ts
+++ b/src/app/current-accounts/current-account-stepper/current-account-digital-step/current-account-digital-step.component.ts
@@ -52,12 +52,11 @@ export class CurrentAccountDigitalStepComponent {
}
}
+ // Note: a new account always starts with every digital facility off, even if the product has
+ // its own defaults configured -- those are enabled deliberately, one at a time, after the
+ // account is created and active, not inherited automatically at opening.
@Input()
- set currentAccountProductTemplate(value: any) {
- if (!this.hasExistingAccount && value?.accountFacilityConfig) {
- this.facilityConfig = { ...DEFAULT_FACILITY_CONFIG, ...value.accountFacilityConfig };
- }
- }
+ currentAccountProductTemplate: any;
get currentAccountDigital() {
return { accountFacilityConfig: { ...this.facilityConfig } };
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 dbddadaa1..0683c968d 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
@@ -136,12 +136,11 @@ export class CurrentAccountPreviewStepComponent implements OnChanges {
return this.currentAccountSettingsForm?.getRawValue?.() || this.currentAccount || {};
}
+ /** Digital facility config as actually captured by a digital step in this wizard -- no fallback
+ * to the product's own defaults, since account creation no longer has a digital step at all and
+ * must not preview facilities the officer never actually chose. */
get digitalFacilityConfig(): any {
- return (
- this.currentAccountDigital?.accountFacilityConfig ??
- this.currentAccountProductTemplate?.accountFacilityConfig ??
- null
- );
+ return this.currentAccountDigital?.accountFacilityConfig ?? null;
}
get hasDigitalSection(): boolean {
diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/approve-fixed-deposits-account/approve-fixed-deposits-account.component.html b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/approve-fixed-deposits-account/approve-fixed-deposits-account.component.html
index 81998d8c9..5547c958e 100644
--- a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/approve-fixed-deposits-account/approve-fixed-deposits-account.component.html
+++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/approve-fixed-deposits-account/approve-fixed-deposits-account.component.html
@@ -10,6 +10,7 @@
Activate Savings Account
-
Set the activation date and opening balance to bring this account live.
+
+ Set the activation date to bring this account live -- funding happens afterwards, as a separate deposit.
+
@@ -45,18 +47,6 @@
}
-
-
- Opening Balance
-
- ₹
- @if (minRequiredOpeningBalance) {
- Minimum required: ₹{{ minRequiredOpeningBalance }}
- }
- @if (activateSavingsAccountForm.controls.openingBalance.hasError('min')) {
- Opening balance must be at least ₹{{ minRequiredOpeningBalance ?? 0 }}
- }
-
diff --git a/src/app/savings/saving-account-actions/activate-savings-account/activate-savings-account.component.ts b/src/app/savings/saving-account-actions/activate-savings-account/activate-savings-account.component.ts
index e9add4f43..d7a41c94a 100644
--- a/src/app/savings/saving-account-actions/activate-savings-account/activate-savings-account.component.ts
+++ b/src/app/savings/saving-account-actions/activate-savings-account/activate-savings-account.component.ts
@@ -7,7 +7,7 @@
*/
/** Angular Imports */
-import { Component, OnInit, Input, inject } from '@angular/core';
+import { Component, OnInit, inject } from '@angular/core';
import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
import { Dates } from 'app/core/utils/dates';
@@ -41,8 +41,6 @@ export class ActivateSavingsAccountComponent implements OnInit {
private router = inject(Router);
private settingsService = inject(SettingsService);
- @Input() minRequiredOpeningBalance: number | null = null;
-
/** Minimum date allowed. */
minDate = new Date(2000, 0, 1);
/** Maximum date allowed. */
@@ -76,18 +74,10 @@ export class ActivateSavingsAccountComponent implements OnInit {
* Creates the activate savings account form.
*/
createActivateSavingsAccountForm() {
- const minBalance = this.minRequiredOpeningBalance ?? 0;
this.activateSavingsAccountForm = this.formBuilder.group({
activatedOnDate: [
'',
Validators.required
- ],
- openingBalance: [
- minBalance,
- [
- Validators.required,
- Validators.min(minBalance)
- ]
]
});
}
@@ -109,9 +99,6 @@ export class ActivateSavingsAccountComponent implements OnInit {
dateFormat,
locale
};
- if (data.openingBalance === 0 || data.openingBalance === null) {
- delete data.openingBalance;
- }
this.savingsService.executeSavingsAccountCommand(this.accountId, 'activate', data).subscribe(() => {
this.router.navigate(['../../transactions'], { relativeTo: this.route });
});
diff --git a/src/app/savings/saving-account-actions/approve-savings-account/approve-savings-account.component.html b/src/app/savings/saving-account-actions/approve-savings-account/approve-savings-account.component.html
index 8f61d900d..b6d897fb1 100644
--- a/src/app/savings/saving-account-actions/approve-savings-account/approve-savings-account.component.html
+++ b/src/app/savings/saving-account-actions/approve-savings-account/approve-savings-account.component.html
@@ -10,6 +10,7 @@
diff --git a/src/app/savings/savings-account-stepper/savings-account-digital-step/savings-account-digital-step.component.ts b/src/app/savings/savings-account-stepper/savings-account-digital-step/savings-account-digital-step.component.ts
index 30da85e32..6add60514 100644
--- a/src/app/savings/savings-account-stepper/savings-account-digital-step/savings-account-digital-step.component.ts
+++ b/src/app/savings/savings-account-stepper/savings-account-digital-step/savings-account-digital-step.component.ts
@@ -50,12 +50,11 @@ export class SavingsAccountDigitalStepComponent {
}
}
+ // Note: a new account always starts with every digital facility off, even if the product has
+ // its own defaults configured -- those are enabled deliberately, one at a time, after the
+ // account is created and active, not inherited automatically at opening.
@Input()
- set savingsAccountProductTemplate(value: any) {
- if (!this.hasExistingAccount && value?.accountFacilityConfig) {
- this.facilityConfig = { ...DEFAULT_FACILITY_CONFIG, ...value.accountFacilityConfig };
- }
- }
+ savingsAccountProductTemplate: any;
get savingsAccountDigital() {
return { accountFacilityConfig: { ...this.facilityConfig } };
diff --git a/src/app/savings/savings-account-stepper/savings-account-preview-step/savings-account-preview-step.component.ts b/src/app/savings/savings-account-stepper/savings-account-preview-step/savings-account-preview-step.component.ts
index f8837abfc..32b227bcd 100644
--- a/src/app/savings/savings-account-stepper/savings-account-preview-step/savings-account-preview-step.component.ts
+++ b/src/app/savings/savings-account-stepper/savings-account-preview-step/savings-account-preview-step.component.ts
@@ -124,13 +124,11 @@ export class SavingsAccountPreviewStepComponent implements OnChanges {
}
}
- /** Returns user-modified digital config (from digital step), falling back to product template */
+ /** Digital facility config as actually captured by a digital step in this wizard -- no fallback
+ * to the product's own defaults, since account creation no longer has a digital step at all and
+ * must not preview facilities the officer never actually chose. */
get digitalFacilityConfig(): any {
- return (
- this.savingsAccountDigital?.accountFacilityConfig ??
- this.savingsAccountProductTemplate?.accountFacilityConfig ??
- null
- );
+ return this.savingsAccountDigital?.accountFacilityConfig ?? null;
}
get hasDigitalSection(): boolean {