Upgrade to Angular 16

Merge `angular-update-16` into `dev` branch
This commit is contained in:
Adam Saghy
2025-05-23 18:47:20 +02:00
parent c7c2f60182
commit 19a14e5b5b
882 changed files with 14895 additions and 14340 deletions
@@ -1,6 +1,6 @@
/** Angular Imports */
import { Injectable } from '@angular/core';
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
import { ActivatedRouteSnapshot } from '@angular/router';
/** rxjs Imports */
import { Observable } from 'rxjs';
@@ -12,7 +12,7 @@ import { OrganizationService } from '../../organization.service';
* Office and template data resolver.
*/
@Injectable()
export class EditOfficeResolver implements Resolve<Object> {
export class EditOfficeResolver {
/**
* @param {OrganizationService} organizationService Organization service.
*/
@@ -1,6 +1,6 @@
/** Angular Imports */
import { Injectable } from '@angular/core';
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
import { ActivatedRouteSnapshot } from '@angular/router';
import { SystemService } from 'app/system/system.service';
/** rxjs Imports */
@@ -10,7 +10,7 @@ import { Observable } from 'rxjs';
* Office Datatable data resolver.
*/
@Injectable()
export class OfficeDatatableResolver implements Resolve<Object> {
export class OfficeDatatableResolver {
/**
* @param {SystemService} systemService Products service.
*/
@@ -1,6 +1,6 @@
/** Angular Imports */
import { Injectable } from '@angular/core';
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
import { ActivatedRouteSnapshot } from '@angular/router';
import { SystemService } from 'app/system/system.service';
/** rxjs Imports */
@@ -10,7 +10,7 @@ import { Observable } from 'rxjs';
* Office Datatables data resolver.
*/
@Injectable()
export class OfficeDatatablesResolver implements Resolve<Object> {
export class OfficeDatatablesResolver {
/**
* @param {SystemService} systemService Products service.
*/
@@ -1,6 +1,6 @@
/** Angular Imports */
import { Injectable } from '@angular/core';
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
import { ActivatedRouteSnapshot } from '@angular/router';
/** rxjs Imports */
import { Observable } from 'rxjs';
@@ -12,7 +12,7 @@ import { OrganizationService } from '../../organization.service';
* Office data resolver.
*/
@Injectable()
export class OfficeResolver implements Resolve<Object> {
export class OfficeResolver {
/**
* @param {OrganizationService} organizationService Organization service.
*/
@@ -1,6 +1,5 @@
/** Angular Imports */
import { Injectable } from '@angular/core';
import { Resolve } from '@angular/router';
/** rxjs Imports */
import { Observable } from 'rxjs';
@@ -12,7 +11,7 @@ import { OrganizationService } from '../../organization.service';
* Manage Offices data resolver.
*/
@Injectable()
export class OfficesResolver implements Resolve<Object> {
export class OfficesResolver {
/**
* @param {OrganizationService} organizationService Organization service.
*/
@@ -2,7 +2,7 @@
<mat-card>
<form [formGroup]="officeForm" (ngSubmit)="submit()">
<mat-card-content>
<div #createOfficeFormRef fxLayout="column">
<div #createOfficeFormRef class="layout-column">
<mat-form-field>
<mat-label>{{ 'labels.inputs.Office' | translate }}</mat-label>
<input required matInput formControlName="name" />
@@ -50,7 +50,7 @@
</div>
</mat-card-content>
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
<mat-card-actions class="layout-row align-center gap-5px responsive-column">
<button type="button" mat-raised-button [routerLink]="['../']">
{{ 'labels.buttons.Cancel' | translate }}
</button>
@@ -70,7 +70,7 @@
'labels.inputs.Manage Offices' | translate
}}</a>
</p>
<div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="2%" fxLayout.lt-md="column">
<div class="layout-row align-end gap-2px responsive-column">
<button mat-raised-button color="warn" (click)="popover.close(); configurationWizardService.closeConfigWizard()">
{{ 'labels.buttons.Close' | translate }}
</button>
@@ -2,7 +2,7 @@
<mat-card>
<form [formGroup]="officeForm" (ngSubmit)="submit()">
<mat-card-content>
<div fxLayout="column">
<div class="layout-column">
<mat-form-field>
<mat-label>{{ 'labels.inputs.Office' | translate }}</mat-label>
<input matInput required formControlName="name" />
@@ -50,7 +50,7 @@
</div>
</mat-card-content>
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
<mat-card-actions class="layout-row align-center gap-5px responsive-column">
<button type="button" mat-raised-button [routerLink]="['../general']">
{{ 'labels.buttons.Cancel' | translate }}
</button>
@@ -1,4 +1,4 @@
<div class="container m-b-20" fxLayout="row" fxLayoutAlign="end" fxLayoutGap="20px">
<div class="container m-b-20 layout-row align-end gap-20px">
<mat-button-toggle-group #buttonTreeView [formControl]="viewGroup">
<mat-button-toggle value="listView">
<fa-icon icon="list"></fa-icon>
@@ -29,8 +29,8 @@
</div>
<div class="container" [hidden]="viewGroup.value !== 'listView'">
<div #filter fxLayout="row" fxLayoutGap="20px">
<mat-form-field fxFlex>
<div #filter class="layout-row gap-20px">
<mat-form-field class="flex-fill">
<mat-label>{{ 'Filter' | translate }}</mat-label>
<input matInput (keyup)="applyFilter($event.target.value)" />
</mat-form-field>
@@ -74,14 +74,14 @@
<!-- Tree View -->
<div class="container" [hidden]="viewGroup.value !== 'treeView'">
<div class="m-b-20" fxLayout="row" fxLayoutAlign="start" fxLayoutGap="20px">
<div class="m-b-20 layout-row align-start gap-20px">
<button mat-raised-button (click)="toggleExpandCollapse()">
{{ (isTreeExpanded ? 'labels.buttons.Collapse All' : 'labels.buttons.Expand All') | translate }}
</button>
</div>
<div fxLayout="row" fxLayoutGap="4%" fxLayout.lt-md="column">
<div fxFlex>
<div class="layout-row gap-4percent responsive-column">
<div class="flex-fill">
<mat-card>
<mat-card-content>
<mat-tree [dataSource]="nestedTreeDataSource" [treeControl]="nestedTreeControl" class="office-tree">
@@ -117,15 +117,15 @@
</mat-card>
</div>
<div fxFlex="48%" *ngIf="office">
<div class="flex-48" *ngIf="office">
<mat-card>
<mat-card-content>
<div fxLayout="row">
<div class="layout-row">
<mat-card-title>
{{ office.name }}
</mat-card-title>
<div fxFlex fxLayoutAlign="end">
<div class="flex align-end">
<button mat-icon-button (click)="closeOffice()">
<fa-icon icon="times"></fa-icon>
</button>
@@ -134,28 +134,28 @@
<mat-tab-group>
<mat-tab label="General">
<div fxLayout="row wrap" class="content">
<div fxFlex="50%" class="mat-body-strong" *ngIf="office.parentId">
<div class="layout-row-wrap">
<div class="flex-50 mat-body-strong" *ngIf="office.parentId">
{{ 'Parent Office' | translate }}
</div>
<div fxFlex="50%" *ngIf="office.parentId">
<div class="flex-50" *ngIf="office.parentId">
{{ office.parentName }}
</div>
<div fxFlex="50%" class="mat-body-strong">
<div class="flex-50 mat-body-strong">
{{ ' Opened On' | translate }}
</div>
<div fxFlex="50%">
<div class="flex-50">
{{ office.openingDate | date }}
</div>
<div fxFlex="50%" class="mat-body-strong" *ngIf="office.externalId">
<div class="flex-50 mat-body-strong" *ngIf="office.externalId">
{{ 'External Id' | translate }}
</div>
<div fxFlex="50%" *ngIf="office.externalId">
<div class="flex-50" *ngIf="office.externalId">
<mifosx-external-identifier externalId="{{ office.externalId }}"></mifosx-external-identifier>
</div>
</div>
@@ -172,7 +172,7 @@
<ng-template #templateButtonTreeView let-popover="popover">
<h2>{{ 'labels.heading.Tree View' | translate }}</h2>
<p class="mw300">{{ 'labels.text.Launch an alternative view for office hierarchy' | translate }}</p>
<div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="2%" fxLayout.lt-md="column">
<div class="layout-row align-end gap-2px responsive-column">
<button mat-raised-button color="warn" (click)="popover.close(); configurationWizardService.closeConfigWizard()">
{{ 'labels.buttons.Close' | translate }}
</button>
@@ -192,7 +192,7 @@
<ng-template #templateButtonCreateOffice let-popover="popover">
<h2>{{ 'labels.heading.Create Office' | translate }}</h2>
<p class="mw300">{{ 'labels.text.Create new offices' | translate }}</p>
<div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="2%" fxLayout.lt-md="column">
<div class="layout-row align-end gap-2px responsive-column">
<button mat-raised-button color="warn" (click)="popover.close(); configurationWizardService.closeConfigWizard()">
{{ 'labels.buttons.Close' | translate }}
</button>
@@ -216,7 +216,7 @@
<ng-template #templateButtonImportOffices let-popover="popover">
<h2>{{ 'labels.heading.Import Offices' | translate }}</h2>
<p class="mw300">{{ 'labels.text.Launch the Bulk import/Offices' | translate }}</p>
<div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="2%" fxLayout.lt-md="column">
<div class="layout-row align-end gap-2px responsive-column">
<button mat-raised-button color="warn" (click)="popover.close(); configurationWizardService.closeConfigWizard()">
{{ 'labels.buttons.Close' | translate }}
</button>
@@ -239,7 +239,7 @@
<ng-template #templateFilter let-popover="popover">
<h4>{{ 'labels.heading.Search bar to filter offices.' | translate }}</h4>
<div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="2%" fxLayout.lt-md="column">
<div class="layout-row align-end gap-2px responsive-column">
<button mat-raised-button color="warn" (click)="popover.close(); configurationWizardService.closeConfigWizard()">
{{ 'labels.buttons.Close' | translate }}
</button>
@@ -262,7 +262,7 @@
<ng-template #templateTableOffices let-popover="popover">
<h4>{{ 'labels.heading.List of offices in the organization.' | translate }}</h4>
<div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="2%" fxLayout.lt-md="column">
<div class="layout-row align-end gap-2px responsive-column">
<button mat-raised-button color="warn" (click)="popover.close(); configurationWizardService.closeConfigWizard()">
{{ 'labels.buttons.Close' | translate }}
</button>
@@ -1,5 +1,5 @@
<div class="tab-container mat-typography">
<div fxLayoutAlign="flex-end" class="action-button m-b-20">
<div class="layout-align-end action-button m-b-20">
<span *mifosxHasPermission="'UPDATE_OFFICE'">
<button mat-raised-button color="primary" [routerLink]="['../edit']">
<fa-icon icon="edit" class="m-r-10"></fa-icon>{{ 'labels.buttons.Edit' | translate }}
@@ -7,35 +7,27 @@
</span>
</div>
<div fxLayout="row wrap" fxLayout.lt-md="column">
<div fxFlex="45%" class="mat-body-strong left">
{{ 'labels.inputs.Parent Office' | translate }}
</div>
<div fxFlex="50%" class="right">
<div class="layout-row-wrap responsive-column">
<div class="flex-45 mat-body-strong left">{{ 'labels.inputs.Parent Office' | translate }}</div>
<div class="flex-50 right">
{{ officeData.parentName ? officeData.parentName : 'N/A' }}
</div>
<div fxFlex="45%" class="mat-body-strong left">
{{ 'labels.inputs.Opened On' | translate }}
</div>
<div fxFlex="50%" class="right">
<div class="flex-45 mat-body-strong left">{{ 'labels.inputs.Opened On' | translate }}</div>
<div class="flex-50 right">
{{ officeData.openingDate ? (officeData.openingDate | dateFormat) : 'Unassigned' }}
</div>
<div fxFlex="45%" class="mat-body-strong left">
{{ 'labels.inputs.Name Decorated' | translate }}
</div>
<div fxFlex="50%" class="right">
<div class="flex-45 mat-body-strong left">{{ 'labels.inputs.Name Decorated' | translate }}</div>
<div class="flex-50 right">
{{ officeData.nameDecorated ? officeData.nameDecorated : 'Unassigned' }}
</div>
<div fxFlex="45%" class="mat-body-strong left">
{{ 'labels.inputs.External Id' | translate }}
</div>
<div fxFlex="50%" class="right" *ngIf="officeData.externalId">
<div class="flex-45 mat-body-strong left">{{ 'labels.inputs.External Id' | translate }}</div>
<div class="flex-50 right" *ngIf="officeData.externalId">
<mifosx-external-identifier externalId="{{ officeData.externalId }}"></mifosx-external-identifier>
</div>
<div fxFlex="50%" class="right" *ngIf="!officeData.externalId">
<div class="flex-50 right" *ngIf="!officeData.externalId">
{{ 'labels.inputs.Unassigned' | translate }}
</div>
</div>
@@ -1,7 +1,7 @@
<div class="container">
<mat-card class="office-card">
<mat-card-content>
<nav mat-tab-nav-bar class="navigation-tabs">
<nav mat-tab-nav-bar class="navigation-tabs" [tabPanel]="tabPanel">
<a
mat-tab-link
[routerLink]="['./general']"
@@ -25,7 +25,9 @@
</span>
</nav>
<router-outlet></router-outlet>
<mat-tab-nav-panel #tabPanel>
<router-outlet></router-outlet>
</mat-tab-nav-panel>
</mat-card-content>
</mat-card>
</div>