Upgrading to Angular 20:

Replaced checked in package-lock.json by regenerated one.
Ran ng update @angular/core@20 @angular/cli@20
Ran npm install @angular-builders/jest@^20.0.0 @fortawesome/angular-fontawesome@^3.0.0 @swimlane/ngx-graph@^11
Ran npm install ngx-mat-select-search@^8.0.2.
Ran ng update @angular/material@20.
Updated all eslint and typescript to the latest versions.
Removed @angular-devkit/schematics.
Updated fontawesome.
Updated rxjs and tslib.
Moved required node version from 16 to 20.
Updated jest-preset-angular.
Set preserveWhitespaces to false.
Corrected two type declarations in two typescript files to make ng serve run without errors.
Removed unused angular-devkit/schematics from view-user.component.ts .
Updated list of supported browsers.
Upgraded prettier.
Ran prettier . --write the first time.
Ran prettier . --write the second time.
Ran ng generate @angular/core:inject with defaults, excepted a handful of files.
Fixed remaining eslint problems.
Added dist directory to ignores in eslint.config.js.
Let prettier fix formatting, almost everything is just line breaks.
Made htmlhint ignore @if and @for Angular constructs.
Updated node version in Github workflow to 22.12.0 (build.yml).
Updated .env.ts.
Updated Angular datetime format strings from YYYY-MM-DD to yyyy-MM-dd.
Merged changes from dev into angular20 branch.
This commit is contained in:
Felix van Hove
2025-12-08 11:01:01 +01:00
parent f1b4ec2cf2
commit 7fd1486c08
1516 changed files with 39367 additions and 36037 deletions
@@ -7,85 +7,92 @@
<h3>{{ 'labels.heading.Loan Tranche Details' | translate }}</h3>
<div class="layout-row margin-t layout-xs-column layout-align-end gap-2percent">
<button mat-raised-button color="primary" *ngIf="showAddTrancheButtons()" (click)="addDisbursementDataEntry()">
<fa-icon icon="plus" class="m-r-10"></fa-icon>{{ 'labels.buttons.Add' | translate }}
</button>
<button mat-raised-button color="primary" *ngIf="!pristine" (click)="editDisbursementData()">
{{ 'labels.buttons.Apply Changes' | translate }}
</button>
@if (showAddTrancheButtons()) {
<button mat-raised-button color="primary" (click)="addDisbursementDataEntry()">
<fa-icon icon="plus" class="m-r-10"></fa-icon>{{ 'labels.buttons.Add' | translate }}
</button>
}
@if (!pristine) {
<button mat-raised-button color="primary" (click)="editDisbursementData()">
{{ 'labels.buttons.Apply Changes' | translate }}
</button>
}
</div>
<table mat-table [dataSource]="disbursementDataSource" *ngIf="disbursementDataSource.length > 0">
<ng-container matColumnDef="expected disbursement on">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Expected Disbursement On' | translate }}</th>
<td mat-cell *matCellDef="let ele">{{ ele.expectedDisbursementDate | dateFormat }}</td>
</ng-container>
<ng-container matColumnDef="disbursed on">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Disbursed On' | translate }}</th>
<td mat-cell *matCellDef="let ele">
<span *ngIf="ele.actualDisbursementDate">
{{ ele.actualDisbursementDate | dateFormat }}
</span>
</td>
</ng-container>
<ng-container matColumnDef="principal">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Principal' | translate }}</th>
<td mat-cell *matCellDef="let ele">{{ ele.principal }}</td>
</ng-container>
<ng-container matColumnDef="action">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Actions' | translate }}</th>
<td mat-cell *matCellDef="let ele; let rowIndex = index">
<span *ngIf="ele.actualDisbursementDate">
<i class="fa fa-check"></i>
</span>
<button
type="button"
mat-icon-button
color="primary"
(click)="editDisbursementDataEntry(rowIndex)"
matTooltip="{{ 'tooltips.Edit' | translate }}"
matTooltipPosition="left"
*ngIf="!ele.actualDisbursementDate && showActionsTrancheButtons()"
>
<fa-icon icon="edit"></fa-icon>
</button>
<button
type="button"
mat-icon-button
color="warn"
(click)="removeDisbursementDataEntry(rowIndex)"
matTooltip="{{ 'tooltips.Delete' | translate }}"
matTooltipPosition="left"
*ngIf="!ele.actualDisbursementDate && showActionsTrancheButtons()"
>
<fa-icon icon="trash"></fa-icon>
</button>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="expectedDisbursementColumns"></tr>
<tr mat-row *matRowDef="let row; columns: expectedDisbursementColumns"></tr>
</table>
<div *ngIf="loanDetails.emiAmountVariations.length > 0">
<h3>{{ 'labels.heading.Installment Amount Variations' | translate }}:</h3>
<table mat-table [dataSource]="loanDetails.emiAmountVariations">
<ng-container matColumnDef="emi amount variation from">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Applicable From Date' | translate }}</th>
<td mat-cell *matCellDef="let ele">{{ ele.termVariationApplicableFrom | dateFormat }}</td>
@if (disbursementDataSource.length > 0) {
<table mat-table [dataSource]="disbursementDataSource">
<ng-container matColumnDef="expected disbursement on">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Expected Disbursement On' | translate }}</th>
<td mat-cell *matCellDef="let ele">{{ ele.expectedDisbursementDate | dateFormat }}</td>
</ng-container>
<ng-container matColumnDef="fixed emi amount">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Installment Amount' | translate }}</th>
<td mat-cell *matCellDef="let ele">{{ ele.termValue }}</td>
<ng-container matColumnDef="disbursed on">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Disbursed On' | translate }}</th>
<td mat-cell *matCellDef="let ele">
@if (ele.actualDisbursementDate) {
<span>
{{ ele.actualDisbursementDate | dateFormat }}
</span>
}
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="emivariationColumns"></tr>
<tr mat-row *matRowDef="let row; columns: emivariationColumns"></tr>
<ng-container matColumnDef="principal">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Principal' | translate }}</th>
<td mat-cell *matCellDef="let ele">{{ ele.principal }}</td>
</ng-container>
<ng-container matColumnDef="action">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Actions' | translate }}</th>
<td mat-cell *matCellDef="let ele; let rowIndex = index">
@if (ele.actualDisbursementDate) {
<span>
<i class="fa fa-check"></i>
</span>
}
@if (!ele.actualDisbursementDate && showActionsTrancheButtons()) {
<button
type="button"
mat-icon-button
color="primary"
(click)="editDisbursementDataEntry(rowIndex)"
matTooltip="{{ 'tooltips.Edit' | translate }}"
matTooltipPosition="left"
>
<fa-icon icon="edit"></fa-icon>
</button>
}
@if (!ele.actualDisbursementDate && showActionsTrancheButtons()) {
<button
type="button"
mat-icon-button
color="warn"
(click)="removeDisbursementDataEntry(rowIndex)"
matTooltip="{{ 'tooltips.Delete' | translate }}"
matTooltipPosition="left"
>
<fa-icon icon="trash"></fa-icon>
</button>
}
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="expectedDisbursementColumns"></tr>
<tr mat-row *matRowDef="let row; columns: expectedDisbursementColumns"></tr>
</table>
</div>
}
@if (loanDetails.emiAmountVariations.length > 0) {
<div>
<h3>{{ 'labels.heading.Installment Amount Variations' | translate }}:</h3>
<table mat-table [dataSource]="loanDetails.emiAmountVariations">
<ng-container matColumnDef="emi amount variation from">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Applicable From Date' | translate }}</th>
<td mat-cell *matCellDef="let ele">{{ ele.termVariationApplicableFrom | dateFormat }}</td>
</ng-container>
<ng-container matColumnDef="fixed emi amount">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Installment Amount' | translate }}</th>
<td mat-cell *matCellDef="let ele">{{ ele.termValue }}</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="emivariationColumns"></tr>
<tr mat-row *matRowDef="let row; columns: emivariationColumns"></tr>
</table>
</div>
}
</div>
@@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core';
import { Component, OnInit, inject } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router';
import { Dates } from 'app/core/utils/dates';
@@ -53,6 +53,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
]
})
export class LoanTrancheDetailsComponent implements OnInit {
private route = inject(ActivatedRoute);
private router = inject(Router);
private dialog = inject(MatDialog);
private loanServices = inject(LoansService);
private settingsService = inject(SettingsService);
private dateUtils = inject(Dates);
loanDetails: any;
return: any;
status: any;
@@ -81,14 +88,7 @@ export class LoanTrancheDetailsComponent implements OnInit {
* Retrieves the loans data from `resolve`.
* @param {ActivatedRoute} route Activated Route.
*/
constructor(
private route: ActivatedRoute,
private router: Router,
private dialog: MatDialog,
private loanServices: LoansService,
private settingsService: SettingsService,
private dateUtils: Dates
) {
constructor() {
this.route.parent.data.subscribe((data: { loanDetailsData: any }) => {
this.loanId = data.loanDetailsData.id;
this.loanDetails = data.loanDetailsData;
@@ -177,7 +177,6 @@ export class LoanTrancheDetailsComponent implements OnInit {
required: true,
order: 2
})
];
return formBase;
}