update dependencies and migrate
This commit is contained in:
@@ -3,6 +3,7 @@ import { Component } from '@angular/core';
|
||||
import { I18nService } from './services/i18n.service';
|
||||
|
||||
@Component({
|
||||
standalone: false,
|
||||
selector: 'app-root',
|
||||
templateUrl: './app.component.html'
|
||||
})
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from '@angular/router';
|
||||
import { AuthService } from '../services/auth.service';
|
||||
import { I18nService } from '../services/i18n.service';
|
||||
import { RequestError } from '../services/requesterror';
|
||||
import { UserService } from '../services/user.service';
|
||||
import { I18nService } from '../services/i18n.service';
|
||||
|
||||
|
||||
@Injectable({
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Directive, ElementRef, OnInit } from '@angular/core';
|
||||
|
||||
@Directive({
|
||||
standalone: false,
|
||||
selector: '[matAutofocus]',
|
||||
})
|
||||
export class AutofocusDirective implements OnInit {
|
||||
|
||||
@@ -1,48 +1,48 @@
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
// Material Form Controls
|
||||
import {MatAutocompleteModule} from '@angular/material/autocomplete';
|
||||
import {MatCheckboxModule} from '@angular/material/checkbox';
|
||||
import {MatDatepickerModule} from '@angular/material/datepicker';
|
||||
import {MatFormFieldModule} from '@angular/material/form-field';
|
||||
import {MatInputModule} from '@angular/material/input';
|
||||
import {MatRadioModule} from '@angular/material/radio';
|
||||
import {MatSelectModule} from '@angular/material/select';
|
||||
import {MatSliderModule} from '@angular/material/slider';
|
||||
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
|
||||
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
||||
import { MatCheckboxModule } from '@angular/material/checkbox';
|
||||
import { MatDatepickerModule } from '@angular/material/datepicker';
|
||||
import { MatFormFieldModule } from '@angular/material/form-field';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatRadioModule } from '@angular/material/radio';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
||||
import { MatSliderModule } from '@angular/material/slider';
|
||||
// Material Navigation
|
||||
import {MatMenuModule} from '@angular/material/menu';
|
||||
import {MatSidenavModule} from '@angular/material/sidenav';
|
||||
import {MatToolbarModule} from '@angular/material/toolbar';
|
||||
import { MatMenuModule } from '@angular/material/menu';
|
||||
import { MatSidenavModule } from '@angular/material/sidenav';
|
||||
import { MatToolbarModule } from '@angular/material/toolbar';
|
||||
// Material Layout
|
||||
import {MatCardModule} from '@angular/material/card';
|
||||
import {MatDividerModule} from '@angular/material/divider';
|
||||
import {MatExpansionModule} from '@angular/material/expansion';
|
||||
import {MatGridListModule} from '@angular/material/grid-list';
|
||||
import {MatListModule} from '@angular/material/list';
|
||||
import {MatStepperModule} from '@angular/material/stepper';
|
||||
import {MatTabsModule} from '@angular/material/tabs';
|
||||
import {MatTreeModule} from '@angular/material/tree';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
import { MatDividerModule } from '@angular/material/divider';
|
||||
import { MatExpansionModule } from '@angular/material/expansion';
|
||||
import { MatGridListModule } from '@angular/material/grid-list';
|
||||
import { MatListModule } from '@angular/material/list';
|
||||
import { MatStepperModule } from '@angular/material/stepper';
|
||||
import { MatTabsModule } from '@angular/material/tabs';
|
||||
import { MatTreeModule } from '@angular/material/tree';
|
||||
// Material Buttons & Indicators
|
||||
import {MatButtonModule} from '@angular/material/button';
|
||||
import {MatButtonToggleModule} from '@angular/material/button-toggle';
|
||||
import {MatBadgeModule} from '@angular/material/badge';
|
||||
import {MatChipsModule} from '@angular/material/chips';
|
||||
import {MatIconModule} from '@angular/material/icon';
|
||||
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
|
||||
import {MatProgressBarModule} from '@angular/material/progress-bar';
|
||||
import {MatRippleModule} from '@angular/material/core';
|
||||
import { MatBadgeModule } from '@angular/material/badge';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
||||
import { MatChipsModule } from '@angular/material/chips';
|
||||
import { MatRippleModule } from '@angular/material/core';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
// Material Popups & Modals
|
||||
import {MatBottomSheetModule} from '@angular/material/bottom-sheet';
|
||||
import {MatDialogModule} from '@angular/material/dialog';
|
||||
import {MatSnackBarModule} from '@angular/material/snack-bar';
|
||||
import {MatTooltipModule} from '@angular/material/tooltip';
|
||||
import { MatBottomSheetModule } from '@angular/material/bottom-sheet';
|
||||
import { MatDialogModule } from '@angular/material/dialog';
|
||||
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
// Material Data tables
|
||||
import {MatPaginatorModule} from '@angular/material/paginator';
|
||||
import {MatSortModule} from '@angular/material/sort';
|
||||
import {MatTableModule} from '@angular/material/table';
|
||||
import {MatMomentDateModule} from '@angular/material-moment-adapter';
|
||||
import { MatMomentDateModule } from '@angular/material-moment-adapter';
|
||||
import { MatPaginatorModule } from '@angular/material/paginator';
|
||||
import { MatSortModule } from '@angular/material/sort';
|
||||
import { MatTableModule } from '@angular/material/table';
|
||||
|
||||
@NgModule({
|
||||
declarations: [],
|
||||
@@ -123,4 +123,4 @@ import {MatMomentDateModule} from '@angular/material-moment-adapter';
|
||||
MatTableModule
|
||||
]
|
||||
})
|
||||
export class MaterialModule {}
|
||||
export class MaterialModule { }
|
||||
|
||||
@@ -6,6 +6,7 @@ import { environment } from '../../../environments/environment';
|
||||
import { AuthService } from '../../services/auth.service';
|
||||
|
||||
@Component({
|
||||
standalone: false,
|
||||
selector: 'page-login',
|
||||
templateUrl: './login.page.html',
|
||||
styleUrls: ['./login.page.scss']
|
||||
|
||||
@@ -10,6 +10,7 @@ import { UserManagementService } from 'src/app/services/user.management.service'
|
||||
import { UiTurnovers } from 'src/app/ui/turnovers/turnovers.ui';
|
||||
|
||||
@Component({
|
||||
standalone: false,
|
||||
selector: 'ui-management',
|
||||
templateUrl: './management.page.html',
|
||||
styleUrls: ['./management.page.scss']
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
standalone: false,
|
||||
selector: 'page-notfound',
|
||||
templateUrl: './notfound.page.html',
|
||||
styleUrls: [ './notfound.page.scss' ]
|
||||
styleUrls: ['./notfound.page.scss']
|
||||
})
|
||||
export class PageNotFound {
|
||||
export class PageNotFound {
|
||||
|
||||
constructor() { }
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { Component, OnDestroy, OnInit } from '@angular/core';
|
||||
import { AbstractControlOptions, FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
|
||||
import { UserService } from '../../services/user.service';
|
||||
import { MatchingValidator } from 'src/app/utils/matching.validator';
|
||||
import { UserService } from '../../services/user.service';
|
||||
|
||||
@Component({
|
||||
standalone: false,
|
||||
selector: 'page-password',
|
||||
templateUrl: './password.page.html',
|
||||
styleUrls: ['./password.page.scss']
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
import { Component, OnDestroy, OnInit } from '@angular/core';
|
||||
import { AbstractControlOptions, FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
|
||||
import { UserService } from '../../services/user.service';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { UserManagementService } from 'src/app/services/user.management.service';
|
||||
import { MatchingValidator } from 'src/app/utils/matching.validator';
|
||||
import { ConfirmDialog } from 'src/app/ui/confirm/confirm.component';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { MatchingValidator } from 'src/app/utils/matching.validator';
|
||||
import { UserService } from '../../services/user.service';
|
||||
|
||||
@Component({
|
||||
standalone: false,
|
||||
selector: 'page-profile',
|
||||
templateUrl: './profile.page.html',
|
||||
styleUrls: ['./profile.page.scss']
|
||||
@@ -111,7 +112,7 @@ export class PageProfile implements OnInit, OnDestroy {
|
||||
for (let errorObject of error.error) {
|
||||
errors[errorObject.field] = errors[errorObject.field] || {};
|
||||
errors[errorObject.field][errorObject.code] = errorObject.arguments || true;
|
||||
}
|
||||
}
|
||||
|
||||
for (let code in errors) {
|
||||
this.profileForm.get(code).setErrors(errors[code]);
|
||||
@@ -141,7 +142,7 @@ export class PageProfile implements OnInit, OnDestroy {
|
||||
for (let errorObject of error.error) {
|
||||
errors[errorObject.field] = errors[errorObject.field] || {};
|
||||
errors[errorObject.field][errorObject.code] = errorObject.arguments || true;
|
||||
}
|
||||
}
|
||||
|
||||
for (let code in errors) {
|
||||
this.passwordForm.get(code).setErrors(errors[code]);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { MatDatepickerInputEvent } from '@angular/material/datepicker';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
@@ -11,6 +10,7 @@ import { TurnoverService } from 'src/app/services/turnover.service';
|
||||
import { ConfirmDialog } from 'src/app/ui/confirm/confirm.component';
|
||||
|
||||
@Component({
|
||||
standalone: false,
|
||||
selector: 'page-turnover',
|
||||
templateUrl: './turnover.page.html',
|
||||
styleUrls: ['./turnover.page.scss']
|
||||
|
||||
@@ -9,6 +9,7 @@ import { UserManagementService } from 'src/app/services/user.management.service'
|
||||
import { UiTurnovers } from 'src/app/ui/turnovers/turnovers.ui';
|
||||
|
||||
@Component({
|
||||
standalone: false,
|
||||
selector: 'page-turnovers-manage',
|
||||
templateUrl: './manage.page.html',
|
||||
styleUrls: ['./manage.page.scss']
|
||||
|
||||
@@ -6,6 +6,7 @@ import { TurnoverService } from 'src/app/services/turnover.service';
|
||||
import { UiTurnovers } from 'src/app/ui/turnovers/turnovers.ui';
|
||||
|
||||
@Component({
|
||||
standalone: false,
|
||||
selector: 'page-turnovers',
|
||||
templateUrl: './turnovers.page.html',
|
||||
styleUrls: ['./turnovers.page.scss']
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { Location } from '@angular/common';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Location } from '@angular/common'
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
standalone: false,
|
||||
selector: 'page-unavailable',
|
||||
templateUrl: './unavailable.page.html',
|
||||
styleUrls: ['./unavailable.page.scss']
|
||||
|
||||
@@ -4,6 +4,7 @@ import { Router } from '@angular/router';
|
||||
import { UserManagementService } from 'src/app/services/user.management.service';
|
||||
|
||||
@Component({
|
||||
standalone: false,
|
||||
selector: 'page-user-create',
|
||||
templateUrl: './users.create.page.html',
|
||||
styleUrls: ['./users.create.page.scss']
|
||||
|
||||
@@ -6,6 +6,7 @@ import { AuthService } from 'src/app/services/auth.service';
|
||||
import { UserManagementService } from 'src/app/services/user.management.service';
|
||||
|
||||
@Component({
|
||||
standalone: false,
|
||||
selector: 'ui-users',
|
||||
templateUrl: './users.page.html',
|
||||
styleUrls: ['./users.page.scss']
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ReplaySubject, of } from 'rxjs';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ReplaySubject } from 'rxjs';
|
||||
|
||||
import { RequestError } from './requesterror';
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { environment } from '../../environments/environment';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { MatPaginatorIntl } from '@angular/material/paginator';
|
||||
import { Subject } from 'rxjs';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
import { environment } from '../../environments/environment';
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import {Component, Inject} from '@angular/core';
|
||||
import {MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
|
||||
import {I18nService} from '../../services/i18n.service';
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { I18nService } from '../../services/i18n.service';
|
||||
|
||||
@Component({
|
||||
standalone: false,
|
||||
templateUrl: 'confirm.component.html',
|
||||
styleUrls: ['./confirm.component.scss']
|
||||
})
|
||||
export class ConfirmDialog {
|
||||
|
||||
|
||||
text;
|
||||
|
||||
constructor(private i18nService: I18nService,
|
||||
|
||||
@@ -7,12 +7,13 @@ import { AuthService } from '../../services/auth.service';
|
||||
import { I18nService } from '../../services/i18n.service';
|
||||
import { UserService } from '../../services/user.service';
|
||||
|
||||
import { SwUpdate } from '@angular/service-worker';
|
||||
import packageJson from '../../../../package.json';
|
||||
import { MatSidenav } from '@angular/material/sidenav';
|
||||
import { SwUpdate } from '@angular/service-worker';
|
||||
import { DebugService } from 'src/app/services/debug.service';
|
||||
import packageJson from '../../../../package.json';
|
||||
|
||||
@Component({
|
||||
standalone: false,
|
||||
selector: 'ui-main',
|
||||
templateUrl: './main.ui.html',
|
||||
styleUrls: ['./main.ui.scss']
|
||||
|
||||
@@ -6,6 +6,7 @@ import moment from 'moment';
|
||||
import { I18nService } from 'src/app/services/i18n.service';
|
||||
|
||||
@Component({
|
||||
standalone: false,
|
||||
selector: 'ui-turnovers',
|
||||
templateUrl: './turnovers.ui.html',
|
||||
styleUrls: ['./turnovers.ui.scss']
|
||||
|
||||
@@ -4,6 +4,7 @@ import { Pipe, PipeTransform } from '@angular/core';
|
||||
import { I18nService } from './../services/i18n.service';
|
||||
|
||||
@Pipe({
|
||||
standalone: false,
|
||||
name: 'i18n'
|
||||
})
|
||||
export class I18nPipe implements PipeTransform {
|
||||
@@ -21,6 +22,7 @@ export class I18nPipe implements PipeTransform {
|
||||
}
|
||||
|
||||
@Pipe({
|
||||
standalone: false,
|
||||
name: 'i18nEmpty'
|
||||
})
|
||||
export class I18nEmptyPipe implements PipeTransform {
|
||||
@@ -34,6 +36,7 @@ export class I18nEmptyPipe implements PipeTransform {
|
||||
}
|
||||
|
||||
@Pipe({
|
||||
standalone: false,
|
||||
name: 'errorCode'
|
||||
})
|
||||
export class ErrorCodePipe implements PipeTransform {
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
import * as moment from 'moment';
|
||||
|
||||
@Pipe({ name: 'datef' })
|
||||
@Pipe({
|
||||
standalone: false,
|
||||
name: 'datef'
|
||||
})
|
||||
export class MomentPipe implements PipeTransform {
|
||||
transform(value: Date | moment.Moment, dateFormat: string | undefined = undefined): any {
|
||||
if (!dateFormat) {
|
||||
return moment(value).fromNow();
|
||||
}
|
||||
|
||||
|
||||
return moment(value).format(dateFormat);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user