feat: add Current Account module, DIP verification, charges integration, and translations

- Current Account module with full CRUD, transactions, charges, hold/release, block/unblock
- Current Products management under Products module
- DIP mobile number verification with real API call to /lookup/check
- Sanctions verification dialog
- Charges support for Current Account (chargeAppliesTo=5) in create/edit
- Fixed permissions from SAVINGSACCOUNT to CURRENTACCOUNT across all current account components
- Added all missing translation keys for Current Account in en-US.json

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Aditya
2026-03-17 18:23:37 +05:30
co-authored by Claude Opus 4.6
parent 73aa69ee02
commit 0a32d7135e
210 changed files with 15048 additions and 155 deletions
@@ -0,0 +1,78 @@
/**
* Copyright since 2025 Mifos Initiative
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/** Angular Imports */
import { Injectable, inject } from '@angular/core';
import { ActivatedRouteSnapshot } from '@angular/router';
/** rxjs Imports */
import { Observable, forkJoin, of } from 'rxjs';
import { map, switchMap } from 'rxjs/operators';
/** Custom Services */
import { CurrentAccountsService } from '../current-accounts.service';
import { ClientsService } from 'app/clients/clients.service';
import { GroupsService } from 'app/groups/groups.service';
import { OrganizationService } from 'app/organization/organization.service';
/**
* Current Account Actions data resolver.
*/
@Injectable()
export class CurrentAccountActionsResolver {
private currentAccountsService = inject(CurrentAccountsService);
private clientsService = inject(ClientsService);
private groupsService = inject(GroupsService);
private organizationService = inject(OrganizationService);
/**
* Returns the Current account actions data.
* @param {ActivatedRouteSnapshot} route Route Snapshot
* @returns {Observable<any>}
*/
resolve(route: ActivatedRouteSnapshot): Observable<any> {
const actionName = route.paramMap.get('name');
const currentAccountId =
route.paramMap.get('currentAccountId') || route.parent.parent.paramMap.get('currentAccountId');
switch (actionName) {
case 'Assign Staff':
return this.currentAccountsService.getCurrentAccountData(currentAccountId).pipe(
switchMap((account: any) => {
if (!account.clientId && !account.groupId) {
return of({ ...account, fieldOfficerOptions: [] });
}
const entityObs = account.clientId
? this.clientsService.getClientData(account.clientId)
: this.groupsService.getGroupData(account.groupId);
return entityObs.pipe(
switchMap((entity: any) => this.organizationService.getStaff(entity.officeId, true)),
map((staff: any) => ({
...account,
fieldOfficerOptions: staff
}))
);
})
);
case 'Add Charge':
return this.currentAccountsService.getCurrentAccountChargeTemplateResource(currentAccountId);
case 'Withdrawal':
case 'Deposit':
case 'Hold Amount':
return this.currentAccountsService.getCurrentAccountTransactionTemplateResource(currentAccountId);
case 'Close':
return forkJoin([
this.currentAccountsService.getCurrentAccountTransactionTemplateResource(currentAccountId),
this.currentAccountsService.getCurrentAccountData(currentAccountId)
]);
case 'Apply Annual Fees':
return this.currentAccountsService.getCurrentAccountData(currentAccountId);
default:
return undefined;
}
}
}