Undo Loan Charge-off transaction
This commit is contained in:
committed by
Jose Alberto Hernandez
parent
54ac7b4612
commit
5e5c7ed47d
@@ -54,7 +54,6 @@
|
||||
<mifosx-add-loan-charge *ngIf="actions['Add Loan Charge']"></mifosx-add-loan-charge>
|
||||
<mifosx-edit-repayment-schedule *ngIf="actions['Edit Repayment Schedule']"></mifosx-edit-repayment-schedule>
|
||||
<mifosx-charge-off [dataObject]="actionButtonData" *ngIf="actions['Charge-Off']"></mifosx-charge-off>
|
||||
<mifosx-undo-command [actionName]="actionName" *ngIf="actions['Undo Charge-Off']"></mifosx-undo-command>
|
||||
<mifosx-asset-transfer-loan *ngIf="actions['Sell Loan'] || actions['Buy Back Loan']"></mifosx-asset-transfer-loan>
|
||||
<mifosx-loan-reaging [dataObject]="actionButtonData" *ngIf="actions['Re-Age']"></mifosx-loan-reaging>
|
||||
<mifosx-loan-reamortize [dataObject]="actionButtonData" *ngIf="actions['Re-Amortize']"></mifosx-loan-reamortize>
|
||||
|
||||
@@ -42,7 +42,6 @@ export class LoanAccountActionsComponent {
|
||||
'Credit Balance Refund': boolean,
|
||||
'Edit Repayment Schedule': boolean,
|
||||
'Charge-Off': boolean,
|
||||
'Undo Charge-Off': boolean,
|
||||
'Sell Loan': boolean,
|
||||
'Buy Back Loan': boolean,
|
||||
'Re-Age': boolean
|
||||
@@ -76,7 +75,6 @@ export class LoanAccountActionsComponent {
|
||||
'Credit Balance Refund': false,
|
||||
'Edit Repayment Schedule': false,
|
||||
'Charge-Off': false,
|
||||
'Undo Charge-Off': false,
|
||||
'Sell Loan': false,
|
||||
'Buy Back Loan': false,
|
||||
'Re-Age': false
|
||||
|
||||
@@ -176,6 +176,12 @@ export class LoansViewComponent implements OnInit {
|
||||
icon: 'coins',
|
||||
taskPermissionName: 'CHARGEOFF_LOAN'
|
||||
});
|
||||
} else {
|
||||
this.buttonConfig.addButton({
|
||||
name: 'Undo Charge-Off',
|
||||
icon: 'undo',
|
||||
taskPermissionName: 'UNDOCHARGEOFF_LOAN'
|
||||
});
|
||||
}
|
||||
|
||||
// Allow Re-Ageing only when there is not any Re-Age transaction
|
||||
@@ -226,7 +232,8 @@ export class LoansViewComponent implements OnInit {
|
||||
break;
|
||||
case 'Undo Re-Age':
|
||||
case 'Undo Re-Amortize':
|
||||
this.undoReAgeOrReAmortize(actionName);
|
||||
case 'Undo Charge-Off':
|
||||
this.undoLoanAction(actionName);
|
||||
break;
|
||||
default:
|
||||
this.router.navigate(['actions', actionName], { relativeTo: this.route });
|
||||
@@ -261,7 +268,7 @@ export class LoansViewComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
undoReAgeOrReAmortize(actionName: string): void {
|
||||
undoLoanAction(actionName: string): void {
|
||||
actionName = actionName.replace('Undo ', '');
|
||||
const undoTransactionAccountDialogRef = this.dialog.open(ConfirmationDialogComponent, {
|
||||
data: {
|
||||
@@ -271,7 +278,18 @@ export class LoansViewComponent implements OnInit {
|
||||
});
|
||||
undoTransactionAccountDialogRef.afterClosed().subscribe((response: any) => {
|
||||
if (response.confirm) {
|
||||
const undoCommand = actionName === 'Re-Age' ? 'undoReAge' : 'undoReAmortize';
|
||||
let undoCommand: string = '';
|
||||
switch (actionName) {
|
||||
case 'Re-Age':
|
||||
undoCommand = 'undoReAge';
|
||||
break;
|
||||
case 'Re-Amortize':
|
||||
undoCommand = 'undoReAmortize';
|
||||
break;
|
||||
case 'Charge-Off':
|
||||
undoCommand = 'undo-charge-off';
|
||||
break;
|
||||
}
|
||||
this.loansService.executeLoansAccountTransactionsCommand(String(this.loanId), undoCommand, {}).subscribe(() => {
|
||||
this.reload();
|
||||
});
|
||||
|
||||
@@ -2538,6 +2538,7 @@
|
||||
"Undo Activation": "Znovu aktivace",
|
||||
"Undo Approval": "Zrušit schválení",
|
||||
"Undo Disbursal": "Zrušit výplatu",
|
||||
"Undo Charge-Off": "Zrušit Charge-Off",
|
||||
"Undo Last Disbursal": "Zrušit poslední výplatu",
|
||||
"Undo Re-Age": "Zrušit Stárnutí",
|
||||
"Undo Re-Amortize": "Zrušit Amortizovat",
|
||||
|
||||
@@ -2538,6 +2538,7 @@
|
||||
"Undo Activation": "Aktivierung rückgängig",
|
||||
"Undo Approval": "Genehmigung rückgängig machen",
|
||||
"Undo Disbursal": "Auszahlung rückgängig machen",
|
||||
"Undo Charge-Off": "Abladen rückgängig machen",
|
||||
"Undo Last Disbursal": "Letzte Auszahlung rückgängig machen",
|
||||
"Undo Re-Age": "Altern rückgängig machen",
|
||||
"Undo Re-Amortize": "Amortisieren rückgängig machen",
|
||||
|
||||
@@ -2539,6 +2539,7 @@
|
||||
"Undo Activation": "Undo Activation",
|
||||
"Undo Approval": "Undo Approval",
|
||||
"Undo Disbursal": "Undo Disbursal",
|
||||
"Undo Charge-Off": "Undo Charge-Off",
|
||||
"Undo Last Disbursal": "Undo Last Disbursal",
|
||||
"Undo Re-Age": "Undo Re-Age",
|
||||
"Undo Re-Amortize": "Undo Re-Amortize",
|
||||
|
||||
@@ -2538,6 +2538,7 @@
|
||||
"Undo Activation": "Deshacer la activación",
|
||||
"Undo Approval": "Deshacer aprobación",
|
||||
"Undo Disbursal": "Deshacer desembolso",
|
||||
"Undo Charge-Off": "Deshacer Cancelación",
|
||||
"Undo Last Disbursal": "Deshacer el último desembolso",
|
||||
"Undo Re-Age": "Deshacer Envejecimiento",
|
||||
"Undo Re-Amortize": "Deshacer Amortizar",
|
||||
|
||||
@@ -2538,6 +2538,7 @@
|
||||
"Undo Activation": "Annuler l'activation",
|
||||
"Undo Approval": "Annuler l'approbation",
|
||||
"Undo Disbursal": "Annuler le décaissement",
|
||||
"Undo Charge-Off": "Annuler le Amortir",
|
||||
"Undo Last Disbursal": "Annuler le dernier décaissement",
|
||||
"Undo Re-Age": "Annuler le Vieillissement",
|
||||
"Undo Re-Amortize": "Annuler le Amortir",
|
||||
|
||||
@@ -2538,6 +2538,7 @@
|
||||
"Undo Activation": "Annullare l'attivazione",
|
||||
"Undo Approval": "Annulla l'approvazione",
|
||||
"Undo Disbursal": "Annullare l'esborso",
|
||||
"Undo Charge-Off": "Annullare l'addebito",
|
||||
"Undo Last Disbursal": "Annulla l'ultimo esborso",
|
||||
"Undo Re-Age": "Annullare l'invecchiamento",
|
||||
"Undo Re-Amortize": "Annullare l'ammortizzare",
|
||||
|
||||
@@ -2538,6 +2538,7 @@
|
||||
"Undo Activation": "실행 취소 활성화",
|
||||
"Undo Approval": "승인 취소",
|
||||
"Undo Disbursal": "지급 취소",
|
||||
"Undo Charge-Off": "상각 취소",
|
||||
"Undo Last Disbursal": "마지막 지불 취소",
|
||||
"Undo Re-Age": "노화 취소",
|
||||
"Undo Re-Amortize": "상각합니다 취소",
|
||||
|
||||
@@ -2538,6 +2538,7 @@
|
||||
"Undo Activation": "Anuliuoti aktyvaciją",
|
||||
"Undo Approval": "Anuliuoti patvirtinimą",
|
||||
"Undo Disbursal": "Anuliuoti išmokėjimą",
|
||||
"Undo Charge-Off": "Anuliuoti Atsakingas už",
|
||||
"Undo Last Disbursal": "Anuliuoti paskutinę išmokėjimą",
|
||||
"Undo Re-Age": "Anuliuoti senėjimas",
|
||||
"Undo Re-Amortize": "Anuliuoti amortize",
|
||||
|
||||
@@ -2538,6 +2538,7 @@
|
||||
"Undo Activation": "Atsaukt aktivizēšanu",
|
||||
"Undo Approval": "Atsaukt apstiprinājumu",
|
||||
"Undo Disbursal": "Atsaukt izmaksu",
|
||||
"Undo Charge-Off": "Atsaukt Charge-Off",
|
||||
"Undo Last Disbursal": "Atsaukt pēdējo izmaksu",
|
||||
"Undo Re-Age": "Atsaukt novecošanās",
|
||||
"Undo Re-Amortize": "Atsaukt amortizēt",
|
||||
|
||||
@@ -2538,6 +2538,7 @@
|
||||
"Undo Activation": "अन्डु सक्रियता",
|
||||
"Undo Approval": "अनुमोदन अनडू गर्नुहोस्",
|
||||
"Undo Disbursal": "वितरण पूर्ववत गर्नुहोस्",
|
||||
"Undo Charge-Off": "चार्ज-अफ गर्नुहोस्",
|
||||
"Undo Last Disbursal": "पछिल्लो वितरण पूर्ववत गर्नुहोस्",
|
||||
"Undo Re-Age": "बुढ्यौडो अनडू",
|
||||
"Undo Re-Amortize": "परिणत गर्नुहोस् अनडू",
|
||||
|
||||
@@ -2538,6 +2538,7 @@
|
||||
"Undo Activation": "Desfazer ativação",
|
||||
"Undo Approval": "Desfazer aprovação",
|
||||
"Undo Disbursal": "Desfazer desembolso",
|
||||
"Undo Charge-Off": "Desfazer Cobrança",
|
||||
"Undo Last Disbursal": "Desfazer último desembolso",
|
||||
"Undo Re-Age": "Desfazer envelhecimento",
|
||||
"Undo Re-Amortize": "Desfazer amortizar",
|
||||
|
||||
@@ -2538,6 +2538,7 @@
|
||||
"Undo Activation": "Uanzishaji",
|
||||
"Undo Approval": "Tendua Uidhinishaji",
|
||||
"Undo Disbursal": "Tendua Utoaji",
|
||||
"Undo Charge-Off": "Tendua Chaji-Zima",
|
||||
"Undo Last Disbursal": "Tendua Utoaji wa Mwisho",
|
||||
"Undo Re-Age": "Tendua Kuzeeka",
|
||||
"Undo Re-Amortize": "Tendua Adize",
|
||||
|
||||
Reference in New Issue
Block a user