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
@@ -6,70 +6,91 @@
<mat-form-field>
<mat-label>{{ 'labels.inputs.Entity' | translate }}</mat-label>
<mat-select required formControlName="entity">
<mat-option *ngFor="let entity of entityTypes" [value]="entity.value">
{{ entity.name }}
</mat-option>
@for (entity of entityTypes; track entity) {
<mat-option [value]="entity.value">
{{ entity.name }}
</mat-option>
}
</mat-select>
<mat-error *ngIf="createEntityForm.controls.entity.hasError('required')">
{{ 'labels.inputs.Entity' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
@if (createEntityForm.controls.entity.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Entity' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field>
<mat-label>{{ 'labels.inputs.Status' | translate }}</mat-label>
<mat-select required formControlName="status">
<mat-option *ngFor="let status of statusList" [value]="status.code">
{{ status.name }}
</mat-option>
@for (status of statusList; track status) {
<mat-option [value]="status.code">
{{ status.name }}
</mat-option>
}
</mat-select>
<mat-error *ngIf="createEntityForm.controls.status.hasError('required')">
{{ 'labels.inputs.Status' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
@if (createEntityForm.controls.status.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Status' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field>
<mat-label>{{ 'labels.inputs.Data Table' | translate }}</mat-label>
<mat-select required formControlName="datatableName">
<mat-option *ngFor="let dataTable of dataTableList" [value]="dataTable.dataTableName">
{{ dataTable.dataTableName }}
</mat-option>
@for (dataTable of dataTableList; track dataTable) {
<mat-option [value]="dataTable.dataTableName">
{{ dataTable.dataTableName }}
</mat-option>
}
</mat-select>
<mat-error *ngIf="createEntityForm.controls.datatableName.hasError('required')">
{{ 'labels.inputs.Data Table' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
@if (createEntityForm.controls.datatableName.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Data Table' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field *ngIf="entityType === 'm_loan'">
<mat-label>{{ 'labels.inputs.Products' | translate }}</mat-label>
<mat-select required formControlName="productId">
<mat-option *ngFor="let loanProducts of createEntityData.loanProductDatas" [value]="loanProducts.id">
{{ loanProducts.name }}
</mat-option>
</mat-select>
<mat-error *ngIf="createEntityForm.controls.productId.hasError('required')">
{{ 'labels.inputs.Loan Product' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
@if (entityType === 'm_loan') {
<mat-form-field>
<mat-label>{{ 'labels.inputs.Products' | translate }}</mat-label>
<mat-select required formControlName="productId">
@for (loanProducts of createEntityData.loanProductDatas; track loanProducts) {
<mat-option [value]="loanProducts.id">
{{ loanProducts.name }}
</mat-option>
}
</mat-select>
@if (createEntityForm.controls.productId.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Loan Product' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
}
<mat-form-field *ngIf="entityType === 'm_savings_account'">
<mat-label>{{ 'labels.inputs.Products' | translate }}</mat-label>
<mat-select required formControlName="productId">
<mat-option
*ngFor="let savingsProducts of createEntityData.savingsProductDatas"
[value]="savingsProducts.id"
>
{{ savingsProducts.name }}
</mat-option>
</mat-select>
<mat-error *ngIf="createEntityForm.controls.productId.hasError('required')">
{{ 'labels.inputs.Loan Product' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
@if (entityType === 'm_savings_account') {
<mat-form-field>
<mat-label>{{ 'labels.inputs.Products' | translate }}</mat-label>
<mat-select required formControlName="productId">
@for (savingsProducts of createEntityData.savingsProductDatas; track savingsProducts) {
<mat-option [value]="savingsProducts.id">
{{ savingsProducts.name }}
</mat-option>
}
</mat-select>
@if (createEntityForm.controls.productId.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Loan Product' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
}
</div>
</mat-card-content>
@@ -1,5 +1,5 @@
/** Angular Imports. */
import { Component, OnInit } from '@angular/core';
import { Component, OnInit, inject } from '@angular/core';
import {
UntypedFormBuilder,
UntypedFormGroup,
@@ -25,6 +25,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
]
})
export class CreateEntityDataTableChecksComponent implements OnInit {
private formBuilder = inject(UntypedFormBuilder);
private route = inject(ActivatedRoute);
private organizationService = inject(OrganizationService);
private router = inject(Router);
/** Create Entity Datatable Checks form. */
createEntityForm: UntypedFormGroup;
/** Entity Datatable Checks data. */
@@ -45,12 +50,7 @@ export class CreateEntityDataTableChecksComponent implements OnInit {
* @param {OrganizationService} organizationService Organization Service.
* @param {Router} router Router.
*/
constructor(
private formBuilder: UntypedFormBuilder,
private route: ActivatedRoute,
private organizationService: OrganizationService,
private router: Router
) {
constructor() {
this.route.data.subscribe((data: { dataTableEntity: any }) => {
this.createEntityData = data.dataTableEntity;
// hardcoded, because data.dataTableEntity.entities might change anytime its order
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Injectable } from '@angular/core';
import { Injectable, inject } from '@angular/core';
/** rxjs Imports */
import { Observable } from 'rxjs';
@@ -12,10 +12,7 @@ import { OrganizationService } from '../organization.service';
*/
@Injectable()
export class EntityDataTableChecksTemplateResolver {
/**
* @param {OrganizationService} organizationService Organization service.
*/
constructor(private organizationService: OrganizationService) {}
private organizationService = inject(OrganizationService);
/**
* Returns the Entity Data Table Checks data.
@@ -44,20 +44,22 @@
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.System Defined' | translate }}</th>
<td mat-cell *matCellDef="let entityDataTableCheck">
<div [className]="entityDataTableCheck.systemDefined === true ? 'true' : 'false'">
<fa-icon
*ngIf="entityDataTableCheck.systemDefined"
icon="check-circle"
size="lg"
matTooltip="{{ 'tooltips.Yes' | translate }}"
matTooltipPosition="right"
></fa-icon>
<fa-icon
*ngIf="!entityDataTableCheck.systemDefined"
icon="times-circle"
size="lg"
matTooltip="{{ 'tooltips.No' | translate }}"
matTooltipPosition="right"
></fa-icon>
@if (entityDataTableCheck.systemDefined) {
<fa-icon
icon="check-circle"
size="lg"
matTooltip="{{ 'tooltips.Yes' | translate }}"
matTooltipPosition="right"
></fa-icon>
}
@if (!entityDataTableCheck.systemDefined) {
<fa-icon
icon="times-circle"
size="lg"
matTooltip="{{ 'tooltips.No' | translate }}"
matTooltipPosition="right"
></fa-icon>
}
</div>
</td>
</ng-container>
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit, ViewChild } from '@angular/core';
import { Component, OnInit, ViewChild, inject } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort, MatSortHeader } from '@angular/material/sort';
@@ -54,6 +54,10 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
]
})
export class EntityDataTableChecksComponent implements OnInit {
private organizationService = inject(OrganizationService);
private route = inject(ActivatedRoute);
private dialog = inject(MatDialog);
/** Entity Data Table Checks data. */
entityDataTableChecksData: any;
/** Columns to be displayed in entity data table checks table. */
@@ -98,11 +102,7 @@ export class EntityDataTableChecksComponent implements OnInit {
* @param {ActivatedRoute} route Activated Route.
* @param {MatDialog} dialog Dialog reference.
*/
constructor(
private organizationService: OrganizationService,
private route: ActivatedRoute,
private dialog: MatDialog
) {
constructor() {
this.route.data.subscribe((data: { entityDataTableChecks: any }) => {
this.entityDataTableChecksData = data.entityDataTableChecks.pageItems;
});
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Injectable } from '@angular/core';
import { Injectable, inject } from '@angular/core';
/** rxjs Imports */
import { Observable } from 'rxjs';
@@ -12,10 +12,7 @@ import { OrganizationService } from '../organization.service';
*/
@Injectable()
export class EntityDataTableChecksResolver {
/**
* @param {OrganizationService} organizationService Organization service.
*/
constructor(private organizationService: OrganizationService) {}
private organizationService = inject(OrganizationService);
/**
* Returns the Entity Data Table Checks data.