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
+18
-3
@@ -27,9 +27,14 @@ export class ManageSavingsAccountComponent implements OnInit {
|
||||
|
||||
transactionType: {
|
||||
holdamount: boolean,
|
||||
blockaccount: boolean
|
||||
blockaccount: boolean,
|
||||
blockdeposit: boolean,
|
||||
blockwithdrawal: boolean
|
||||
} = {
|
||||
holdamount: false, blockaccount: false
|
||||
holdamount: false,
|
||||
blockaccount: false,
|
||||
blockdeposit: false,
|
||||
blockwithdrawal: false
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -58,7 +63,8 @@ export class ManageSavingsAccountComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
this.maxDate = this.settingsService.businessDate;
|
||||
this.createManageSavingsAccountForm();
|
||||
if (this.transactionType.holdamount || this.transactionType.blockaccount) {
|
||||
if (this.transactionType.holdamount || this.transactionType.blockaccount
|
||||
|| this.transactionType.blockdeposit || this.transactionType.blockwithdrawal) {
|
||||
this.getCodeValues();
|
||||
}
|
||||
}
|
||||
@@ -67,6 +73,10 @@ export class ManageSavingsAccountComponent implements OnInit {
|
||||
let codeName = 'SavingsTransactionFreezeReasons'; // Default Hold Amount
|
||||
if (this.transactionType.blockaccount) {
|
||||
codeName = 'SavingsAccountBlockReasons';
|
||||
} else if (this.transactionType.blockdeposit) {
|
||||
codeName = 'CreditTransactionFreezeReasons';
|
||||
} else if (this.transactionType.blockwithdrawal) {
|
||||
codeName = 'DebitTransactionFreezeReasons';
|
||||
}
|
||||
|
||||
this.systemService.getCodes().subscribe((codes: any) => {
|
||||
@@ -126,6 +136,11 @@ export class ManageSavingsAccountComponent implements OnInit {
|
||||
... this.manageSavingsAccountForm.value
|
||||
};
|
||||
command = 'block';
|
||||
if (this.transactionType.blockdeposit) {
|
||||
command = 'blockCredit';
|
||||
} else if (this.transactionType.blockwithdrawal) {
|
||||
command = 'blockDebit';
|
||||
}
|
||||
|
||||
this.savingsService.executeSavingsAccountCommand(this.savingAccountId, command, payload).subscribe((response: any) => {
|
||||
this.router.navigate(['../../transactions'], { relativeTo: this.route });
|
||||
|
||||
@@ -10,4 +10,4 @@
|
||||
<mifosx-savings-transactions [currencyCode]="currencyCode" *ngIf="actions['Withdrawal'] || actions['Deposit']"></mifosx-savings-transactions>
|
||||
<mifosx-close-savings-account *ngIf="actions['Close']"></mifosx-close-savings-account>
|
||||
<mifosx-apply-annual-fees-savings-account *ngIf="actions['Apply Annual Fees']"></mifosx-apply-annual-fees-savings-account>
|
||||
<mifosx-manage-savings-account *ngIf="actions['Hold Amount'] || actions['Block Account']"></mifosx-manage-savings-account>
|
||||
<mifosx-manage-savings-account *ngIf="actions['Hold Amount'] || actions['Block Account'] || actions['Block Deposit'] || actions['Block Withdrawal']"></mifosx-manage-savings-account>
|
||||
|
||||
@@ -30,6 +30,10 @@ export class SavingAccountActionsComponent {
|
||||
'Hold Amount': boolean
|
||||
'Block Account': boolean
|
||||
'Unblock Account': boolean
|
||||
'Block Deposit': boolean
|
||||
'Unblock Deposit': boolean
|
||||
'Block Withdrawal': boolean
|
||||
'Unblock Withdrawal': boolean
|
||||
} = {
|
||||
'Approve': false,
|
||||
'Reject': false,
|
||||
@@ -46,7 +50,11 @@ export class SavingAccountActionsComponent {
|
||||
'Apply Annual Fees': false,
|
||||
'Hold Amount': false,
|
||||
'Block Account': false,
|
||||
'Unblock Account': false
|
||||
'Unblock Account': false,
|
||||
'Block Deposit': false,
|
||||
'Unblock Deposit': false,
|
||||
'Block Withdrawal': false,
|
||||
'Unblock Withdrawal': false
|
||||
};
|
||||
|
||||
currencyCode: string;
|
||||
|
||||
Reference in New Issue
Block a user