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:
@@ -6,10 +6,12 @@
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.name' | translate }}</mat-label>
|
||||
<input matInput required autofocus formControlName="name" />
|
||||
<mat-error *ngIf="holidayForm.controls.name.hasError('required')">
|
||||
{{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (holidayForm.controls.name.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field (click)="fromDatePicker.open()">
|
||||
@@ -24,10 +26,12 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="fromDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #fromDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="holidayForm.controls.fromDate.hasError('required')">
|
||||
{{ 'labels.inputs.From Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (holidayForm.controls.fromDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.From Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field (click)="toDatePicker.open()">
|
||||
@@ -42,42 +46,52 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="toDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #toDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="holidayForm.controls.toDate.hasError('required')">
|
||||
{{ 'labels.inputs.To Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (holidayForm.controls.toDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.To Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Repayment Scheduling Type' | translate }}</mat-label>
|
||||
<mat-select required formControlName="reschedulingType">
|
||||
<mat-option *ngFor="let repayments of repaymentSchedulingTypes" [value]="repayments.id">
|
||||
{{ repayments.value }}
|
||||
</mat-option>
|
||||
@for (repayments of repaymentSchedulingTypes; track repayments) {
|
||||
<mat-option [value]="repayments.id">
|
||||
{{ repayments.value }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error *ngIf="holidayForm.controls.reschedulingType.hasError('required')">
|
||||
{{ 'labels.inputs.Repayment Scheduling Type' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (holidayForm.controls.reschedulingType.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Repayment Scheduling Type' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="holidayForm.contains('repaymentsRescheduledTo')" (click)="repaymentDatePicker.open()">
|
||||
<mat-label>{{ 'labels.inputs.Repayment scheduled to' | translate }}</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[min]="minDate"
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="repaymentDatePicker"
|
||||
required
|
||||
formControlName="repaymentsRescheduledTo"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="repaymentDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #repaymentDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="holidayForm.controls.repaymentsRescheduledTo.hasError('required')">
|
||||
{{ 'labels.inputs.Repayment scheduled to' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
@if (holidayForm.contains('repaymentsRescheduledTo')) {
|
||||
<mat-form-field (click)="repaymentDatePicker.open()">
|
||||
<mat-label>{{ 'labels.inputs.Repayment scheduled to' | translate }}</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[min]="minDate"
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="repaymentDatePicker"
|
||||
required
|
||||
formControlName="repaymentsRescheduledTo"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="repaymentDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #repaymentDatePicker></mat-datepicker>
|
||||
@if (holidayForm.controls.repaymentsRescheduledTo.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Repayment scheduled to' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
}
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Description' | translate }}</mat-label>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** Angular Imports. */
|
||||
import { SelectionModel } from '@angular/cdk/collections';
|
||||
import { Component, OnInit, ViewChild, Injectable } from '@angular/core';
|
||||
import { Component, OnInit, ViewChild, Injectable, inject } from '@angular/core';
|
||||
import {
|
||||
UntypedFormBuilder,
|
||||
UntypedFormGroup,
|
||||
@@ -53,6 +53,15 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class CreateHolidayComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private route = inject(ActivatedRoute);
|
||||
private dateUtils = inject(Dates);
|
||||
private organizationService = inject(OrganizationService);
|
||||
private settings = inject(SettingsService);
|
||||
private router = inject(Router);
|
||||
private _database = inject(ChecklistDatabase);
|
||||
private createHoliday = inject(CreateHoliday);
|
||||
|
||||
/** Create Holiday form. */
|
||||
holidayForm: UntypedFormGroup;
|
||||
/** Repayment Scheduling data. */
|
||||
@@ -101,16 +110,9 @@ export class CreateHolidayComponent implements OnInit {
|
||||
* @param {OrganizationService} organizationService Organization Service.
|
||||
* @param {Router} router Router.
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
private dateUtils: Dates,
|
||||
private organizationService: OrganizationService,
|
||||
private settings: SettingsService,
|
||||
private router: Router,
|
||||
private _database: ChecklistDatabase,
|
||||
private createHoliday: CreateHoliday
|
||||
) {
|
||||
constructor() {
|
||||
const _database = this._database;
|
||||
|
||||
this.route.data.subscribe((data: { offices: any; holidayTemplate: any }) => {
|
||||
this.officesData = data.offices;
|
||||
this.repaymentSchedulingTypes = data.holidayTemplate;
|
||||
|
||||
@@ -6,78 +6,98 @@
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.name' | translate }}</mat-label>
|
||||
<input matInput required autofocus formControlName="name" />
|
||||
<mat-error *ngIf="holidayForm.controls.name.hasError('required')">
|
||||
{{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (holidayForm.controls.name.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="!isActiveHoliday" (click)="fromDatePicker.open()">
|
||||
<mat-label>{{ 'labels.inputs.From Date' | translate }}</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[min]="minDate"
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="fromDatePicker"
|
||||
required
|
||||
formControlName="fromDate"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="fromDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #fromDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="holidayForm.controls.fromDate.hasError('required')">
|
||||
{{ 'labels.inputs.From Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
@if (!isActiveHoliday) {
|
||||
<mat-form-field (click)="fromDatePicker.open()">
|
||||
<mat-label>{{ 'labels.inputs.From Date' | translate }}</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[min]="minDate"
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="fromDatePicker"
|
||||
required
|
||||
formControlName="fromDate"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="fromDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #fromDatePicker></mat-datepicker>
|
||||
@if (holidayForm.controls.fromDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.From Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
}
|
||||
|
||||
<mat-form-field *ngIf="!isActiveHoliday" (click)="toDatePicker.open()">
|
||||
<mat-label>{{ 'labels.inputs.To Date' | translate }}</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[min]="minDate"
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="toDatePicker"
|
||||
required
|
||||
formControlName="toDate"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="toDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #toDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="holidayForm.controls.toDate.hasError('required')">
|
||||
{{ 'labels.inputs.To Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
@if (!isActiveHoliday) {
|
||||
<mat-form-field (click)="toDatePicker.open()">
|
||||
<mat-label>{{ 'labels.inputs.To Date' | translate }}</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[min]="minDate"
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="toDatePicker"
|
||||
required
|
||||
formControlName="toDate"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="toDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #toDatePicker></mat-datepicker>
|
||||
@if (holidayForm.controls.toDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.To Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
}
|
||||
|
||||
<mat-form-field *ngIf="!isActiveHoliday">
|
||||
<mat-label>{{ 'labels.inputs.Repayment Scheduling Type' | translate }}</mat-label>
|
||||
<mat-select required formControlName="reschedulingType">
|
||||
<mat-option *ngFor="let repayments of holidayData.repaymentSchedulingTypes" [value]="repayments.id">
|
||||
{{ repayments.value }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="holidayForm.controls.reschedulingType.hasError('required')">
|
||||
{{ 'labels.inputs.Repayment Scheduling Type' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
@if (!isActiveHoliday) {
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Repayment Scheduling Type' | translate }}</mat-label>
|
||||
<mat-select required formControlName="reschedulingType">
|
||||
@for (repayments of holidayData.repaymentSchedulingTypes; track repayments) {
|
||||
<mat-option [value]="repayments.id">
|
||||
{{ repayments.value }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
@if (holidayForm.controls.reschedulingType.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Repayment Scheduling Type' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
}
|
||||
|
||||
<mat-form-field *ngIf="!isActiveHoliday && reSchedulingType === 2" (click)="repaymentDatePicker.open()">
|
||||
<mat-label>{{ 'labels.inputs.Repayment scheduled to' | translate }}</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[min]="minDate"
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="repaymentDatePicker"
|
||||
required
|
||||
formControlName="repaymentsRescheduledTo"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="repaymentDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #repaymentDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="holidayForm.controls.repaymentsRescheduledTo.hasError('required')">
|
||||
{{ 'labels.inputs.Repayment scheduled to' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
@if (!isActiveHoliday && reSchedulingType === 2) {
|
||||
<mat-form-field (click)="repaymentDatePicker.open()">
|
||||
<mat-label>{{ 'labels.inputs.Repayment scheduled to' | translate }}</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[min]="minDate"
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="repaymentDatePicker"
|
||||
required
|
||||
formControlName="repaymentsRescheduledTo"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="repaymentDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #repaymentDatePicker></mat-datepicker>
|
||||
@if (holidayForm.controls.repaymentsRescheduledTo.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Repayment scheduled to' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
}
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Description' | translate }}</mat-label>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports. */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import {
|
||||
UntypedFormBuilder,
|
||||
UntypedFormGroup,
|
||||
@@ -27,6 +27,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class EditHolidayComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private route = inject(ActivatedRoute);
|
||||
private dateUtils = inject(Dates);
|
||||
private organizatioService = inject(OrganizationService);
|
||||
private settingsService = inject(SettingsService);
|
||||
private router = inject(Router);
|
||||
|
||||
/** Edit Holiday form. */
|
||||
holidayForm: UntypedFormGroup;
|
||||
/** Holiday data. */
|
||||
@@ -48,14 +55,7 @@ export class EditHolidayComponent implements OnInit {
|
||||
* @param {OrganizationService} organizatioService Organization Service.
|
||||
* @param {Router} router Router.
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
private dateUtils: Dates,
|
||||
private organizatioService: OrganizationService,
|
||||
private settingsService: SettingsService,
|
||||
private router: Router
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { holiday: any; holidayTemplate: any }) => {
|
||||
this.holidayData = data.holiday;
|
||||
this.holidayData.repaymentSchedulingTypes = data.holidayTemplate;
|
||||
|
||||
@@ -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 { OrganizationService } from 'app/organization/organization.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class HolidayTemplateResolver {
|
||||
/**
|
||||
* @param {OrganizationService} organizationService Organization service.
|
||||
*/
|
||||
constructor(private organizationService: OrganizationService) {}
|
||||
private organizationService = inject(OrganizationService);
|
||||
|
||||
/**
|
||||
* Returns the holiday 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 { OrganizationService } from 'app/organization/organization.service';
|
||||
*/
|
||||
@Injectable()
|
||||
export class HolidayResolver {
|
||||
/**
|
||||
* @param {OrganizationService} organizationService Organization service.
|
||||
*/
|
||||
constructor(private organizationService: OrganizationService) {}
|
||||
private organizationService = inject(OrganizationService);
|
||||
|
||||
/**
|
||||
* Returns the holiday data.
|
||||
|
||||
@@ -16,9 +16,11 @@
|
||||
<mat-form-field>
|
||||
<mat-label> {{ 'labels.inputs.Select Office' | translate }} </mat-label>
|
||||
<mat-select [formControl]="officeSelector">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
@@ -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 {
|
||||
@@ -56,6 +56,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class HolidaysComponent implements OnInit, AfterViewInit {
|
||||
private organizationService = inject(OrganizationService);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private configurationWizardService = inject(ConfigurationWizardService);
|
||||
private popoverService = inject(PopoverService);
|
||||
|
||||
/** Office selector. */
|
||||
officeSelector = new UntypedFormControl();
|
||||
/** Holidays data. */
|
||||
@@ -96,13 +102,7 @@ export class HolidaysComponent implements OnInit, AfterViewInit {
|
||||
* @param {ConfigurationWizardService} configurationWizardService ConfigurationWizard Service.
|
||||
* @param {PopoverService} popoverService PopoverService.
|
||||
*/
|
||||
constructor(
|
||||
private organizationService: OrganizationService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private configurationWizardService: ConfigurationWizardService,
|
||||
private popoverService: PopoverService
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { offices: any }) => {
|
||||
this.officeData = data.offices;
|
||||
});
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
<div class="layout-row align-end gap-2px responsive-column container m-b-20">
|
||||
<span *mifosxHasPermission="'ACTIVATE_HOLIDAY'">
|
||||
<button mat-raised-button color="accent" (click)="activateHoliday()" *ngIf="holidayData.status.value !== 'Active'">
|
||||
<fa-icon icon="lock-open" class="m-r-10"></fa-icon>
|
||||
{{ 'labels.buttons.Activate' | translate }}
|
||||
</button>
|
||||
@if (holidayData.status.value !== 'Active') {
|
||||
<button mat-raised-button color="accent" (click)="activateHoliday()">
|
||||
<fa-icon icon="lock-open" class="m-r-10"></fa-icon>
|
||||
{{ 'labels.buttons.Activate' | translate }}
|
||||
</button>
|
||||
}
|
||||
</span>
|
||||
<button mat-raised-button color="primary" [routerLink]="['edit']" *mifosxHasPermission="'UPDATE_HOLIDAY'">
|
||||
<fa-icon icon="edit" class="m-r-10"></fa-icon>
|
||||
@@ -47,19 +49,17 @@
|
||||
{{ 'labels.inputs.Repayments Scheduled To' | translate }}
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="flex-50"
|
||||
*ngIf="holidayData.repaymentsRescheduledTo !== undefined && holidayData.repaymentsRescheduledTo !== null"
|
||||
>
|
||||
{{ holidayData.repaymentsRescheduledTo | dateFormat }}
|
||||
</div>
|
||||
@if (holidayData.repaymentsRescheduledTo !== undefined && holidayData.repaymentsRescheduledTo !== null) {
|
||||
<div class="flex-50">
|
||||
{{ holidayData.repaymentsRescheduledTo | dateFormat }}
|
||||
</div>
|
||||
}
|
||||
|
||||
<div
|
||||
class="flex-50"
|
||||
*ngIf="holidayData.repaymentsRescheduledTo === undefined || holidayData.repaymentsRescheduledTo === null"
|
||||
>
|
||||
{{ 'labels.inputs.Next Repayment Date' | translate }}
|
||||
</div>
|
||||
@if (holidayData.repaymentsRescheduledTo === undefined || holidayData.repaymentsRescheduledTo === null) {
|
||||
<div class="flex-50">
|
||||
{{ 'labels.inputs.Next Repayment Date' | translate }}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -28,6 +28,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class ViewHolidaysComponent {
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private dialog = inject(MatDialog);
|
||||
private translateService = inject(TranslateService);
|
||||
private organizationService = inject(OrganizationService);
|
||||
|
||||
/** Holiday data. */
|
||||
holidayData: any;
|
||||
|
||||
@@ -35,13 +41,7 @@ export class ViewHolidaysComponent {
|
||||
* Retrieves hioliday data from `resolve`.
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
*/
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dialog: MatDialog,
|
||||
private translateService: TranslateService,
|
||||
private organizationService: OrganizationService
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { holidays: any }) => {
|
||||
this.holidayData = data.holidays;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user