Merge pull request #2499 from alberto-art3ch/fix/web_view_display_issues_01

fix: Display issues
This commit is contained in:
Jose Alberto Hernandez
2025-06-06 22:01:20 -05:00
committed by GitHub
18 changed files with 431 additions and 2116 deletions
+337 -2050
View File
File diff suppressed because it is too large Load Diff
@@ -153,7 +153,7 @@
<mat-icon>more_vert</mat-icon> <mat-icon>more_vert</mat-icon>
</button> </button>
<mat-menu #transactionMenu="matMenu"> <mat-menu #transactionMenu="matMenu">
<span *ngIf="!isReAgoeOrReAmortize(transaction.type)"> <span *ngIf="showTransaction(transaction)">
<button mat-menu-item (click)="showTransactions(transaction)"> <button mat-menu-item (click)="showTransactions(transaction)">
<mat-icon><fa-icon icon="eye" size="sm"></fa-icon></mat-icon> <mat-icon><fa-icon icon="eye" size="sm"></fa-icon></mat-icon>
<span>{{ 'labels.text.View Transaction' | translate }}</span> <span>{{ 'labels.text.View Transaction' | translate }}</span>
@@ -141,7 +141,10 @@ export class TransactionsTabComponent implements OnInit {
if (hideAccrual || hideReversed) { if (hideAccrual || hideReversed) {
transactions = this.transactionsData.filter((t: LoanTransaction) => { transactions = this.transactionsData.filter((t: LoanTransaction) => {
return !(hideReversed && t.manuallyReversed) && !(hideAccrual && t.type.accrual); return (
!(hideReversed && t.manuallyReversed) &&
!(hideAccrual && (t.type.accrual || t.type.capitalizedIncomeAmortization))
);
}); });
} }
this.dataSource = new MatTableDataSource(transactions); this.dataSource = new MatTableDataSource(transactions);
@@ -160,6 +163,16 @@ export class TransactionsTabComponent implements OnInit {
/** /**
* Show Transactions Details * Show Transactions Details
* @param transactionsData Transactions Data * @param transactionsData Transactions Data
*/
showTransactions(transactionsData: LoanTransaction) {
if (this.showTransaction(transactionsData)) {
this.router.navigate([transactionsData.id], { relativeTo: this.route });
}
}
/**
* Show Transaction Details
* @param transactionsData Transaction Data
* DISBURSEMENT:1 * DISBURSEMENT:1
* REPAYMENT:2 * REPAYMENT:2
* WAIVE_INTEREST:4 * WAIVE_INTEREST:4
@@ -182,29 +195,29 @@ export class TransactionsTabComponent implements OnInit {
* REAMORTIZE:30 * REAMORTIZE:30
* INTEREST REFUND:33 * INTEREST REFUND:33
* CAPITALIZED INCOME:35 * CAPITALIZED INCOME:35
* CAPITALIZED INCOME ADJUSTMENT:37
* CONTRACT_TERMINATION:90 * CONTRACT_TERMINATION:90
*/ */
showTransactions(transactionsData: LoanTransaction) { showTransaction(transactionsData: LoanTransaction): boolean {
if ([ return [
1, 1,
2, 2,
4, 4,
9, 9,
20, 20,
21, 21,
22, 22,
23, 23,
26, 26,
28, 28,
29, 29,
30, 30,
31, 31,
33, 33,
35, 35,
90 37,
].includes(transactionsData.type.id)) { 90
this.router.navigate([transactionsData.id], { relativeTo: this.route }); ].includes(transactionsData.type.id);
}
} }
allowUndoTransaction(transaction: LoanTransaction) { allowUndoTransaction(transaction: LoanTransaction) {
@@ -226,7 +239,7 @@ export class TransactionsTabComponent implements OnInit {
if (transaction.transactionRelations && transaction.transactionRelations.length > 0) { if (transaction.transactionRelations && transaction.transactionRelations.length > 0) {
return 'linked'; return 'linked';
} }
if (this.isAccrual(transaction.type)) { if (this.isAccrual(transaction.type) || this.isCapitalizedIncomeAmortization(transaction.type)) {
return 'accrual'; return 'accrual';
} }
if (this.isChargeOff(transaction.type)) { if (this.isChargeOff(transaction.type)) {
@@ -348,6 +361,13 @@ export class TransactionsTabComponent implements OnInit {
return transactionType.capitalizedIncome || transactionType.code === 'loanTransactionType.capitalizedIncome'; return transactionType.capitalizedIncome || transactionType.code === 'loanTransactionType.capitalizedIncome';
} }
private isCapitalizedIncomeAmortization(transactionType: LoanTransactionType): boolean {
return (
transactionType.capitalizedIncomeAmortization ||
transactionType.code === 'loanTransactionType.capitalizedIncomeAmortization'
);
}
private isReAgoeOrReAmortize(transactionType: LoanTransactionType): boolean { private isReAgoeOrReAmortize(transactionType: LoanTransactionType): boolean {
return this.isReAmortize(transactionType) || this.isReAge(transactionType); return this.isReAmortize(transactionType) || this.isReAge(transactionType);
} }
@@ -34,4 +34,6 @@ export interface LoanTransactionType {
reAmortize: boolean; reAmortize: boolean;
capitalizedIncome: boolean; capitalizedIncome: boolean;
capitalizedIncomeAdjustment: boolean; capitalizedIncomeAdjustment: boolean;
capitalizedIncomeAmortization: boolean;
capitalizedIncomeAmortizationAdjustment: boolean;
} }
+1 -1
View File
@@ -12,6 +12,6 @@ export class YesnoPipe implements PipeTransform {
return null; return null;
} }
const result = value ? 'Yes' : 'No'; const result = value ? 'Yes' : 'No';
return this.translateService.instant('tooltips.' + result); return this.translateService.instant('labels.buttons.' + result);
} }
} }
@@ -54,7 +54,9 @@ export class LoanProductCapitalizedIncomeStepComponent implements OnChanges {
} }
ngOnChanges(changes: SimpleChanges): void { ngOnChanges(changes: SimpleChanges): void {
this.enableIncomeCapitalization = this.capitalizedIncome.enableIncomeCapitalization; this.enableIncomeCapitalization = this.capitalizedIncome
? this.capitalizedIncome.enableIncomeCapitalization
: false;
if (this.enableIncomeCapitalization) { if (this.enableIncomeCapitalization) {
this.loanIncomeCapitalizationForm.patchValue({ this.loanIncomeCapitalizationForm.patchValue({
enableIncomeCapitalization: this.enableIncomeCapitalization, enableIncomeCapitalization: this.enableIncomeCapitalization,
@@ -259,7 +259,7 @@
aria-label="Clear" aria-label="Clear"
(click)="clearProperty($event, 'delinquencyBucketId')" (click)="clearProperty($event, 'delinquencyBucketId')"
> >
<i class="fa fa-close"></i> <fa-icon icon="close" size="md"></fa-icon>
</button> </button>
</mat-form-field> </mat-form-field>
@@ -1,6 +1,6 @@
<div class="container"> <div class="container">
<div *ngIf="!hideOutput && !toBeExportedToRepo"> <div *ngIf="!hideOutput && !toBeExportedToRepo">
<div class="m-b-10 gap-25px align-end" *ngIf="dataObject.report.type === 'Table'"> <div class="m-b-10 gap-45px" align="end" *ngIf="dataObject.report.type === 'Table'">
<button <button
mat-raised-button mat-raised-button
color="primary" color="primary"
@@ -1,4 +1,3 @@
#language-selector, ::ng-deep .mat-form-field-underline {
.languageselector { background-color: transparent;
// max-width: 6rem;
} }
@@ -10,18 +10,18 @@
<mat-card> <mat-card>
<form [formGroup]="businessDateForm"> <form [formGroup]="businessDateForm">
<mat-card-content> <mat-card-content>
<div class="flex-fill layout-row-wrap gap-2percent layout-lt-md-column space"> <div class="flex-100 layout-row layout-lt-md-column space">
<div class="flex-50"> <div class="flex-50">
<span class="date-type flex-40">{{ 'labels.inputs.User date format' | translate }}: </span> <span class="date-type flex-40">{{ 'labels.inputs.User date format' | translate }}: </span>
<span class="date-value flex-60">{{ userDateFormat }}</span> <span class="date-value flex-60 m-l-30">{{ userDateFormat }}</span>
</div> </div>
</div> </div>
<!-- Business Date --> <!-- Business Date -->
<div class="flex-fill layout-row-wrap gap-2percent layout-lt-md-column"> <div class="flex-100 layout-row layout-lt-md-column">
<div class="flex-50" *ngIf="!isEditInProgress"> <div class="flex-50 table-row" *ngIf="!isEditInProgress">
<span class="date-type flex-40">{{ 'labels.inputs.Business Date' | translate }}: </span> <span class="date-type flex-40">{{ 'labels.inputs.Business Date' | translate }}: </span>
<span class="date-value flex-60">{{ businessDate | dateFormat }}</span> <span class="date-value flex-60 m-l-40">{{ businessDate | dateFormat }}</span>
</div> </div>
<mat-form-field (click)="businessDatePicker.open()" *ngIf="isEditInProgress && dateIndex === 0"> <mat-form-field (click)="businessDatePicker.open()" *ngIf="isEditInProgress && dateIndex === 0">
@@ -71,10 +71,10 @@
</div> </div>
<!-- COB Date --> <!-- COB Date -->
<div class="flex-fill layout-row-wrap gap-2percent layout-lt-md-column"> <div class="flex-100 layout-row layout-lt-md-column">
<div class="flex-50" *ngIf="!isEditInProgress"> <div class="flex-50 table-row" *ngIf="!isEditInProgress">
<span class="date-type">{{ 'labels.inputs.COB Date' | translate }}: </span> <span class="date-type">{{ 'labels.inputs.COB Date' | translate }}: </span>
<span class="date-value flex-60">{{ cobDate | dateFormat }}</span> <span class="date-value flex-60 m-l-80">{{ cobDate | dateFormat }}</span>
</div> </div>
<mat-form-field (click)="cobDatePicker.open()" *ngIf="isEditInProgress && dateIndex === 1"> <mat-form-field (click)="cobDatePicker.open()" *ngIf="isEditInProgress && dateIndex === 1">
@@ -13,3 +13,7 @@
font-size: 1rem; font-size: 1rem;
min-width: 50%; min-width: 50%;
} }
.table-row {
vertical-align: middle;
}
@@ -47,7 +47,7 @@
</mat-card-content> </mat-card-content>
<mat-card-actions> <mat-card-actions>
<div class="layout-row layout-align-center gap-2percent column-on-mobile"> <div class="layout-row layout-align-center flex-100 column-on-mobile">
<button type="button" color="primary" mat-raised-button [routerLink]="['../']"> <button type="button" color="primary" mat-raised-button [routerLink]="['../']">
{{ 'labels.buttons.Back' | translate }} {{ 'labels.buttons.Back' | translate }}
</button> </button>
@@ -2,8 +2,8 @@
<mat-card> <mat-card>
<form [formGroup]="reportForm" (ngSubmit)="submit()"> <form [formGroup]="reportForm" (ngSubmit)="submit()">
<mat-card-content> <mat-card-content>
<div class="layout-row-wrap responsive-column gap-4percent"> <div class="layout-row-wrap responsive-column">
<mat-form-field class="flex-30"> <mat-form-field class="flex-100">
<mat-label>{{ 'labels.inputs.Report Name' | translate }}</mat-label> <mat-label>{{ 'labels.inputs.Report Name' | translate }}</mat-label>
<input matInput required formControlName="reportName" /> <input matInput required formControlName="reportName" />
<mat-error *ngIf="reportForm.controls.reportName.hasError('required')"> <mat-error *ngIf="reportForm.controls.reportName.hasError('required')">
@@ -12,7 +12,7 @@
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field class="flex-30"> <mat-form-field class="flex-50">
<mat-label>{{ 'labels.inputs.Report Type' | translate }}</mat-label> <mat-label>{{ 'labels.inputs.Report Type' | translate }}</mat-label>
<mat-select required formControlName="reportType"> <mat-select required formControlName="reportType">
<mat-option <mat-option
@@ -28,7 +28,7 @@
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field class="flex-30"> <mat-form-field class="flex-50">
<mat-label>{{ 'labels.inputs.Report Sub Type' | translate }}</mat-label> <mat-label>{{ 'labels.inputs.Report Sub Type' | translate }}</mat-label>
<mat-select formControlName="reportSubType"> <mat-select formControlName="reportSubType">
<mat-option <mat-option
@@ -39,10 +39,8 @@
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
</div>
<div class="layout-row-wrap responsive-column gap-4percent"> <mat-form-field class="flex-50">
<mat-form-field class="flex-40">
<mat-label>{{ 'labels.inputs.Report Category' | translate }}</mat-label> <mat-label>{{ 'labels.inputs.Report Category' | translate }}</mat-label>
<mat-select formControlName="reportCategory"> <mat-select formControlName="reportCategory">
<mat-option *ngFor="let reportCategoryType of reportCategoryTypeOptions" [value]="reportCategoryType"> <mat-option *ngFor="let reportCategoryType of reportCategoryTypeOptions" [value]="reportCategoryType">
@@ -51,15 +49,13 @@
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<div class="user-report-wrapper flex-10"> <div class="user-report-wrapper flex-50">
<mat-checkbox class="user-report" labelPosition="after" formControlName="useReport"> <mat-checkbox class="user-report" labelPosition="after" formControlName="useReport">
{{ 'labels.inputs.User Report (UI)' | translate }} {{ 'labels.inputs.User Report (UI)' | translate }}
</mat-checkbox> </mat-checkbox>
</div> </div>
</div>
<div class="layout-column"> <mat-form-field class="flex-100">
<mat-form-field class="flex-98">
<mat-label>{{ 'labels.inputs.Description' | translate }}</mat-label> <mat-label>{{ 'labels.inputs.Description' | translate }}</mat-label>
<textarea matInput formControlName="description" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea> <textarea matInput formControlName="description" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
</mat-form-field> </mat-form-field>
@@ -129,7 +129,8 @@ export class CreateReportComponent implements OnInit {
this.dataForDialog.parameterName = undefined; this.dataForDialog.parameterName = undefined;
this.dataForDialog.reportParameterName = undefined; this.dataForDialog.reportParameterName = undefined;
const addReportParameterDialogRef = this.dialog.open(ReportParameterDialogComponent, { const addReportParameterDialogRef = this.dialog.open(ReportParameterDialogComponent, {
data: this.dataForDialog data: { ...this.dataForDialog, layout: { addButtonText: 'Add' } },
width: '25rem'
}); });
addReportParameterDialogRef.afterClosed().subscribe((response: any) => { addReportParameterDialogRef.afterClosed().subscribe((response: any) => {
if (response !== '') { if (response !== '') {
@@ -2,8 +2,8 @@
<mat-card> <mat-card>
<form [formGroup]="reportForm" (ngSubmit)="submit()"> <form [formGroup]="reportForm" (ngSubmit)="submit()">
<mat-card-content> <mat-card-content>
<div class="layout-row-wrap responsive-column gap-4percent"> <div class="layout-row-wrap responsive-column">
<mat-form-field class="flex-30"> <mat-form-field class="flex-100">
<mat-label>{{ 'labels.inputs.Report Name' | translate }}</mat-label> <mat-label>{{ 'labels.inputs.Report Name' | translate }}</mat-label>
<input matInput required formControlName="reportName" /> <input matInput required formControlName="reportName" />
<mat-error *ngIf="reportForm.controls.reportName.hasError('required')"> <mat-error *ngIf="reportForm.controls.reportName.hasError('required')">
@@ -12,7 +12,7 @@
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field class="flex-30"> <mat-form-field class="flex-50">
<mat-label>{{ 'labels.inputs.Report Type' | translate }}</mat-label> <mat-label>{{ 'labels.inputs.Report Type' | translate }}</mat-label>
<mat-select required formControlName="reportType"> <mat-select required formControlName="reportType">
<mat-option *ngFor="let allowedReportType of reportData.allowedReportTypes" [value]="allowedReportType"> <mat-option *ngFor="let allowedReportType of reportData.allowedReportTypes" [value]="allowedReportType">
@@ -25,7 +25,7 @@
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field class="flex-30"> <mat-form-field class="flex-50">
<mat-label>{{ 'labels.inputs.Report Sub Type' | translate }}</mat-label> <mat-label>{{ 'labels.inputs.Report Sub Type' | translate }}</mat-label>
<mat-select formControlName="reportSubType"> <mat-select formControlName="reportSubType">
<mat-option <mat-option
@@ -36,10 +36,8 @@
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
</div>
<div class="layout-row-wrap responsive-column gap-4percent"> <mat-form-field class="flex-50">
<mat-form-field class="flex-40">
<mat-label>{{ 'labels.inputs.Report Category' | translate }}</mat-label> <mat-label>{{ 'labels.inputs.Report Category' | translate }}</mat-label>
<mat-select formControlName="reportCategory"> <mat-select formControlName="reportCategory">
<mat-option *ngFor="let reportCategoryType of reportCategoryTypeOptions" [value]="reportCategoryType"> <mat-option *ngFor="let reportCategoryType of reportCategoryTypeOptions" [value]="reportCategoryType">
@@ -48,15 +46,13 @@
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<div class="user-report-wrapper flex-10"> <div class="flex-50">
<mat-checkbox class="user-report" labelPosition="after" formControlName="useReport"> <mat-checkbox class="user-report" labelPosition="after" formControlName="useReport">
{{ 'labels.inputs.User Report (UI)' | translate }} {{ 'labels.inputs.User Report (UI)' | translate }}
</mat-checkbox> </mat-checkbox>
</div> </div>
</div>
<div class="layout-column"> <mat-form-field class="flex-100">
<mat-form-field class="flex-98">
<mat-label>{{ 'labels.inputs.Description' | translate }}</mat-label> <mat-label>{{ 'labels.inputs.Description' | translate }}</mat-label>
<textarea matInput formControlName="description" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea> <textarea matInput formControlName="description" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
</mat-form-field> </mat-form-field>
@@ -14,7 +14,11 @@
<div class="container"> <div class="container">
<mat-card> <mat-card>
<mat-card-title>{{ reportData.reportName }}</mat-card-title> <mat-card-title class="layout-row-wrap flex-100">
<div class="flex-100 report-name">
{{ 'labels.catalogs.Report' | translate }} : <b>{{ reportData.reportName }}</b>
</div>
</mat-card-title>
<mat-card-content> <mat-card-content>
<div class="layout-row-wrap"> <div class="layout-row-wrap">
@@ -8,3 +8,7 @@
} }
} }
} }
.report-name {
margin: 18px;
}
+2 -2
View File
@@ -2,8 +2,8 @@
/* tslint:disable */ /* tslint:disable */
export default { export default {
'mifos_x': { 'mifos_x': {
'version': '250602', 'version': '250605',
'hash': 'gc4f18fd7' 'hash': '1d6b6fd7'
}, },
'allow_switching_backend_instance': true 'allow_switching_backend_instance': true
}; };