WEB-622 To have a button for printing a loan application (#3046)

This commit is contained in:
Soni Jay
2026-01-24 15:37:54 -06:00
committed by GitHub
parent 88d819a126
commit d36e2b6cb5
15 changed files with 55 additions and 1 deletions
@@ -182,6 +182,18 @@
<ng-container matColumnDef="Actions"> <ng-container matColumnDef="Actions">
<th mat-header-cell class="center" *matHeaderCellDef>{{ 'labels.inputs.Actions' | translate }}</th> <th mat-header-cell class="center" *matHeaderCellDef>{{ 'labels.inputs.Actions' | translate }}</th>
<td mat-cell class="center" *matCellDef="let element"> <td mat-cell class="center" *matCellDef="let element">
<!-- Print Icon -->
<button
class="account-action-button"
mat-raised-button
color="accent"
matTooltip="{{ 'tooltips.Print Loan Application' | translate }}"
matTooltipPosition="above"
aria-label="{{ 'tooltips.Print Loan Application' | translate }}"
(click)="openLoanApplicationReport($event, element.id)"
>
<i class="fa fa-print"></i>
</button>
@if (element.status.active) { @if (element.status.active) {
<button <button
class="account-action-button" class="account-action-button"
@@ -304,6 +316,22 @@
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Closed Date' | translate }}</th> <th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Closed Date' | translate }}</th>
<td mat-cell *matCellDef="let element">{{ element.timeline.closedOnDate | dateFormat }}</td> <td mat-cell *matCellDef="let element">{{ element.timeline.closedOnDate | dateFormat }}</td>
</ng-container> </ng-container>
<ng-container matColumnDef="Actions">
<th mat-header-cell class="center" *matHeaderCellDef>{{ 'labels.inputs.Actions' | translate }}</th>
<td mat-cell class="center" *matCellDef="let element">
<!-- Print Icon -->
<button
class="account-action-button"
mat-raised-button
color="accent"
matTooltip="{{ 'tooltips.Print Loan Application' | translate }}"
matTooltipPosition="above"
(click)="openLoanApplicationReport($event, element.id)"
>
<i class="fa fa-print"></i>
</button>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="closedLoansColumns"></tr> <tr mat-header-row *matHeaderRowDef="closedLoansColumns"></tr>
<tr <tr
mat-row mat-row
@@ -8,6 +8,7 @@
/** Angular Imports */ /** Angular Imports */
import { Component, OnInit, inject } from '@angular/core'; import { Component, OnInit, inject } from '@angular/core';
import { environment } from '../../../../environments/environment';
import { Router, ActivatedRoute, RouterLink } from '@angular/router'; import { Router, ActivatedRoute, RouterLink } from '@angular/router';
/** Custom Services. */ /** Custom Services. */
@@ -66,6 +67,17 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
] ]
}) })
export class GeneralTabComponent { export class GeneralTabComponent {
openLoanApplicationReport(event: MouseEvent, loanId: string) {
event.stopPropagation();
const baseApiUrl = environment.baseApiUrl?.replace(/\/$/, '') || '';
const apiProvider = environment.apiProvider?.replace(/\/$/, '') || '';
const apiVersion = environment.apiVersion?.replace(/\/$/, '') || '';
const tenantIdentifier = environment.fineractPlatformTenantId || 'default';
const locale = environment.defaultLanguage || 'en';
const dateFormat = 'dd MMMM yyyy';
const reportUrl = `${baseApiUrl}${apiProvider}${apiVersion}/runreports/LoanApplicationReport?tenantIdentifier=${tenantIdentifier}&locale=${locale}&dateFormat=${encodeURIComponent(dateFormat)}&R_loanId=${loanId}&output-type=PDF`;
window.open(reportUrl, '_blank', 'noopener,noreferrer');
}
private route = inject(ActivatedRoute); private route = inject(ActivatedRoute);
private clientService = inject(ClientsService); private clientService = inject(ClientsService);
private router = inject(Router); private router = inject(Router);
@@ -88,7 +100,8 @@ export class GeneralTabComponent {
'Loan Balance', 'Loan Balance',
'Amount Paid', 'Amount Paid',
'Type', 'Type',
'Closed Date' 'Closed Date',
'Actions'
]; ];
/** Open Savings Accounts Columns */ /** Open Savings Accounts Columns */
openSavingsColumns: string[] = [ openSavingsColumns: string[] = [
+1
View File
@@ -3555,6 +3555,7 @@
"Activate": "aktivovat", "Activate": "aktivovat",
"Add": "Přidat", "Add": "Přidat",
"Add Filters": "Přidat filtry", "Add Filters": "Přidat filtry",
"Print Loan Application": "Tisknout žádost o úvěr",
"Adjust Charge": "Upravte nabíjení", "Adjust Charge": "Upravte nabíjení",
"After the minimum deposit term has passed": "Po uplynutí minimální doby vkladu mohou být stanoveny další doby trvání vkladu.", "After the minimum deposit term has passed": "Po uplynutí minimální doby vkladu mohou být stanoveny další doby trvání vkladu.",
"Allocate Cash": "Přidělte hotovost", "Allocate Cash": "Přidělte hotovost",
+1
View File
@@ -3555,6 +3555,7 @@
"Activate": "aktivieren Sie", "Activate": "aktivieren Sie",
"Add": "Hinzufügen", "Add": "Hinzufügen",
"Add Filters": "Filter hinzufügen", "Add Filters": "Filter hinzufügen",
"Print Loan Application": "Darlehensantrag drucken",
"Adjust Charge": "Ladung anpassen", "Adjust Charge": "Ladung anpassen",
"After the minimum deposit term has passed": "Nach Ablauf der Mindesteinzahlungsdauer können zusätzliche Einzahlungsdauern festgelegt werden.", "After the minimum deposit term has passed": "Nach Ablauf der Mindesteinzahlungsdauer können zusätzliche Einzahlungsdauern festgelegt werden.",
"Allocate Cash": "Bargeld zuweisen", "Allocate Cash": "Bargeld zuweisen",
+1
View File
@@ -3667,6 +3667,7 @@
"Activate": "Activate", "Activate": "Activate",
"Add": "Add", "Add": "Add",
"Add Filters": "Add Filters", "Add Filters": "Add Filters",
"Print Loan Application": "Print Loan Application",
"Adjust Charge": "Adjust Charge", "Adjust Charge": "Adjust Charge",
"After the minimum deposit term has passed": "After the minimum deposit term has passed, additional deposit durations may be specified.", "After the minimum deposit term has passed": "After the minimum deposit term has passed, additional deposit durations may be specified.",
"Allocate Cash": "Allocate Cash", "Allocate Cash": "Allocate Cash",
+1
View File
@@ -3558,6 +3558,7 @@
"Add future share value with date range": "Agregar valor compartido futuro con rango de fechas", "Add future share value with date range": "Agregar valor compartido futuro con rango de fechas",
"Activate": "Activar", "Activate": "Activar",
"Add": "Agregar", "Add": "Agregar",
"Print Loan Application": "Imprimir solicitud de préstamo",
"Add Filters": "Agregar filtros", "Add Filters": "Agregar filtros",
"Adjust Charge": "Ajustar Comisión", "Adjust Charge": "Ajustar Comisión",
"After the minimum deposit term has passed": "Una vez transcurrido el plazo mínimo de depósito, se pueden especificar duraciones de depósito adicionales.", "After the minimum deposit term has passed": "Una vez transcurrido el plazo mínimo de depósito, se pueden especificar duraciones de depósito adicionales.",
+1
View File
@@ -3562,6 +3562,7 @@
"Activate": "Activar", "Activate": "Activar",
"Add": "Agregar", "Add": "Agregar",
"Add Filters": "Agregar filtros", "Add Filters": "Agregar filtros",
"Print Loan Application": "Imprimir solicitud de préstamo",
"Adjust Charge": "Ajustar Comisión", "Adjust Charge": "Ajustar Comisión",
"After the minimum deposit term has passed": "Una vez transcurrido el plazo mínimo de depósito, se pueden especificar duraciones de depósito adicionales.", "After the minimum deposit term has passed": "Una vez transcurrido el plazo mínimo de depósito, se pueden especificar duraciones de depósito adicionales.",
"Allocate Cash": "Asignar efectivo", "Allocate Cash": "Asignar efectivo",
+1
View File
@@ -3557,6 +3557,7 @@
"Activate": "Activer", "Activate": "Activer",
"Add": "Ajouter", "Add": "Ajouter",
"Add Filters": "Ajouter des filtres", "Add Filters": "Ajouter des filtres",
"Print Loan Application": "Imprimer la demande de prêt",
"Adjust Charge": "Ajuster les frais", "Adjust Charge": "Ajuster les frais",
"After the minimum deposit term has passed": "Une fois la durée minimale de dépôt dépassée, des durées de dépôt supplémentaires peuvent être spécifiées.", "After the minimum deposit term has passed": "Une fois la durée minimale de dépôt dépassée, des durées de dépôt supplémentaires peuvent être spécifiées.",
"Allocate Cash": "Allouer de l'argent", "Allocate Cash": "Allouer de l'argent",
+1
View File
@@ -3557,6 +3557,7 @@
"Activate": "Attivare", "Activate": "Attivare",
"Add": "Aggiungere", "Add": "Aggiungere",
"Add Filters": "Aggiungi filtri", "Add Filters": "Aggiungi filtri",
"Print Loan Application": "Stampa domanda di prestito",
"Adjust Charge": "Regola la carica", "Adjust Charge": "Regola la carica",
"After the minimum deposit term has passed": "Una volta trascorso il termine minimo di deposito, è possibile specificare durate di deposito aggiuntive.", "After the minimum deposit term has passed": "Una volta trascorso il termine minimo di deposito, è possibile specificare durate di deposito aggiuntive.",
"Allocate Cash": "Assegnare contanti", "Allocate Cash": "Assegnare contanti",
+1
View File
@@ -3558,6 +3558,7 @@
"Activate": "활성화", "Activate": "활성화",
"Add": "추가하다", "Add": "추가하다",
"Add Filters": "필터 추가", "Add Filters": "필터 추가",
"Print Loan Application": "대출 신청서 인쇄",
"Adjust Charge": "요금 조정", "Adjust Charge": "요금 조정",
"After the minimum deposit term has passed": "최소 입금 기간이 지난 후 추가 입금 기간을 지정할 수 있습니다.", "After the minimum deposit term has passed": "최소 입금 기간이 지난 후 추가 입금 기간을 지정할 수 있습니다.",
"Allocate Cash": "현금 할당", "Allocate Cash": "현금 할당",
+1
View File
@@ -3558,6 +3558,7 @@
"Activate": "Suaktyvinti", "Activate": "Suaktyvinti",
"Add": "Papildyti", "Add": "Papildyti",
"Add Filters": "Pridėti filtrus", "Add Filters": "Pridėti filtrus",
"Print Loan Application": "Spausdinti paskolos paraišką",
"Adjust Charge": "Sureguliuokite įkrovimą", "Adjust Charge": "Sureguliuokite įkrovimą",
"After the minimum deposit term has passed": "Pasibaigus minimaliam indėlio terminui, gali būti nurodytos papildomos indėlio trukmės.", "After the minimum deposit term has passed": "Pasibaigus minimaliam indėlio terminui, gali būti nurodytos papildomos indėlio trukmės.",
"Allocate Cash": "Paskirstykite grynuosius pinigus", "Allocate Cash": "Paskirstykite grynuosius pinigus",
+1
View File
@@ -3558,6 +3558,7 @@
"Activate": "Aktivizēt", "Activate": "Aktivizēt",
"Add": "Pievienot", "Add": "Pievienot",
"Add Filters": "Pievienot filtrus", "Add Filters": "Pievienot filtrus",
"Print Loan Application": "Drukāt aizdevuma pieteikumu",
"Adjust Charge": "Pielāgojiet uzlādi", "Adjust Charge": "Pielāgojiet uzlādi",
"After the minimum deposit term has passed": "Pēc minimālā depozīta termiņa beigām var tikt noteikti papildu depozīta termiņi.", "After the minimum deposit term has passed": "Pēc minimālā depozīta termiņa beigām var tikt noteikti papildu depozīta termiņi.",
"Allocate Cash": "Piešķirt skaidru naudu", "Allocate Cash": "Piešķirt skaidru naudu",
+1
View File
@@ -3558,6 +3558,7 @@
"Add": "थप्नुहोस्", "Add": "थप्नुहोस्",
"Add Filters": "फिल्टरहरू थप्नुहोस्", "Add Filters": "फिल्टरहरू थप्नुहोस्",
"Adjust Charge": "चार्ज समायोजन गर्नुहोस्", "Adjust Charge": "चार्ज समायोजन गर्नुहोस्",
"Print Loan Application": "ऋण आवेदन छाप्नुहोस्",
"After the minimum deposit term has passed": "न्यूनतम जम्मा अवधि समाप्त भएपछि, थप जम्मा अवधि निर्दिष्ट गर्न सकिन्छ।", "After the minimum deposit term has passed": "न्यूनतम जम्मा अवधि समाप्त भएपछि, थप जम्मा अवधि निर्दिष्ट गर्न सकिन्छ।",
"Allocate Cash": "नगद आवंटित गर्नुहोस्", "Allocate Cash": "नगद आवंटित गर्नुहोस्",
"Allowed": "अनुमति दिइयो", "Allowed": "अनुमति दिइयो",
+1
View File
@@ -3558,6 +3558,7 @@
"Activate": "Ativar", "Activate": "Ativar",
"Add": "Adicionar", "Add": "Adicionar",
"Add Filters": "Adicionar filtros", "Add Filters": "Adicionar filtros",
"Print Loan Application": "Imprimir Pedido de Empréstimo",
"Adjust Charge": "Ajustar carga", "Adjust Charge": "Ajustar carga",
"After the minimum deposit term has passed": "Depois que o prazo mínimo de depósito tiver passado, durações adicionais de depósito poderão ser especificadas.", "After the minimum deposit term has passed": "Depois que o prazo mínimo de depósito tiver passado, durações adicionais de depósito poderão ser especificadas.",
"Allocate Cash": "Alocar dinheiro", "Allocate Cash": "Alocar dinheiro",
+1
View File
@@ -3558,6 +3558,7 @@
"After the minimum deposit term has passed": "Baada ya muda wa chini wa amana kupita, muda wa ziada wa amana unaweza kubainishwa.", "After the minimum deposit term has passed": "Baada ya muda wa chini wa amana kupita, muda wa ziada wa amana unaweza kubainishwa.",
"Allocate Cash": "Tenga Pesa", "Allocate Cash": "Tenga Pesa",
"Allowed": "Ruhusiwa", "Allowed": "Ruhusiwa",
"Print Loan Application": "Chapisha Ombi la Mkopo",
"Amount to be rounded off": "Kiasi kitakachopunguzwa (mfano: raundi 100 hadi 200, 300, 400, n.k)", "Amount to be rounded off": "Kiasi kitakachopunguzwa (mfano: raundi 100 hadi 200, 300, 400, n.k)",
"An boolean flag to attach": "Alama ya boolean ya kuambatisha ushuru kwa uchapishaji wa faida", "An boolean flag to attach": "Alama ya boolean ya kuambatisha ushuru kwa uchapishaji wa faida",
"An boolean flag to attach taxes to interest posting": "Alama ya boolean ya kuambatisha ushuru kwa uchapishaji wa faida", "An boolean flag to attach taxes to interest posting": "Alama ya boolean ya kuambatisha ushuru kwa uchapishaji wa faida",