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
@@ -63,18 +63,19 @@
</mifosx-savings-active-client-members>
</mat-step>
<mat-step *ngIf="savingsAccountFormValid" completed>
<ng-template matStepLabel>{{ 'labels.inputs.PREVIEW' | translate }}</ng-template>
<mifosx-savings-account-preview-step
[savingsAccountProductTemplate]="savingsAccountProductTemplate"
[savingsAccountTemplate]="savingsAccountTemplate"
[savingsAccountTermsForm]="savingsAccountTermsForm"
[savingsAccount]="savingsAccount"
[activeClientMembers]="activeClientMembers"
(submitEvent)="submit()"
>
</mifosx-savings-account-preview-step>
</mat-step>
@if (savingsAccountFormValid) {
<mat-step completed>
<ng-template matStepLabel>{{ 'labels.inputs.PREVIEW' | translate }}</ng-template>
<mifosx-savings-account-preview-step
[savingsAccountProductTemplate]="savingsAccountProductTemplate"
[savingsAccountTemplate]="savingsAccountTemplate"
[savingsAccountTermsForm]="savingsAccountTermsForm"
[savingsAccount]="savingsAccount"
[activeClientMembers]="activeClientMembers"
(submitEvent)="submit()"
>
</mifosx-savings-account-preview-step>
</mat-step>
}
</mat-stepper>
</div>
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, ViewChild } from '@angular/core';
import { Component, ViewChild, inject } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
/** Custom Components */
@@ -39,6 +39,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
]
})
export class CreateGsimAccountComponent {
private route = inject(ActivatedRoute);
private router = inject(Router);
private dateUtils = inject(Dates);
private savingsService = inject(SavingsService);
private settingsService = inject(SettingsService);
/** Savings Account Template */
savingsAccountTemplate: any;
/** Savings Account Product Template */
@@ -69,13 +75,7 @@ export class CreateGsimAccountComponent {
* @param {SavingsService} savingsService Savings Service
* @param {SettingsService} settingsService Settings Service
*/
constructor(
private route: ActivatedRoute,
private router: Router,
private dateUtils: Dates,
private savingsService: SavingsService,
private settingsService: SettingsService
) {
constructor() {
this.route.data.subscribe((data: { savingsAccountTemplate: any; groupsData: any }) => {
this.savingsAccountTemplate = data.savingsAccountTemplate;
this.dataSource = data.groupsData.activeClientMembers;
@@ -33,56 +33,61 @@
<ng-container matColumnDef="Actions">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Actions' | translate }}</th>
<td mat-cell *matCellDef="let element">
<button
*ngIf="element.status.active"
class="account-action-button"
mat-raised-button
color="primary"
(click)="routeEdit($event)"
[routerLink]="['../', 'savings-accounts', element.id, 'actions', 'Deposit']"
>
<i class="fa fa-arrow-up" matTooltip="{{ 'tooltips.Deposit' | translate }}"></i>
</button>
<button
*ngIf="element.status.active"
class="account-action-button"
mat-raised-button
color="primary"
(click)="routeEdit($event)"
[routerLink]="['../', 'savings-accounts', element.id, 'actions', 'Withdrawal']"
>
<i class="fa fa-arrow-down" matTooltip="{{ 'tooltips.Withdraw' | translate }}"></i>
</button>
<button
*ngIf="element.status.submittedAndPendingApproval"
class="account-action-button"
mat-raised-button
color="primary"
(click)="routeEdit($event)"
[routerLink]="['../../../', 'savings-accounts', element.id, 'actions', 'Approve']"
>
<i class="fa fa-check" matTooltip="{{ 'tooltips.Approve' | translate }}"></i>
</button>
<button
*ngIf="!element.status.submittedAndPendingApproval && !element.status.active"
class="account-action-button"
mat-raised-button
color="primary"
(click)="routeEdit($event)"
[routerLink]="['../../../', 'savings-accounts', element.id, 'actions', 'Undo Approval']"
>
<i class="fa fa-undo" matTooltip="{{ 'tooltips.Undo Approval' | translate }}"></i>
</button>
<button
*ngIf="!element.status.submittedAndPendingApproval && !element.status.active"
class="account-action-button"
mat-raised-button
color="primary"
(click)="routeEdit($event)"
[routerLink]="['../../', element.id, 'actions', 'Activate']"
>
<i class="fa fa-check-circle" matTooltip="{{ 'tooltips.Activate' | translate }}"></i>
</button>
@if (element.status.active) {
<button
class="account-action-button"
mat-raised-button
color="primary"
(click)="routeEdit($event)"
[routerLink]="['../', 'savings-accounts', element.id, 'actions', 'Deposit']"
>
<i class="fa fa-arrow-up" matTooltip="{{ 'tooltips.Deposit' | translate }}"></i>
</button>
}
@if (element.status.active) {
<button
class="account-action-button"
mat-raised-button
color="primary"
(click)="routeEdit($event)"
[routerLink]="['../', 'savings-accounts', element.id, 'actions', 'Withdrawal']"
>
<i class="fa fa-arrow-down" matTooltip="{{ 'tooltips.Withdraw' | translate }}"></i>
</button>
}
@if (element.status.submittedAndPendingApproval) {
<button
class="account-action-button"
mat-raised-button
color="primary"
(click)="routeEdit($event)"
[routerLink]="['../../../', 'savings-accounts', element.id, 'actions', 'Approve']"
>
<i class="fa fa-check" matTooltip="{{ 'tooltips.Approve' | translate }}"></i>
</button>
}
@if (!element.status.submittedAndPendingApproval && !element.status.active) {
<button
class="account-action-button"
mat-raised-button
color="primary"
(click)="routeEdit($event)"
[routerLink]="['../../../', 'savings-accounts', element.id, 'actions', 'Undo Approval']"
>
<i class="fa fa-undo" matTooltip="{{ 'tooltips.Undo Approval' | translate }}"></i>
</button>
}
@if (!element.status.submittedAndPendingApproval && !element.status.active) {
<button
class="account-action-button"
mat-raised-button
color="primary"
(click)="routeEdit($event)"
[routerLink]="['../../', element.id, 'actions', 'Activate']"
>
<i class="fa fa-check-circle" matTooltip="{{ 'tooltips.Activate' | translate }}"></i>
</button>
}
</td>
</ng-container>
@@ -1,4 +1,4 @@
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 {
@@ -15,7 +15,7 @@ import {
MatRow
} from '@angular/material/table';
import { ActivatedRoute, RouterLink } from '@angular/router';
import { NgClass, NgIf } from '@angular/common';
import { NgClass } from '@angular/common';
import { MatTooltip } from '@angular/material/tooltip';
import { StatusLookupPipe } from '../../pipes/status-lookup.pipe';
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
@@ -46,6 +46,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
]
})
export class GsimAccountComponent implements OnInit {
private route = inject(ActivatedRoute);
dialog = inject(MatDialog);
/** Columns to be displayed in charge overview table. */
displayedColumns: string[] = [
'clientDetails',
@@ -71,10 +74,7 @@ export class GsimAccountComponent implements OnInit {
* @param {ActivatedRoute} route Activated Route.
* @param {MatDialog} dialog Dialog reference.
*/
constructor(
private route: ActivatedRoute,
public dialog: MatDialog
) {
constructor() {
this.route.data.subscribe((data: { gsimData: any; savingAccountData: any; groupsData: any }) => {
this.gsimOverviewData = data.gsimData[0].childGSIMAccounts;
this.savingAccountData = data.savingAccountData;
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Injectable } from '@angular/core';
import { Injectable, inject } from '@angular/core';
import { ActivatedRouteSnapshot } from '@angular/router';
/** rxjs Imports */
@@ -13,10 +13,7 @@ import { SavingsService } from '../savings.service';
*/
@Injectable()
export class GSIMViewResolver {
/**
* @param {SavingsService} savingsService Savings service.
*/
constructor(private savingsService: SavingsService) {}
private savingsService = inject(SavingsService);
/**
* Returns the Savings Account data.