Allow Undo Loan re-aging transaction

This commit is contained in:
Jose Alberto Hernandez
2024-03-05 08:54:45 -06:00
parent b76b61bae5
commit 2ac05d26d8
16 changed files with 81 additions and 43 deletions
@@ -28,4 +28,4 @@
<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-Ageing']"></mifosx-loan-reaging>
<mifosx-loan-reaging [dataObject]="actionButtonData" *ngIf="actions['Re-Age']"></mifosx-loan-reaging>
@@ -45,7 +45,7 @@ export class LoanAccountActionsComponent {
'Undo Charge-Off': boolean,
'Sell Loan': boolean,
'Buy Back Loan': boolean,
'Re-Ageing': boolean
'Re-Age': boolean
} = {
'Close': false,
'Undo Approval': false,
@@ -79,7 +79,7 @@ export class LoanAccountActionsComponent {
'Undo Charge-Off': false,
'Sell Loan': false,
'Buy Back Loan': false,
'Re-Ageing': false
'Re-Age': false
};
actionButtonData: any;
@@ -174,10 +174,16 @@ export class LoansViewComponent implements OnInit {
// Allow Re-Ageing only when there is not any Re-Age transaction
if (!this.loanReAged) {
this.buttonConfig.addButton({
name: 'Re-Ageing',
name: 'Re-Age',
icon: 'calendar',
taskPermissionName: 'REAGE_LOAN',
});
} else {
this.buttonConfig.addButton({
name: 'Undo Re-Age',
icon: 'undo',
taskPermissionName: 'UNDO_REAGE_LOAN',
});
}
}
}
@@ -197,6 +203,9 @@ export class LoansViewComponent implements OnInit {
const queryParams: any = { loanId: this.loanId, accountType: 'fromloans' };
this.router.navigate(['transfer-funds/make-account-transfer'], { relativeTo: this.route, queryParams: queryParams });
break;
case 'Undo Re-Age':
this.undoReAge();
break;
default:
this.router.navigate(['actions', button], { relativeTo: this.route });
break;
@@ -230,6 +239,21 @@ export class LoansViewComponent implements OnInit {
}
}
undoReAge(): void {
const undoTransactionAccountDialogRef = this.dialog.open(ConfirmationDialogComponent, {
data: { heading: this.translateService.instant('labels.heading.Undo Transaction'),
dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want undo the transaction type') + ' ReAge'
}
});
undoTransactionAccountDialogRef.afterClosed().subscribe((response: any) => {
if (response.confirm) {
this.loansService.executeLoansAccountTransactionsCommand(String(this.loanId), 'undoReAge', {}).subscribe(() => {
this.reload();
});
}
});
}
iconLoanStatusColor() {
if (this.loanDetailsData.chargedOff) {
return 'loanStatusType.chargeoff';
@@ -1,31 +1,33 @@
export interface LoanTransactionType {
id: number;
code: string;
value: string;
id: number;
code: string;
value: string;
accrual: boolean;
approveTransfer: boolean;
chargeAdjustment: boolean;
chargePayment: boolean;
chargeRefund: boolean;
chargeback: boolean;
chargeoff: boolean;
contra: boolean;
creditBalanceRefund: boolean;
disbursement: boolean;
downPayment: boolean;
goodwillCredit: boolean;
initiateTransfer: boolean;
merchantIssuedRefund: boolean;
payoutRefund: boolean;
recoveryRepayment: boolean;
refund: boolean;
refundForActiveLoans: boolean;
rejectTransfer: boolean;
repayment: boolean;
disbursement: boolean;
repaymentAtDisbursement: boolean;
waiveCharges: boolean;
waiveInterest: boolean;
withdrawTransfer: boolean;
writeOff: boolean;
repayment: boolean;
merchantIssuedRefund: boolean;
payoutRefund: boolean;
goodwillCredit: boolean;
chargeRefund: boolean;
contra: boolean;
waiveInterest: boolean;
waiveCharges: boolean;
accrual: boolean;
writeOff: boolean;
recoveryRepayment: boolean;
initiateTransfer: boolean;
approveTransfer: boolean;
withdrawTransfer: boolean;
rejectTransfer: boolean;
chargePayment: boolean;
refund: boolean;
refundForActiveLoans: boolean;
creditBalanceRefund: boolean;
chargeAdjustment: boolean;
chargeback: boolean;
chargeoff: boolean;
downPayment: boolean;
reAge: boolean;
reAmortize: boolean;
}
+2 -1
View File
@@ -2145,7 +2145,7 @@
"Prepay Loan": "Půjčka před výplatou",
"Products": "produkty",
"Profile": "Profil",
"Re-Ageing": "Stárnutí",
"Re-Age": "Stárnutí",
"Recover From Guarantor": "Vymáhání od ručitele",
"Recovery Payment": "Platba obnovy",
"Reject": "Odmítnout",
@@ -2167,6 +2167,7 @@
"Undo Activation": "Znovu aktivace",
"Undo Approval": "Zrušit schválení",
"Undo Disbursal": "Zrušit výplatu",
"Undo Re-Age": "Zrušit Stárnutí",
"User Management": "správa uživatelů",
"User Panel": "Uživatelský panel",
"Users": "Uživatelé",
+2 -1
View File
@@ -2145,7 +2145,7 @@
"Prepay Loan": "Darlehen mit Vorauszahlung",
"Products": "Produkte",
"Profile": "Profil",
"Re-Ageing": "Altern",
"Re-Age": "Altern",
"Recover From Guarantor": "Rückforderung vom Bürgen",
"Recovery Payment": "Wiederherstellungszahlung",
"Reject": "Ablehnen",
@@ -2167,6 +2167,7 @@
"Undo Activation": "Aktivierung rückgängig",
"Undo Approval": "Genehmigung rückgängig machen",
"Undo Disbursal": "Auszahlung rückgängig machen",
"Undo Re-Age": "Altern rückgängig machen",
"User Management": "Benutzerverwaltung",
"User Panel": "Benutzerbereich",
"Users": "Benutzer",
+2 -1
View File
@@ -2144,7 +2144,7 @@
"Prepay Loan": "Prepay Loan",
"Products": "Products",
"Profile": "Profile",
"Re-Ageing": "Re-Ageing",
"Re-Age": "Re-Age",
"Recover From Guarantor": "Recover From Guarantor",
"Recovery Payment": "Recovery Payment",
"Reject": "Reject",
@@ -2166,6 +2166,7 @@
"Undo Activation": "Undo Activation",
"Undo Approval": "Undo Approval",
"Undo Disbursal": "Undo Disbursal",
"Undo Re-Age": "Undo Re-Age",
"User Management": "User Management",
"User Panel": "User Panel",
"Users": "Users",
+2 -1
View File
@@ -2145,7 +2145,7 @@
"Prepay Loan": "Prepagar crédito",
"Products": "Productos",
"Profile": "Perfil",
"Re-Ageing": "Envejecimiento",
"Re-Age": "Envejecimiento",
"Recover From Guarantor": "Recuperar del Garante",
"Recovery Payment": "Pago de recuperación",
"Reject": "Rechazar",
@@ -2167,6 +2167,7 @@
"Undo Activation": "Deshacer la activación",
"Undo Approval": "Deshacer aprobación",
"Undo Disbursal": "Deshacer desembolso",
"Undo Re-Age": "Deshacer Envejecimiento",
"User Management": "Gestión de usuarios",
"User Panel": "Panel de usuario",
"Users": "Usuarios",
+2 -1
View File
@@ -2145,7 +2145,7 @@
"Prepay Loan": "Prêt à remboursement anticipé",
"Products": "Des produits",
"Profile": "Profil",
"Re-Ageing": "Vieillissement",
"Re-Age": "Vieillissement",
"Recover From Guarantor": "Récupération auprès du garant",
"Recovery Payment": "Paiement de récupération",
"Reject": "Rejeter",
@@ -2167,6 +2167,7 @@
"Undo Activation": "Annuler l'activation",
"Undo Approval": "Annuler l'approbation",
"Undo Disbursal": "Annuler le décaissement",
"Undo Re-Age": "Annuler le Vieillissement",
"User Management": "Gestion des utilisateurs",
"User Panel": "Panneau utilisateur",
"Users": "Utilisateurs",
+2 -1
View File
@@ -2145,7 +2145,7 @@
"Prepay Loan": "Prestito con pagamento anticipato",
"Products": "Prodotti",
"Profile": "Profilo",
"Re-Ageing": "Invecchiamento",
"Re-Age": "Invecchiamento",
"Recover From Guarantor": "Recupero dal garante",
"Recovery Payment": "Pagamento di recupero",
"Reject": "Rifiutare",
@@ -2167,6 +2167,7 @@
"Undo Activation": "Annullare l'attivazione",
"Undo Approval": "Annulla l'approvazione",
"Undo Disbursal": "Annullare l'esborso",
"Undo Re-Age": "Annullare l'invecchiamento",
"User Management": "Gestione utenti",
"User Panel": "Pannello Utente",
"Users": "Utenti",
+2 -1
View File
@@ -2146,7 +2146,7 @@
"Prepay Loan": "선불대출",
"Products": "제품",
"Profile": "프로필",
"Re-Ageing": "노화",
"Re-Age": "노화",
"Recover From Guarantor": "보증인으로부터의 회복",
"Reject": "거부하다",
"Reports": "보고서",
@@ -2167,6 +2167,7 @@
"Undo Activation": "실행 취소 활성화",
"Undo Approval": "승인 취소",
"Undo Disbursal": "지급 취소",
"Undo Re-Age": "노화 취소",
"User Management": "사용자 관리",
"User Panel": "사용자 패널",
"Users": "사용자",
+2 -1
View File
@@ -2145,7 +2145,7 @@
"Prepay Loan": "Išankstinio mokėjimo paskola",
"Products": "Produktai",
"Profile": "Profilis",
"Re-Ageing": "Senėjimas",
"Re-Age": "Senėjimas",
"Recover From Guarantor": "Išieškojimas iš garanto",
"Recovery Payment": "Išieškojimo mokėjimas",
"Reject": "Atmesti",
@@ -2167,6 +2167,7 @@
"Undo Activation": "Anuliuoti aktyvaciją",
"Undo Approval": "Anuliuoti patvirtinimą",
"Undo Disbursal": "Anuliuoti išmokėjimą",
"Undo Re-Age": "Anuliuoti senėjimas",
"User Management": "Vartotojo valdymas",
"User Panel": "Vartotojo skydelis",
"Users": "Vartotojai",
+2 -1
View File
@@ -2145,7 +2145,7 @@
"Prepay Loan": "Priekšapmaksas aizdevums",
"Products": "Produkti",
"Profile": "Profils",
"Re-Ageing": "Novecošanās",
"Re-Age": "Novecošanās",
"Recover From Guarantor": "Atgūšana no galvotāja",
"Recovery Payment": "Atgūšanas maksājums",
"Reject": "Noraidīt",
@@ -2167,6 +2167,7 @@
"Undo Activation": "Atsaukt aktivizēšanu",
"Undo Approval": "Atsaukt apstiprinājumu",
"Undo Disbursal": "Atsaukt izmaksu",
"Undo Re-Age": "Atsaukt novecošanās",
"User Management": "Lietotāju pārvaldība",
"User Panel": "Lietotāja panelis",
"Users": "Lietotāji",
+2 -1
View File
@@ -2145,7 +2145,7 @@
"Prepay Loan": "पूर्व भुक्तानी ऋण",
"Products": "उत्पादनहरू",
"Profile": "प्रोफाइल",
"Re-Ageing": "बुढ्यौडो",
"Re-Age": "बुढ्यौडो",
"Recover From Guarantor": "ग्यारेन्टरबाट रिकभरी",
"Recovery Payment": "रिकभरी भुक्तानी",
"Reject": "अस्वीकार गर्नुहोस्",
@@ -2167,6 +2167,7 @@
"Undo Activation": "अन्डु सक्रियता",
"Undo Approval": "अनुमोदन अनडू गर्नुहोस्",
"Undo Disbursal": "वितरण पूर्ववत गर्नुहोस्",
"Undo Re-Age": "बुढ्यौडो अनडू",
"User Management": "प्रयोगकर्ता व्यवस्थापन",
"User Panel": "प्रयोगकर्ता प्यानल",
"Users": "प्रयोगकर्ताहरू",
+2 -1
View File
@@ -2145,7 +2145,7 @@
"Prepay Loan": "Empréstimo pré-pago",
"Products": "Produtos",
"Profile": "Perfil",
"Re-Ageing": "Envelhecimento",
"Re-Age": "Envelhecimento",
"Recover From Guarantor": "Recuperação do Fiador",
"Recovery Payment": "Pagamento de recuperação",
"Reject": "Rejeitar",
@@ -2167,6 +2167,7 @@
"Undo Activation": "Desfazer ativação",
"Undo Approval": "Desfazer aprovação",
"Undo Disbursal": "Desfazer desembolso",
"Undo Re-Age": "Desfazer envelhecimento",
"User Management": "Gerenciamento de usuários",
"User Panel": "Painel do usuário",
"Users": "Usuários",
+2 -1
View File
@@ -2145,7 +2145,7 @@
"Prepay Loan": "Lipa Mkopo",
"Products": "Bidhaa",
"Profile": "Wasifu",
"Re-Ageing": "Kuzeeka",
"Re-Age": "Kuzeeka",
"Recover From Guarantor": "Urejeshaji Kutoka kwa Mdhamini",
"Recovery Payment": "Malipo ya uokoaji",
"Reject": "Kataa",
@@ -2167,6 +2167,7 @@
"Undo Activation": "Uanzishaji",
"Undo Approval": "Tendua Uidhinishaji",
"Undo Disbursal": "Tendua Utoaji",
"Undo Re-Age": "Tendua Kuzeeka",
"User Management": "Usimamizi wa Mtumiaji",
"User Panel": "Jopo la Mtumiaji",
"Users": "Watumiaji",