feat: interbank transfer (#2299)

This commit is contained in:
Gustavo Espíndola
2025-03-05 11:57:05 -06:00
committed by GitHub
parent 56acc332ab
commit 88086e3d79
16 changed files with 452 additions and 28 deletions
@@ -16,6 +16,9 @@ import { ConfirmationDialogComponent } from 'app/shared/confirmation-dialog/conf
import { Currency } from 'app/shared/models/general.model';
import { TranslateService } from '@ngx-translate/core';
/** Environment Configuration */
import { environment } from 'environments/environment';
/**
* Savings Account View Component
*/
@@ -82,6 +85,12 @@ export class SavingsAccountViewComponent implements OnInit {
taskPermissionName: 'CREATE_ACCOUNTTRANSFER'
});
}
if (this.savingsAccountData.externalId && environment.interbankTransfers === 'true') {
this.buttonConfig.addOption({
name: 'Interbank Transfer',
taskPermissionName: 'CREATE_ACCOUNTTRANSFER'
});
}
if (!this.savingsAccountData.fieldOfficerId) {
this.buttonConfig.addOption({
name: 'Assign Staff',
@@ -178,12 +187,26 @@ export class SavingsAccountViewComponent implements OnInit {
this.disableWithHoldTax();
break;
case 'Transfer Funds':
const queryParams: any = { savingsId: this.savingsAccountData.id, accountType: 'fromsavings' };
const queryParams: any = {
interbank: false,
savingsId: this.savingsAccountData.id,
accountType: 'fromsavings'
};
this.router.navigate(['transfer-funds/make-account-transfer'], {
relativeTo: this.route,
queryParams: queryParams
queryParams: queryParams,
state: { balance: this.savingsAccountData.summary.availableBalance }
});
break;
case 'Interbank Transfer': {
const queryParams: any = { interbank: true, savingsId: this.savingsAccountData.id, accountType: 'interbank' };
this.router.navigate(['transfer-funds/make-account-transfer'], {
relativeTo: this.route,
queryParams: queryParams,
state: { balance: this.savingsAccountData.summary.availableBalance }
});
break;
}
case 'Unblock Account':
case 'Unblock Deposit':
case 'Unblock Withdrawal':