feat(tasks,savings,cashier): facility charge mapping screen, chained approve+activate, popup diff dialog, cash/transfer-only teller flow
Adds a Products > Facility Charge Mappings screen so each of the 16 facility toggles can be pointed at a real charge, backing the mapped-charge validation added on the backend. Bulk-approve on the pending accounts screen now chains straight into activation (matching the single-account approve flow) instead of leaving accounts sitting in Approved; the same screen's Confirm button no longer stays disabled on pre-filled but untouched dialogs. Add Charge is hidden on not-yet-active savings accounts, and Transfer Funds is disabled entirely pending a proper transfer flow. The pending savings-account edit "Proposed Changes" panel is now a MatDialog showing only the fields that actually changed, replacing the old always-open inline diff table. The teller transaction-entry Payment Type dropdown is filtered to Cash/Transfer only, mirroring the backend's retirement of the other system-defined payment types so share withdrawal and GL transfers now settle the same way real transfers do. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,7 @@ import { AccountsService } from 'app/accounts/accounts.service';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
import { AuthenticationService } from '../../core/authentication/authentication.service';
|
||||
import { AlertService } from 'app/core/alert/alert.service';
|
||||
|
||||
/** Environment Configuration */
|
||||
import { environment } from '../../../environments/environment';
|
||||
@@ -85,6 +86,7 @@ export class SavingsAccountViewComponent implements OnInit {
|
||||
private settingsService = inject(SettingsService);
|
||||
private dateUtils = inject(Dates);
|
||||
private authenticationService = inject(AuthenticationService);
|
||||
private alertService = inject(AlertService);
|
||||
dialog = inject(MatDialog);
|
||||
|
||||
/** Savings Account Data */
|
||||
@@ -225,12 +227,8 @@ export class SavingsAccountViewComponent implements OnInit {
|
||||
this.isActive = status === 'Active';
|
||||
const subStatus = this.savingsAccountData.subStatus;
|
||||
this.buttonConfig = new SavingsButtonsConfiguration(status, subStatus);
|
||||
if (this.savingsAccountData.clientId) {
|
||||
this.buttonConfig.addOption({
|
||||
name: 'Transfer Funds',
|
||||
taskPermissionName: 'CREATE_ACCOUNTTRANSFER'
|
||||
});
|
||||
}
|
||||
// Transfer Funds is temporarily disabled for savings accounts (pending and active alike) --
|
||||
// deliberately not added to the menu here; see the guarded 'Transfer Funds' switch case below.
|
||||
if (this.savingsAccountData.externalId && environment.mifosInterbankTransfersEnabled) {
|
||||
this.buttonConfig.addOption({
|
||||
name: 'Interbank Transfer',
|
||||
@@ -347,15 +345,11 @@ export class SavingsAccountViewComponent implements OnInit {
|
||||
this.disableWithHoldTax();
|
||||
break;
|
||||
case 'Transfer Funds':
|
||||
const queryParams: any = {
|
||||
interbank: false,
|
||||
savingsId: this.savingsAccountData.id,
|
||||
accountType: 'fromsavings'
|
||||
};
|
||||
this.router.navigate(['transfer-funds/make-account-transfer'], {
|
||||
relativeTo: this.route,
|
||||
queryParams: queryParams,
|
||||
state: { balance: this.savingsAccountData.summary.availableBalance }
|
||||
// Temporarily disabled for savings accounts -- blocked here too, not just left out of the
|
||||
// menu, so a stale menu render or direct invocation can't reach the transfer screen.
|
||||
this.alertService.alert({
|
||||
type: 'Transfer Funds',
|
||||
message: 'Transfer Funds is temporarily unavailable for savings accounts.'
|
||||
});
|
||||
break;
|
||||
case 'Interbank Transfer': {
|
||||
|
||||
@@ -189,10 +189,6 @@ export class SavingsButtonsConfiguration {
|
||||
name: 'Withdrawn by Client',
|
||||
taskPermissionName: 'WITHDRAW_SAVINGSACCOUNT'
|
||||
},
|
||||
{
|
||||
name: 'Add Charge',
|
||||
taskPermissionName: 'CREATE_SAVINGSACCOUNTCHARGE'
|
||||
},
|
||||
{
|
||||
name: 'Delete',
|
||||
taskPermissionName: 'DELETE_SAVINGSACCOUNT'
|
||||
|
||||
Reference in New Issue
Block a user