feat: interbank transfer (#2299)
This commit is contained in:
@@ -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':
|
||||
|
||||
Reference in New Issue
Block a user