diff --git a/src/app/loans/loans-view/loan-term-variations-tab/loan-term-variations-tab.component.html b/src/app/loans/loans-view/loan-term-variations-tab/loan-term-variations-tab.component.html index 867f0433a..3f7f64b8b 100644 --- a/src/app/loans/loans-view/loan-term-variations-tab/loan-term-variations-tab.component.html +++ b/src/app/loans/loans-view/loan-term-variations-tab/loan-term-variations-tab.component.html @@ -1,84 +1,52 @@
-

{{ 'labels.heading.Term Variations' | translate }}

- - - - - - - - - - - - - - - - - - - - - -
{{ 'labels.inputs.Type' | translate }}{{ item.termType.value | translate }}{{ 'labels.inputs.Added On' | translate }}{{ item.termVariationApplicableFrom | dateFormat }}{{ 'labels.inputs.Value' | translate }}{{ item.decimalValue | formatNumber }}{{ 'labels.inputs.Specific to Installment' | translate }}{{ item.isSpecificToInstallment | yesNo }}
- -

{{ 'labels.heading.Interest Pauses' | translate }}

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#{{ idx + 1 }}{{ 'labels.inputs.Start Date' | translate }}{{ item.startDate | dateFormat }}{{ 'labels.inputs.End Date' | translate }}{{ item.endDate | dateFormat }}{{ 'labels.inputs.Days' | translate }}{{ item.days | formatNumber }}{{ 'labels.inputs.Actions' | translate }} - - -
- -
-
- - {{ 'labels.text.No data found' | translate }} -
+
+ +

{{ 'labels.heading.' + loanTermVariation.label | translate }}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#{{ idx + 1 }}{{ 'labels.inputs.Start Date' | translate }}{{ item.termVariationApplicableFrom | dateFormat }}{{ 'labels.inputs.End Date' | translate }}{{ item.dateValue | dateFormat }}{{ 'labels.inputs.Value' | translate }}{{ item.decimalValue | formatNumber }}{{ 'labels.inputs.Days' | translate }}{{ item.days | formatNumber }}{{ 'labels.inputs.Actions' | translate }} + + + + +
-
+ +
\ No newline at end of file diff --git a/src/app/loans/loans-view/loan-term-variations-tab/loan-term-variations-tab.component.ts b/src/app/loans/loans-view/loan-term-variations-tab/loan-term-variations-tab.component.ts index e052cccb1..a6d61c92b 100644 --- a/src/app/loans/loans-view/loan-term-variations-tab/loan-term-variations-tab.component.ts +++ b/src/app/loans/loans-view/loan-term-variations-tab/loan-term-variations-tab.component.ts @@ -19,14 +19,6 @@ export class LoanTermVariationsTabComponent { /** Loan Term Variation Data */ loanTermVariationsData: any[] = []; loanDTermVariationsColumns: string[] = [ - 'termType', - 'applicableFrom', - 'value', - 'specificToInstallment' - ]; - /** Interest Pauses Data */ - interestPausesData: any[] = []; - interestPausesColumns: string[] = [ 'row', 'startDate', 'endDate', @@ -34,6 +26,19 @@ export class LoanTermVariationsTabComponent { 'actions' ]; + emiAmountData: any[] = []; + interestRateData: any[] = []; + dueDateData: any[] = []; + deleteInstallmentData: any[] = []; + insertInstallmentData: any[] = []; + principalAmountData: any[] = []; + graceOnInterestData: any[] = []; + graceOnPrincipalData: any[] = []; + extendRepaymentPeriodData: any[] = []; + interestRateFromInstallmentData: any[] = []; + interestPausesData: any[] = []; + invalidData: any[] = []; + loanId: number; clientId: AnyKindOfDictionary; @@ -47,14 +52,117 @@ export class LoanTermVariationsTabComponent { ) { this.interestPausesData = []; this.clientId = this.route.parent.parent.snapshot.paramMap.get('clientId'); - this.route.data.subscribe((data: { loanDetailsData: any; interestPausesData: any }) => { + this.route.data.subscribe((data: { loanDetailsData: any; }) => { this.loanId = data.loanDetailsData.id; - this.loanTermVariationsData = data.loanDetailsData.loanTermVariations; - this.interestPausesData = []; - data.interestPausesData?.forEach((item: any) => { - item.days = dates.calculateDiff(new Date(item.startDate), new Date(item.endDate)); - this.interestPausesData.push(item); + this.loanTermVariationsData = []; + data.loanDetailsData.loanTermVariations?.forEach((item: any) => { + item.days = dates.calculateDiff(new Date(item.termVariationApplicableFrom), new Date(item.dateValue)) + 1; + switch (item.termType.value) { + case 'emiAmount': + this.emiAmountData.push(item); + break; + case 'interestRate': + this.interestRateData.push(item); + break; + case 'deleteInstallment': + this.deleteInstallmentData.push(item); + break; + case 'dueDate': + this.dueDateData.push(item); + break; + case 'insertInstallment': + this.insertInstallmentData.push(item); + break; + case 'principalAmount': + this.principalAmountData.push(item); + break; + case 'graceOnInterest': + this.graceOnInterestData.push(item); + break; + case 'graceOnPrincipal': + this.graceOnPrincipalData.push(item); + break; + case 'extendRepaymentPeriod': + this.extendRepaymentPeriodData.push(item); + break; + case 'interestRateForInstallment': + this.interestRateFromInstallmentData.push(item); + break; + case 'interestPause': + this.interestPausesData.push(item); + break; + default: + this.invalidData.push(item); + break; + } }); + + if (this.deleteInstallmentData.length > 0) { + this.loanTermVariationsData.push({ + "label": "Delete Installment", + "data": this.deleteInstallmentData + }); + } + if (this.dueDateData.length > 0) { + this.loanTermVariationsData.push({ + "label": "Due Date", + "data": this.dueDateData + }); + } + if (this.emiAmountData.length > 0) { + this.loanTermVariationsData.push({ + "label": "EMI Amount", + "data": this.emiAmountData + }); + } + if (this.extendRepaymentPeriodData.length > 0) { + this.loanTermVariationsData.push({ + "label": "Extend Repayment Period", + "data": this.extendRepaymentPeriodData + }); + } + if (this.graceOnInterestData.length > 0) { + this.loanTermVariationsData.push({ + "label": "Grace On Interest", + "data": this.graceOnInterestData + }); + } + if (this.graceOnPrincipalData.length > 0) { + this.loanTermVariationsData.push({ + "label": "Grace On Principal", + "data": this.graceOnPrincipalData + }); + } + if (this.insertInstallmentData.length > 0) { + this.loanTermVariationsData.push({ + "label": "Insert Installment", + "data": this.insertInstallmentData + }); + } + if (this.interestPausesData.length > 0) { + this.loanTermVariationsData.push({ + "label": "Interest Pauses", + "data": this.interestPausesData + }); + } + if (this.interestRateData.length > 0) { + this.loanTermVariationsData.push({ + "label": "Interest Rate", + "data": this.interestRateData + }); + } + if (this.interestRateFromInstallmentData.length > 0) { + this.loanTermVariationsData.push({ + "label": "Interest Rate From Installment", + "data": this.interestRateFromInstallmentData + }); + } + if (this.principalAmountData.length > 0) { + this.loanTermVariationsData.push({ + "label": "Principal Amount", + "data": this.principalAmountData + }); + } }); } @@ -131,4 +239,8 @@ export class LoanTermVariationsTabComponent { .navigateByUrl(`/clients/${this.clientId}/loans-accounts`, { skipLocationChange: true }) .then(() => this.router.navigate([url])); } + + allowActions(termType: string): boolean { + return (termType === 'interestPause') + } } diff --git a/src/assets/translations/cs-CS.json b/src/assets/translations/cs-CS.json index d89223692..1482d3c29 100644 --- a/src/assets/translations/cs-CS.json +++ b/src/assets/translations/cs-CS.json @@ -1138,7 +1138,17 @@ "You have created": "Vytvořili jste", "You can drag and drop the rows to set a Payment Allocations order": "Řádky můžete přetáhnout a nastavit tak příkaz přidělení plateb", "successfully select option": "úspěšně. Chcete-li pokračovat dále, vyberte si z níže uvedených možností.", - "Map Charge-off reasons to Expense accounts": "Mapujte důvody pro zúčtování na výdajové účty" + "Map Charge-off reasons to Expense accounts": "Mapujte důvody pro zúčtování na výdajové účty", + "Interest Rate From Installment": "Úroková sazba ze splátky", + "Due Date": "Datum splatnosti", + "Delete Installment": "Smazat splátku", + "EMI Amount": "Částka EMI", + "Extend Repayment Period": "Prodloužit dobu splácení", + "Grace On Interest": "Grace On Interest", + "Grace On Principal": "Grace na ředitelce", + "Insert Installment": "Vložit splátku", + "Interest Rate": "Úroková sazba", + "Principal Amount": "Částka jistiny" }, "inputs": { "accounting": { diff --git a/src/assets/translations/de-DE.json b/src/assets/translations/de-DE.json index dd0447192..4ae9a70a7 100644 --- a/src/assets/translations/de-DE.json +++ b/src/assets/translations/de-DE.json @@ -1139,7 +1139,17 @@ "You have created": "Du hast erstellt", "You can drag and drop the rows to set a Payment Allocations order": "Sie können die Zeilen per Drag-and-Drop verschieben, um eine Zahlungszuordnungsreihenfolge festzulegen", "successfully select option": "erfolgreich. Bitte wählen Sie eine der folgenden Optionen aus, um fortzufahren.", - "Map Charge-off reasons to Expense accounts": "Abschreibungsgründe Aufwandskonten zuordnen" + "Map Charge-off reasons to Expense accounts": "Abschreibungsgründe Aufwandskonten zuordnen", + "Interest Rate From Installment": "Zinssatz ab Ratenzahlung", + "Due Date": "Fälligkeitsdatum", + "Delete Installment": "Rate löschen", + "EMI Amount": "EMI-Betrag", + "Extend Repayment Period": "Verlängern Sie die Rückzahlungsfrist", + "Grace On Interest": "Gnade auf Zinsen", + "Grace On Principal": "Grace On Principal", + "Insert Installment": "Ratenzahlung einfügen", + "Interest Rate": "Zinssatz", + "Principal Amount": "Hauptbetrag" }, "inputs": { "accounting": { diff --git a/src/assets/translations/en-US.json b/src/assets/translations/en-US.json index 5f97c008f..b4960d0d2 100644 --- a/src/assets/translations/en-US.json +++ b/src/assets/translations/en-US.json @@ -1140,7 +1140,17 @@ "You have created": "You have created", "You can drag and drop the rows to set a Payment Allocations order": "You can drag and drop the rows to set a Payment Allocations order", "successfully select option": "successfully. Please select from the options below to proceed further.", - "Map Charge-off reasons to Expense accounts": "Map Charge-off reasons to Expense accounts" + "Map Charge-off reasons to Expense accounts": "Map Charge-off reasons to Expense accounts", + "Interest Rate From Installment": "Interest Rate From Installment", + "Due Date": "Due Date", + "Delete Installment": "Delete Installment", + "EMI Amount": "EMI Amount", + "Extend Repayment Period": "Extend Repayment Period", + "Grace On Interest": "Grace On Interest", + "Grace On Principal": "Grace On Principal", + "Insert Installment": "Insert Installment", + "Interest Rate": "Interest Rate", + "Principal Amount": "Principal Amount" }, "inputs": { "accounting": { diff --git a/src/assets/translations/es-MX.json b/src/assets/translations/es-MX.json index ba123f1de..44776054d 100644 --- a/src/assets/translations/es-MX.json +++ b/src/assets/translations/es-MX.json @@ -1138,7 +1138,17 @@ "You have created": "tu has creado", "You can drag and drop the rows to set a Payment Allocations order": "Puede arrastrar y soltar las filas para establecer un orden de asignaciones de pago", "successfully select option": "exitosamente. Seleccione una de las opciones siguientes para continuar.", - "Map Charge-off reasons to Expense accounts": "Asignar motivos de cancelación a cuentas de gastos" + "Map Charge-off reasons to Expense accounts": "Asignar motivos de cancelación a cuentas de gastos", + "Interest Rate From Installment": "Tasa de interés a plazos", + "Due Date": "Fecha de vencimiento", + "Delete Installment": "Eliminar cuota", + "EMI Amount": "Monto de Cuota", + "Extend Repayment Period": "Ampliar el período de pago", + "Grace On Interest": "Gracia por interés", + "Grace On Principal": "Gracia al director", + "Insert Installment": "Insertar cuota", + "Interest Rate": "Tasa de interés", + "Principal Amount": "Monto principal" }, "inputs": { "accounting": { diff --git a/src/assets/translations/fr-FR.json b/src/assets/translations/fr-FR.json index 8602426ed..cb7983fa1 100644 --- a/src/assets/translations/fr-FR.json +++ b/src/assets/translations/fr-FR.json @@ -1139,7 +1139,17 @@ "You have created": "Vous avez créé", "You can drag and drop the rows to set a Payment Allocations order": "Vous pouvez faire glisser et déposer les lignes pour définir un ordre de répartition des paiements", "successfully select option": "avec succès. Veuillez sélectionner parmi les options ci-dessous pour continuer.", - "Map Charge-off reasons to Expense accounts": "Cartographier les motifs de radiation sur les comptes de dépenses" + "Map Charge-off reasons to Expense accounts": "Cartographier les motifs de radiation sur les comptes de dépenses", + "Interest Rate From Installment": "Taux d'intérêt à partir du versement", + "Due Date": "Date d'échéance", + "Delete Installment": "Supprimer le versement", + "EMI Amount": "Montant EMI", + "Extend Repayment Period": "Prolonger la période de remboursement", + "Grace On Interest": "Grâce sur les intérêts", + "Grace On Principal": "Grace sur le principal", + "Insert Installment": "Insérer un versement", + "Interest Rate": "Taux d'intérêt", + "Principal Amount": "Montant principal" }, "inputs": { "accounting": { diff --git a/src/assets/translations/it-IT.json b/src/assets/translations/it-IT.json index ad308e852..c518b26aa 100644 --- a/src/assets/translations/it-IT.json +++ b/src/assets/translations/it-IT.json @@ -1139,7 +1139,16 @@ "You have created": "Hai creato", "You can drag and drop the rows to set a Payment Allocations order": "Vous pouvez faire glisser et déposer les lignes pour définir un ordre de répartition des paiements", "successfully select option": "con successo. Seleziona una delle opzioni seguenti per procedere ulteriormente.", - "Map Charge-off reasons to Expense accounts": "Associa i motivi di addebito ai conti spese" + "Map Charge-off reasons to Expense accounts": "Associa i motivi di addebito ai conti spese", + "Interest Rate From Installment": "Tasso di interesse dalla rata", + "Due Date": "Scadenza", "Delete Installment": "Elimina rata", + "EMI Amount": "Importo EMI", + "Extend Repayment Period": "Estendere il periodo di rimborso", + "Grace On Interest": "Grazia sugli interessi", + "Grace On Principal": "Grace sul preside", + "Insert Installment": "Inserisci rata", + "Interest Rate": "Tasso di interesse", + "Principal Amount": "Importo principale" }, "inputs": { "accounting": { diff --git a/src/assets/translations/ko-KO.json b/src/assets/translations/ko-KO.json index 88b07585e..46cc92206 100644 --- a/src/assets/translations/ko-KO.json +++ b/src/assets/translations/ko-KO.json @@ -1140,7 +1140,17 @@ "You have created": "당신이 창조했습니다", "You can drag and drop the rows to set a Payment Allocations order": "행을 끌어서 놓아 지불 할당 순서를 설정할 수 있습니다.", "successfully select option": "성공적으로. 계속 진행하려면 아래 옵션 중에서 선택하세요.", - "Map Charge-off reasons to Expense accounts": "비용 계정에 대한 청구 취소 사유 매핑" + "Map Charge-off reasons to Expense accounts": "비용 계정에 대한 청구 취소 사유 매핑", + "Interest Rate From Installment": "할부이자율", + "Due Date": "만기일", + "Delete Installment": "할부 삭제", + "EMI Amount": "EMI 금액", + "Extend Repayment Period": "상환기간 연장", + "Grace On Interest": "은혜에 대한 관심", + "Grace On Principal": "그레이스 온 교장", + "Insert Installment": "할부 삽입", + "Interest Rate": "이자율", + "Principal Amount": "원금" }, "inputs": { "accounting": { diff --git a/src/assets/translations/lt-LT.json b/src/assets/translations/lt-LT.json index 93692a254..632805fdb 100644 --- a/src/assets/translations/lt-LT.json +++ b/src/assets/translations/lt-LT.json @@ -1139,7 +1139,17 @@ "You have created": "Jūs sukūrėte", "You can drag and drop the rows to set a Payment Allocations order": "Galite nuvilkti eilutes, kad nustatytumėte mokėjimo paskirstymo tvarką", "successfully select option": "sėkmingai. Jei norite tęsti, pasirinkite iš toliau pateiktų parinkčių.", - "Map Charge-off reasons to Expense accounts": "Nurodykite nurašymo priežastis išlaidų sąskaitoms" + "Map Charge-off reasons to Expense accounts": "Nurodykite nurašymo priežastis išlaidų sąskaitoms", + "Interest Rate From Installment": "Palūkanų norma nuo įmokos", + "Due Date": "Terminas", + "Delete Installment": "Ištrinti įmoką", + "EMI Amount": "EMI suma", + "Extend Repayment Period": "Prailginti grąžinimo laikotarpį", + "Grace On Interest": "Malonė dėl palūkanų", + "Grace On Principal": "Grace On Principal", + "Insert Installment": "Įdėkite įmoką", + "Interest Rate": "Palūkanų norma", + "Principal Amount": "Pagrindinė suma" }, "inputs": { "accounting": { diff --git a/src/assets/translations/lv-LV.json b/src/assets/translations/lv-LV.json index 8b6631404..10aa43fd6 100644 --- a/src/assets/translations/lv-LV.json +++ b/src/assets/translations/lv-LV.json @@ -1139,7 +1139,17 @@ "You have created": "Jūs esat izveidojis", "You can drag and drop the rows to set a Payment Allocations order": "Varat vilkt un nomest rindas, lai iestatītu maksājumu piešķiršanas pasūtījumu", "successfully select option": "veiksmīgi. Lūdzu, atlasiet kādu no tālāk norādītajām opcijām, lai turpinātu.", - "Map Charge-off reasons to Expense accounts": "Izmaksas iemeslu kartēšana izdevumu kontiem" + "Map Charge-off reasons to Expense accounts": "Izmaksas iemeslu kartēšana izdevumu kontiem", + "Interest Rate From Installment": "Procentu likme no nomaksas", + "Due Date": "Izpildes datums", + "Delete Installment": "Dzēst iemaksu", + "EMI Amount": "EMI summa", + "Extend Repayment Period": "Pagarināt atmaksas periodu", + "Grace On Interest": "Grace On Interest", + "Grace On Principal": "Grace On Principal", + "Insert Installment": "Ievietojiet iemaksu", + "Interest Rate": "Procentu likme", + "Principal Amount": "Pamatsumma" }, "inputs": { "accounting": { diff --git a/src/assets/translations/ne-NE.json b/src/assets/translations/ne-NE.json index c40f85950..203ad50a5 100644 --- a/src/assets/translations/ne-NE.json +++ b/src/assets/translations/ne-NE.json @@ -1139,7 +1139,17 @@ "You have created": "तपाईंले सिर्जना गर्नुभयो", "You can drag and drop the rows to set a Payment Allocations order": "तपाईंले भुक्तानी आवंटन आदेश सेट गर्न पङ्क्तिहरू तान्नुहोस् र छोड्न सक्नुहुन्छ", "successfully select option": "सफलतापूर्वक। अगाडि बढ्नको लागि कृपया तलका विकल्पहरूबाट चयन गर्नुहोस्।", - "Map Charge-off reasons to Expense accounts": "खर्च खाताहरूमा चार्ज-अफ कारणहरू नक्सा गर्नुहोस्" + "Map Charge-off reasons to Expense accounts": "खर्च खाताहरूमा चार्ज-अफ कारणहरू नक्सा गर्नुहोस्", + "Interest Rate From Installment": "किस्ताबाट ब्याज दर", + "Due Date": "अन्तिम मिति", + "Delete Installment": "किस्ता मेटाउनुहोस्", + "EMI Amount": "EMI रकम", + "Extend Repayment Period": "पुन: भुक्तानी अवधि विस्तार गर्नुहोस्", + "Grace On Interest": "ब्याज मा अनुग्रह", + "Grace On Principal": "प्रिन्सिपलमा अनुग्रह", + "Insert Installment": "किस्ता घुसाउनुहोस्", + "Interest Rate": "ब्याज दर", + "Principal Amount": "मूल रकम" }, "inputs": { "accounting": { diff --git a/src/assets/translations/pt-PT.json b/src/assets/translations/pt-PT.json index dd7b42964..ecd7d19db 100644 --- a/src/assets/translations/pt-PT.json +++ b/src/assets/translations/pt-PT.json @@ -1139,7 +1139,17 @@ "You have created": "Você criou", "You can drag and drop the rows to set a Payment Allocations order": "Você pode arrastar e soltar as linhas para definir um pedido de alocações de pagamento", "successfully select option": "com sucesso. Selecione uma das opções abaixo para prosseguir.", - "Map Charge-off reasons to Expense accounts": "Mapear os motivos de baixa para as contas de despesas" + "Map Charge-off reasons to Expense accounts": "Mapear os motivos de baixa para as contas de despesas", + "Interest Rate From Installment": "Taxa de juros da parcela", + "Due Date": "Data de vencimento", + "Delete Installment": "Excluir parcela", + "EMI Amount": "Valor EMI", + "Extend Repayment Period": "Estender o período de reembolso", + "Grace On Interest": "Graça em juros", + "Grace On Principal": "Graça no diretor", + "Insert Installment": "Inserir parcela", + "Interest Rate": "Taxa de juro", + "Principal Amount": "Valor principal" }, "inputs": { "accounting": { diff --git a/src/assets/translations/sw-SW.json b/src/assets/translations/sw-SW.json index bdc3363cf..7df57038a 100644 --- a/src/assets/translations/sw-SW.json +++ b/src/assets/translations/sw-SW.json @@ -1139,7 +1139,17 @@ "You have created": "Umeunda", "You can drag and drop the rows to set a Payment Allocations order": "Unaweza kuburuta na kudondosha safu mlalo ili kuweka agizo la Ugawaji wa Malipo", "successfully select option": "kwa mafanikio. Tafadhali chagua kutoka kwa chaguo zilizo hapa chini ili kuendelea zaidi.", - "Map Charge-off reasons to Expense accounts": "Sababu za Kutozwa kwa Ramani kwa akaunti za Gharama" + "Map Charge-off reasons to Expense accounts": "Sababu za Kutozwa kwa Ramani kwa akaunti za Gharama", + "Interest Rate From Installment": "Kiwango cha Riba Kutoka kwa Awamu", + "Due Date": "Tarehe ya Mwisho", + "Delete Installment": "Futa Ufungaji", + "EMI Amount": "Kiasi cha EMI", + "Extend Repayment Period": "Kuongeza Muda wa Kulipa", + "Grace On Interest": "Neema Juu ya Maslahi", + "Grace On Principal": "Grace On Principal", + "Insert Installment": "Weka Ufungaji", + "Interest Rate": "Kiwango cha Riba", + "Principal Amount": "Kiasi cha Mkuu" }, "inputs": { "accounting": {