i18n: Adding new languages: Part 2 (#1885)
Co-authored-by: radhathakare <radhathakare322@gmail.com>
This commit is contained in:
co-authored by
radhathakare
parent
408f004450
commit
3c625d81c4
@@ -143,6 +143,8 @@ export class SavingsAccountViewComponent implements OnInit {
|
||||
case 'Add Charge':
|
||||
case 'Hold Amount':
|
||||
case 'Block Account':
|
||||
case 'Block Deposit':
|
||||
case 'Block Withdrawal':
|
||||
case 'Unassign Staff':
|
||||
case 'Withdraw By Client':
|
||||
case 'Apply Annual Fees':
|
||||
@@ -174,7 +176,9 @@ export class SavingsAccountViewComponent implements OnInit {
|
||||
this.router.navigate(['transfer-funds/make-account-transfer'], { relativeTo: this.route, queryParams: queryParams });
|
||||
break;
|
||||
case 'Unblock Account':
|
||||
this.unblockSavingsAccount();
|
||||
case 'Unblock Deposit':
|
||||
case 'Unblock Withdrawal':
|
||||
this.unblockSavingsAccount(name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -260,13 +264,20 @@ export class SavingsAccountViewComponent implements OnInit {
|
||||
/**
|
||||
* Unblock Savings Account.
|
||||
*/
|
||||
private unblockSavingsAccount() {
|
||||
private unblockSavingsAccount(action: string) {
|
||||
const unblockSavingsAccountDialogRef = this.dialog.open(ConfirmationDialogComponent, {
|
||||
data: { heading: 'Unblock Savings Account', dialogContext: 'Are you sure you want Unblock this Savings Account' }
|
||||
data: { heading: 'Savings Account', dialogContext: 'Are you sure you want ' + action + ' this Savings Account' }
|
||||
});
|
||||
let command = 'unblock';
|
||||
if (action === 'Unblock Deposit') {
|
||||
command = 'unblockCredit';
|
||||
}
|
||||
if (action === 'Unblock Withdrawal') {
|
||||
command = 'unblockDebit';
|
||||
}
|
||||
unblockSavingsAccountDialogRef.afterClosed().subscribe((response: { confirm: any }) => {
|
||||
if (response.confirm) {
|
||||
this.savingsService.executeSavingsAccountCommand(this.savingsAccountData.id, 'unblock', { })
|
||||
this.savingsService.executeSavingsAccountCommand(this.savingsAccountData.id, command, { })
|
||||
.subscribe(() => {
|
||||
this.reload();
|
||||
});
|
||||
|
||||
@@ -36,6 +36,19 @@ export class SavingsButtonsConfiguration {
|
||||
name: 'Deposit',
|
||||
icon: 'arrow-up',
|
||||
taskPermissionName: 'DEPOSIT_SAVINGSACCOUNT'
|
||||
},
|
||||
{
|
||||
name: 'Block Deposit',
|
||||
icon: 'lock',
|
||||
taskPermissionName: 'BLOCKDEPOSIT_SAVINGSACCOUNT'
|
||||
}
|
||||
);
|
||||
} else {
|
||||
this.buttonsArray.push(
|
||||
{
|
||||
name: 'Unblock Deposit',
|
||||
icon: 'lock-open',
|
||||
taskPermissionName: 'UNBLOCKDEPOSIT_SAVINGSACCOUNT'
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -45,6 +58,19 @@ export class SavingsButtonsConfiguration {
|
||||
name: 'Withdrawal',
|
||||
icon: 'arrow-down',
|
||||
taskPermissionName: 'WITHDRAWAL_SAVINGSACCOUNT'
|
||||
},
|
||||
{
|
||||
name: 'Block Withdrawal',
|
||||
icon: 'lock',
|
||||
taskPermissionName: 'BLOCKWITHDRAWAL_SAVINGSACCOUNT'
|
||||
}
|
||||
);
|
||||
} else {
|
||||
this.buttonsArray.push(
|
||||
{
|
||||
name: 'Unblock Withdrawal',
|
||||
icon: 'lock-open',
|
||||
taskPermissionName: 'UNBLOCKWITHDRAWAL_SAVINGSACCOUNT'
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user