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
@@ -14,9 +14,11 @@
[formControl]="filterFormCtrl"
></ngx-mat-select-search>
</mat-option>
<mat-option *ngFor="let product of productData | async" [value]="product.id">
{{ product.name }}
</mat-option>
@for (product of productData | async; track product) {
<mat-option [value]="product.id">
{{ product.name }}
</mat-option>
}
</mat-select>
<mat-error>
{{ 'labels.inputs.Product Name' | translate }} {{ 'labels.commons.is' | translate }}
@@ -25,97 +27,108 @@
</mat-form-field>
</div>
<div class="layout-row-wrap layout-lt-md-column gap-2percent" *ngIf="loanProductSelected">
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.External id' | translate }}</mat-label>
<input matInput formControlName="externalId" matTooltip="{{ 'tooltips.Provides an external id' | translate }}" />
</mat-form-field>
<mat-form-field class="flex-48" *ngIf="loanProductSelected">
<mat-label>{{ 'labels.inputs.Loan officer' | translate }}</mat-label>
<mat-select
formControlName="loanOfficerId"
matTooltip="{{ 'tooltips.Financial institution representative' | translate }}"
>
<mat-option *ngFor="let loanOfficer of loanOfficerOptions" [value]="loanOfficer.id">
{{ loanOfficer.displayName }}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Loan Purpose' | translate }}</mat-label>
<mat-select formControlName="loanPurposeId" matTooltip="{{ 'tooltips.Provides an indication' | translate }}">
<mat-option *ngFor="let loanPurpose of loanPurposeOptions" [value]="loanPurpose.id">
{{ loanPurpose.name }}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Fund' | translate }}</mat-label>
<mat-select formControlName="fundId">
<mat-option *ngFor="let fund of fundOptions" [value]="fund.id">
{{ fund.name }}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field class="flex-48" (click)="submitPicker.open()">
<mat-label>{{ 'labels.inputs.Submitted on' | translate }}</mat-label>
<input
matInput
[min]="minDate"
[max]="maxDate"
[matDatepicker]="submitPicker"
matTooltip="{{ 'tooltips.Date the loan account application' | translate }}"
required
formControlName="submittedOnDate"
/>
<mat-datepicker-toggle matSuffix [for]="submitPicker"></mat-datepicker-toggle>
<mat-datepicker #submitPicker></mat-datepicker>
<mat-error *ngIf="loansAccountDetailsForm.controls.submittedOnDate?.hasError('required')">
{{ 'labels.inputs.Submitted on' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
<mat-form-field class="flex-48" (click)="disbursementPicker.open()">
<mat-label>{{ 'labels.inputs.Disbursement on' | translate }}</mat-label>
<input
matInput
[min]="loansAccountDetailsForm.value.submittedOnDate"
[max]="maxDate"
[matDatepicker]="disbursementPicker"
matTooltip="{{ 'tooltips.Date that the loan account disbursed' | translate }}"
required
formControlName="expectedDisbursementDate"
/>
<mat-datepicker-toggle matSuffix [for]="disbursementPicker"></mat-datepicker-toggle>
<mat-datepicker #disbursementPicker></mat-datepicker>
<mat-error *ngIf="loansAccountDetailsForm.controls.submittedOnDate?.hasError('required')">
{{ 'labels.inputs.Disbursement on' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
<mat-divider class="flex-98"></mat-divider>
<h3 class="mat-h3 flex-fill">{{ 'labels.heading.Savings Linkage' | translate }}</h3>
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Link savings' | translate }}</mat-label>
<mat-select formControlName="linkAccountId">
<mat-option *ngFor="let savingaccount of accountLinkingOptions" [value]="savingaccount.id">
({{ savingaccount.accountNo }}) {{ savingaccount.productName }}
</mat-option>
</mat-select>
</mat-form-field>
<mat-checkbox class="flex-48" formControlName="createStandingInstructionAtDisbursement">
<p>{{ 'labels.inputs.Create standing instructions at disbursement' | translate }}</p>
</mat-checkbox>
</div>
@if (loanProductSelected) {
<div class="layout-row-wrap layout-lt-md-column gap-2percent">
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.External id' | translate }}</mat-label>
<input
matInput
formControlName="externalId"
matTooltip="{{ 'tooltips.Provides an external id' | translate }}"
/>
</mat-form-field>
@if (loanProductSelected) {
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Loan officer' | translate }}</mat-label>
<mat-select
formControlName="loanOfficerId"
matTooltip="{{ 'tooltips.Financial institution representative' | translate }}"
>
@for (loanOfficer of loanOfficerOptions; track loanOfficer) {
<mat-option [value]="loanOfficer.id">
{{ loanOfficer.displayName }}
</mat-option>
}
</mat-select>
</mat-form-field>
}
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Loan Purpose' | translate }}</mat-label>
<mat-select formControlName="loanPurposeId" matTooltip="{{ 'tooltips.Provides an indication' | translate }}">
@for (loanPurpose of loanPurposeOptions; track loanPurpose) {
<mat-option [value]="loanPurpose.id">
{{ loanPurpose.name }}
</mat-option>
}
</mat-select>
</mat-form-field>
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Fund' | translate }}</mat-label>
<mat-select formControlName="fundId">
@for (fund of fundOptions; track fund) {
<mat-option [value]="fund.id">
{{ fund.name }}
</mat-option>
}
</mat-select>
</mat-form-field>
<mat-form-field class="flex-48" (click)="submitPicker.open()">
<mat-label>{{ 'labels.inputs.Submitted on' | translate }}</mat-label>
<input
matInput
[min]="minDate"
[max]="maxDate"
[matDatepicker]="submitPicker"
matTooltip="{{ 'tooltips.Date the loan account application' | translate }}"
required
formControlName="submittedOnDate"
/>
<mat-datepicker-toggle matSuffix [for]="submitPicker"></mat-datepicker-toggle>
<mat-datepicker #submitPicker></mat-datepicker>
@if (loansAccountDetailsForm.controls.submittedOnDate?.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Submitted on' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-48" (click)="disbursementPicker.open()">
<mat-label>{{ 'labels.inputs.Disbursement on' | translate }}</mat-label>
<input
matInput
[min]="loansAccountDetailsForm.value.submittedOnDate"
[max]="maxDate"
[matDatepicker]="disbursementPicker"
matTooltip="{{ 'tooltips.Date that the loan account disbursed' | translate }}"
required
formControlName="expectedDisbursementDate"
/>
<mat-datepicker-toggle matSuffix [for]="disbursementPicker"></mat-datepicker-toggle>
<mat-datepicker #disbursementPicker></mat-datepicker>
@if (loansAccountDetailsForm.controls.submittedOnDate?.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Disbursement on' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
<mat-divider class="flex-98"></mat-divider>
<h3 class="mat-h3 flex-fill">{{ 'labels.heading.Savings Linkage' | translate }}</h3>
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Link savings' | translate }}</mat-label>
<mat-select formControlName="linkAccountId">
@for (savingaccount of accountLinkingOptions; track savingaccount) {
<mat-option [value]="savingaccount.id">
({{ savingaccount.accountNo }}) {{ savingaccount.productName }}
</mat-option>
}
</mat-select>
</mat-form-field>
<mat-checkbox class="flex-48" formControlName="createStandingInstructionAtDisbursement">
<p>{{ 'labels.inputs.Create standing instructions at disbursement' | translate }}</p>
</mat-checkbox>
</div>
}
<div class="layout-row align-center gap-2percent margin-t responsive-column">
<button mat-raised-button matStepperPrevious disabled>
@@ -134,8 +147,10 @@
{{ 'labels.buttons.Next' | translate }}
<fa-icon icon="arrow-right" class="m-l-10"></fa-icon>
</button>
<button mat-raised-button *ngIf="loanId" [routerLink]="['../', 'general']">
{{ 'labels.buttons.Cancel' | translate }}
</button>
@if (loanId) {
<button mat-raised-button [routerLink]="['../', 'general']">
{{ 'labels.buttons.Cancel' | translate }}
</button>
}
</div>
</form>
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit, Input, Output, EventEmitter, OnDestroy } from '@angular/core';
import { Component, OnInit, Input, Output, EventEmitter, OnDestroy, inject } from '@angular/core';
import {
UntypedFormGroup,
UntypedFormBuilder,
@@ -18,7 +18,7 @@ import { takeUntil } from 'rxjs/operators';
import { ReplaySubject, Subject } from 'rxjs';
import { MatTooltip } from '@angular/material/tooltip';
import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
import { NgFor, NgIf, AsyncPipe } from '@angular/common';
import { AsyncPipe } from '@angular/common';
import { MatDivider } from '@angular/material/divider';
import { MatCheckbox } from '@angular/material/checkbox';
import { MatStepperPrevious, MatStepperNext } from '@angular/material/stepper';
@@ -45,6 +45,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
]
})
export class LoansAccountDetailsStepComponent implements OnInit, OnDestroy {
private formBuilder = inject(UntypedFormBuilder);
private loansService = inject(LoansService);
private route = inject(ActivatedRoute);
private translateService = inject(TranslateService);
private settingsService = inject(SettingsService);
private commons = inject(Commons);
//** Defining PlaceHolders for the search bar */
placeHolderLabel = '';
noEntriesFoundLabel = '';
@@ -89,14 +96,7 @@ export class LoansAccountDetailsStepComponent implements OnInit, OnDestroy {
* @param {LoansService} loansService Loans Service.
* @param {SettingsService} settingsService SettingsService
*/
constructor(
private formBuilder: UntypedFormBuilder,
private loansService: LoansService,
private route: ActivatedRoute,
private translateService: TranslateService,
private settingsService: SettingsService,
private commons: Commons
) {
constructor() {
this.loanId = this.route.snapshot.params['loanId'];
}