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:
@@ -16,9 +16,11 @@
|
||||
|
||||
<!-- Autocomplete data -->
|
||||
<mat-autocomplete autoActiveFirstOption #officeNameAutocomplete="matAutocomplete">
|
||||
<mat-option *ngFor="let office of filteredOfficeData | async" [value]="office.name">
|
||||
{{ office.name }}
|
||||
</mat-option>
|
||||
@for (office of filteredOfficeData | async; track office) {
|
||||
<mat-option [value]="office.name">
|
||||
{{ office.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-autocomplete>
|
||||
|
||||
<div class="container">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit } from '@angular/core';
|
||||
import { Component, OnInit, TemplateRef, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import { MatSort, MatSortHeader } from '@angular/material/sort';
|
||||
import {
|
||||
@@ -26,7 +26,7 @@ import { PopoverService } from '../../configuration-wizard/popover/popover.servi
|
||||
import { ConfigurationWizardService } from '../../configuration-wizard/configuration-wizard.service';
|
||||
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||
import { MatAutocompleteTrigger, MatAutocomplete, MatOption } from '@angular/material/autocomplete';
|
||||
import { NgFor, AsyncPipe } from '@angular/common';
|
||||
import { AsyncPipe } from '@angular/common';
|
||||
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
|
||||
/**
|
||||
@@ -58,6 +58,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class ClosingEntriesComponent implements OnInit, AfterViewInit {
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private configurationWizardService = inject(ConfigurationWizardService);
|
||||
private popoverService = inject(PopoverService);
|
||||
|
||||
/** Columns to be displayed in closing entries table. */
|
||||
displayedColumns: string[] = [
|
||||
'officeName',
|
||||
@@ -97,12 +102,7 @@ export class ClosingEntriesComponent implements OnInit, AfterViewInit {
|
||||
* @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service.
|
||||
* @param {PopoverService} popoverService PopoverService.
|
||||
*/
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private configurationWizardService: ConfigurationWizardService,
|
||||
private popoverService: PopoverService
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { offices: any; glAccountClosures: any }) => {
|
||||
this.officeData = data.offices;
|
||||
this.glAccountClosureData = data.glAccountClosures;
|
||||
|
||||
@@ -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 { AccountingService } from '../accounting.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class ClosingEntriesResolver {
|
||||
/**
|
||||
* @param {AccountingService} accountingService Accounting service.
|
||||
*/
|
||||
constructor(private accountingService: AccountingService) {}
|
||||
private accountingService = inject(AccountingService);
|
||||
|
||||
/**
|
||||
* Returns the gl account closures data.
|
||||
|
||||
@@ -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 { AccountingService } from '../accounting.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class ClosingEntryResolver {
|
||||
/**
|
||||
* @param {AccountingService} accountingService Accounting service.
|
||||
*/
|
||||
constructor(private accountingService: AccountingService) {}
|
||||
private accountingService = inject(AccountingService);
|
||||
|
||||
/**
|
||||
* Returns the gl account closure data.
|
||||
|
||||
@@ -6,14 +6,18 @@
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Office' | translate }}</mat-label>
|
||||
<mat-select required formControlName="officeId">
|
||||
<mat-option *ngFor="let office of officeData" [value]="office.id">
|
||||
{{ office.name }}
|
||||
</mat-option>
|
||||
@for (office of officeData; track office) {
|
||||
<mat-option [value]="office.id">
|
||||
{{ office.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error *ngIf="accountingClosureForm.controls.officeId.hasError('required')">
|
||||
{{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (accountingClosureForm.controls.officeId.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Office' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field (click)="closingDatePicker.open()">
|
||||
@@ -28,10 +32,12 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="closingDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #closingDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="accountingClosureForm.controls.closingDate.hasError('required')">
|
||||
{{ 'labels.inputs.Closing Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (accountingClosureForm.controls.closingDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Closing Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { Router, ActivatedRoute, RouterLink } from '@angular/router';
|
||||
|
||||
@@ -22,6 +22,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class CreateClosureComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private accountingService = inject(AccountingService);
|
||||
private settingsService = inject(SettingsService);
|
||||
private dateUtils = inject(Dates);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
|
||||
/** Minimum closing date allowed. */
|
||||
minDate = new Date(2000, 0, 1);
|
||||
/** Maximum closing date allowed. */
|
||||
@@ -39,14 +46,7 @@ export class CreateClosureComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
* @param {Router} router Router for navigation.
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private accountingService: AccountingService,
|
||||
private settingsService: SettingsService,
|
||||
private dateUtils: Dates,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { offices: any }) => {
|
||||
this.officeData = data.offices;
|
||||
});
|
||||
|
||||
@@ -6,9 +6,11 @@
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Office' | translate }}</mat-label>
|
||||
<mat-select required formControlName="officeId">
|
||||
<mat-option *ngFor="let office of officeData" [value]="office.id">
|
||||
{{ office.name }}
|
||||
</mat-option>
|
||||
@for (office of officeData; track office) {
|
||||
<mat-option [value]="office.id">
|
||||
{{ office.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { Router, ActivatedRoute, RouterLink } from '@angular/router';
|
||||
|
||||
@@ -21,6 +21,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class EditClosureComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private accountingService = inject(AccountingService);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
|
||||
/** Accounting closure form. */
|
||||
accountingClosureForm: UntypedFormGroup;
|
||||
/** GL Account closure. */
|
||||
@@ -35,12 +40,7 @@ export class EditClosureComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
* @param {Router} router Router for navigation.
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private accountingService: AccountingService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { glAccountClosure: any }) => {
|
||||
this.glAccountClosure = data.glAccountClosure;
|
||||
});
|
||||
|
||||
@@ -9,66 +9,55 @@
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="container" *ngIf="glAccountClosure">
|
||||
<mat-card>
|
||||
<mat-card-content>
|
||||
<div class="layout-row-wrap">
|
||||
<div class="flex-50 header">
|
||||
{{ 'labels.inputs.Office' | translate }}
|
||||
@if (glAccountClosure) {
|
||||
<div class="container">
|
||||
<mat-card>
|
||||
<mat-card-content>
|
||||
<div class="layout-row-wrap">
|
||||
<div class="flex-50 header">
|
||||
{{ 'labels.inputs.Office' | translate }}
|
||||
</div>
|
||||
<div class="flex-50">
|
||||
{{ glAccountClosure.officeName }}
|
||||
</div>
|
||||
<div class="flex-50 header">
|
||||
{{ 'labels.inputs.Closure Date' | translate }}
|
||||
</div>
|
||||
<div class="flex-50">
|
||||
{{ glAccountClosure.closingDate }}
|
||||
</div>
|
||||
<div class="flex-50 header">
|
||||
{{ 'labels.inputs.Closed By' | translate }}
|
||||
</div>
|
||||
<div class="flex-50">
|
||||
{{ glAccountClosure.createdByUsername }}
|
||||
</div>
|
||||
<div class="flex-50 header">
|
||||
{{ 'labels.inputs.Updated By' | translate }}
|
||||
</div>
|
||||
<div class="flex-50">
|
||||
{{ glAccountClosure.lastUpdatedByUsername }}
|
||||
</div>
|
||||
<div class="flex-50 header">
|
||||
{{ 'labels.inputs.Updated On' | translate }}
|
||||
</div>
|
||||
<div class="flex-50">
|
||||
{{ glAccountClosure.lastUpdatedDate }}
|
||||
</div>
|
||||
<div class="flex-50 header">
|
||||
{{ 'labels.inputs.Closure Creation Date' | translate }}
|
||||
</div>
|
||||
<div class="flex-50">
|
||||
{{ glAccountClosure.createdDate }}
|
||||
</div>
|
||||
<div class="flex-50 header">
|
||||
{{ 'labels.inputs.Comments' | translate }}
|
||||
</div>
|
||||
<div class="flex-50">
|
||||
{{ glAccountClosure.comments }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-50">
|
||||
{{ glAccountClosure.officeName }}
|
||||
</div>
|
||||
|
||||
<div class="flex-50 header">
|
||||
{{ 'labels.inputs.Closure Date' | translate }}
|
||||
</div>
|
||||
|
||||
<div class="flex-50">
|
||||
{{ glAccountClosure.closingDate }}
|
||||
</div>
|
||||
|
||||
<div class="flex-50 header">
|
||||
{{ 'labels.inputs.Closed By' | translate }}
|
||||
</div>
|
||||
|
||||
<div class="flex-50">
|
||||
{{ glAccountClosure.createdByUsername }}
|
||||
</div>
|
||||
|
||||
<div class="flex-50 header">
|
||||
{{ 'labels.inputs.Updated By' | translate }}
|
||||
</div>
|
||||
|
||||
<div class="flex-50">
|
||||
{{ glAccountClosure.lastUpdatedByUsername }}
|
||||
</div>
|
||||
|
||||
<div class="flex-50 header">
|
||||
{{ 'labels.inputs.Updated On' | translate }}
|
||||
</div>
|
||||
|
||||
<div class="flex-50">
|
||||
{{ glAccountClosure.lastUpdatedDate }}
|
||||
</div>
|
||||
|
||||
<div class="flex-50 header">
|
||||
{{ 'labels.inputs.Closure Creation Date' | translate }}
|
||||
</div>
|
||||
|
||||
<div class="flex-50">
|
||||
{{ glAccountClosure.createdDate }}
|
||||
</div>
|
||||
|
||||
<div class="flex-50 header">
|
||||
{{ 'labels.inputs.Comments' | translate }}
|
||||
</div>
|
||||
|
||||
<div class="flex-50">
|
||||
{{ glAccountClosure.comments }}
|
||||
</div>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
|
||||
@@ -24,6 +24,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class ViewClosureComponent {
|
||||
private accountingService = inject(AccountingService);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
dialog = inject(MatDialog);
|
||||
|
||||
/** GL Account closure. */
|
||||
glAccountClosure: any;
|
||||
|
||||
@@ -34,12 +39,7 @@ export class ViewClosureComponent {
|
||||
* @param {Router} router Router for navigation.
|
||||
* @param {MatDialog} dialog Dialog reference.
|
||||
*/
|
||||
constructor(
|
||||
private accountingService: AccountingService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
public dialog: MatDialog
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { glAccountClosure: any }) => {
|
||||
this.glAccountClosure = data.glAccountClosure;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user