revert 2
This commit is contained in:
@@ -15,12 +15,15 @@
|
||||
"prefix": "ipms",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:browser",
|
||||
"builder": "@angular-devkit/build-angular:application",
|
||||
"options": {
|
||||
"outputPath": "dist/diunaBI",
|
||||
"outputPath": {
|
||||
"base": "dist/diunaBI"
|
||||
},
|
||||
"index": "src/index.html",
|
||||
"main": "src/main.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"polyfills": [
|
||||
"src/polyfills.ts"
|
||||
],
|
||||
"tsConfig": "tsconfig.app.json",
|
||||
"inlineStyleLanguage": "scss",
|
||||
"assets": [
|
||||
@@ -36,8 +39,8 @@
|
||||
"allowedCommonJsDependencies": [
|
||||
"moment"
|
||||
],
|
||||
"serviceWorker": true,
|
||||
"ngswConfigPath": "ngsw-config.json"
|
||||
"serviceWorker": "ngsw-config.json",
|
||||
"browser": "src/main.ts"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
@@ -62,9 +65,7 @@
|
||||
"outputHashing": "all"
|
||||
},
|
||||
"development": {
|
||||
"buildOptimizer": false,
|
||||
"optimization": false,
|
||||
"vendorChunk": true,
|
||||
"extractLicenses": false,
|
||||
"sourceMap": true,
|
||||
"namedChunks": true
|
||||
@@ -76,10 +77,10 @@
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "DiunaBI:build:production"
|
||||
"buildTarget": "DiunaBI:build:production"
|
||||
},
|
||||
"development": {
|
||||
"browserTarget": "DiunaBI:build:development"
|
||||
"buildTarget": "DiunaBI:build:development"
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": "development"
|
||||
@@ -87,7 +88,7 @@
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "DiunaBI:build"
|
||||
"buildTarget": "DiunaBI:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
|
||||
@@ -12,46 +12,46 @@
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^16.2.10",
|
||||
"@angular/cdk": "^16.2.9",
|
||||
"@angular/common": "^16.2.10",
|
||||
"@angular/compiler": "^16.2.10",
|
||||
"@angular/core": "^16.2.10",
|
||||
"@angular/forms": "^16.2.10",
|
||||
"@angular/material": "^16.2.9",
|
||||
"@angular/material-moment-adapter": "^16.2.9",
|
||||
"@angular/platform-browser": "^16.2.10",
|
||||
"@angular/platform-browser-dynamic": "^16.2.10",
|
||||
"@angular/pwa": "16.2.7",
|
||||
"@angular/router": "^16.2.10",
|
||||
"@angular/service-worker": "^16.2.10",
|
||||
"jwt-decode": "^3.1.2",
|
||||
"moment": "^2.29.4",
|
||||
"@angular/animations": "^18.0.3",
|
||||
"@angular/cdk": "^18.0.3",
|
||||
"@angular/common": "^18.0.3",
|
||||
"@angular/compiler": "^18.0.3",
|
||||
"@angular/core": "^18.0.3",
|
||||
"@angular/forms": "^18.0.3",
|
||||
"@angular/material": "^18.0.3",
|
||||
"@angular/material-moment-adapter": "^18.0.3",
|
||||
"@angular/platform-browser": "^18.0.3",
|
||||
"@angular/platform-browser-dynamic": "^18.0.3",
|
||||
"@angular/pwa": "18.0.4",
|
||||
"@angular/router": "^18.0.3",
|
||||
"@angular/service-worker": "^18.0.3",
|
||||
"jwt-decode": "^4.0.0",
|
||||
"moment": "^2.30.1",
|
||||
"rxjs": "^7.6.0",
|
||||
"uuid": "9.0.1",
|
||||
"zone.js": "0.14.0"
|
||||
"uuid": "10.0.0",
|
||||
"zone.js": "0.14.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "^16.2.7",
|
||||
"@angular-eslint/builder": "16.2.0",
|
||||
"@angular-eslint/eslint-plugin": "16.2.0",
|
||||
"@angular-eslint/eslint-plugin-template": "16.2.0",
|
||||
"@angular-eslint/schematics": "16.2.0",
|
||||
"@angular-eslint/template-parser": "16.2.0",
|
||||
"@angular/cli": "~16.2.7",
|
||||
"@angular/compiler-cli": "^16.2.10",
|
||||
"@types/jasmine": "5.1.1",
|
||||
"@types/uuid": "9.0.6",
|
||||
"@typescript-eslint/eslint-plugin": "6.8.0",
|
||||
"@typescript-eslint/parser": "6.8.0",
|
||||
"eslint": "8.51.0",
|
||||
"jasmine-core": "5.1.1",
|
||||
"karma": "~6.4.0",
|
||||
"@angular-devkit/build-angular": "^18.0.4",
|
||||
"@angular-eslint/builder": "18.0.1",
|
||||
"@angular-eslint/eslint-plugin": "18.0.1",
|
||||
"@angular-eslint/eslint-plugin-template": "18.0.1",
|
||||
"@angular-eslint/schematics": "18.0.1",
|
||||
"@angular-eslint/template-parser": "18.0.1",
|
||||
"@angular/cli": "~18.0.4",
|
||||
"@angular/compiler-cli": "^18.0.3",
|
||||
"@types/jasmine": "5.1.4",
|
||||
"@types/uuid": "9.0.8",
|
||||
"@typescript-eslint/eslint-plugin": "^7.2.0",
|
||||
"@typescript-eslint/parser": "^7.2.0",
|
||||
"eslint": "^9.5.0",
|
||||
"jasmine-core": "5.1.2",
|
||||
"karma": "~6.4.3",
|
||||
"karma-chrome-launcher": "3.2.0",
|
||||
"karma-coverage": "2.2.1",
|
||||
"karma-jasmine": "~5.1.0",
|
||||
"karma-jasmine-html-reporter": "2.1.0",
|
||||
"tslib": "2.6.2",
|
||||
"typescript": "5.1.6"
|
||||
"tslib": "2.6.3",
|
||||
"typescript": "5.4.5"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ export class AppComponent {
|
||||
private readonly _swUpdate: SwUpdate,
|
||||
private _notifications: NotificationsService
|
||||
) {
|
||||
console.log('AppComponent');
|
||||
this.subscribeUpdates();
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import moment, { Moment } from 'moment';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { User } from '../models/user.model';
|
||||
import { BehaviorSubject, from, Observable } from 'rxjs';
|
||||
import jwt_decode from "jwt-decode";
|
||||
import {jwtDecode} from "jwt-decode";
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -27,6 +27,9 @@ export class AuthService {
|
||||
this.askForAuthData();
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
console.log('Check if loaded', window.onGoogleLibraryLoad);
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
window.onGoogleLibraryLoad = () => {
|
||||
this.isGoogleLibLoaded.next(true);
|
||||
};
|
||||
@@ -47,8 +50,8 @@ export class AuthService {
|
||||
});
|
||||
}
|
||||
retrieveUserFromCredentials(credentials: string) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const responsePayload: any = jwt_decode(credentials);
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const responsePayload: any = jwtDecode(credentials);
|
||||
this.user = new User({
|
||||
userName: `${responsePayload.given_name} ${responsePayload.family_name}`,
|
||||
email: responsePayload.email,
|
||||
@@ -78,6 +81,7 @@ export class AuthService {
|
||||
return from(this.getAPIToken());
|
||||
}
|
||||
isAuthenticated(): boolean {
|
||||
console.log('IsAuthenticated');
|
||||
return !!this.apiToken &&
|
||||
!!this.webCredentials &&
|
||||
!!this.user &&
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
HttpRequest,
|
||||
HttpHandler,
|
||||
HttpEvent,
|
||||
HttpInterceptor
|
||||
} from '@angular/common/http';
|
||||
import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
|
||||
import { AuthService } from '../auth/auth.service';
|
||||
import { EMPTY, Observable } from 'rxjs';
|
||||
import moment from 'moment';
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
HttpRequest,
|
||||
HttpHandler,
|
||||
HttpEvent,
|
||||
HttpInterceptor
|
||||
} from '@angular/common/http';
|
||||
import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
|
||||
import { finalize, Observable } from 'rxjs';
|
||||
import { DataService } from '../services/data.service';
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import { Moment } from 'moment';
|
||||
|
||||
import { Deserializable } from './deserializable.model';
|
||||
import { Serializable } from './serializable.model';
|
||||
import * as moment from 'moment';
|
||||
|
||||
import { User } from './user.model';
|
||||
import moment, {Moment} from "moment";
|
||||
|
||||
export class Base implements Deserializable, Serializable {
|
||||
id?: string;
|
||||
@@ -17,7 +16,7 @@ export class Base implements Deserializable, Serializable {
|
||||
constructor(data: Partial<Base> = {}) {
|
||||
Object.assign(this, data);
|
||||
}
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
deserialize(input: any): this {
|
||||
if (input.createdAt) { input.createdAt = moment(input.createdAt).utc(true); }
|
||||
@@ -27,9 +26,9 @@ export class Base implements Deserializable, Serializable {
|
||||
Object.assign(this, input);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
serialize() : any {
|
||||
return Object.assign({}, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,9 @@ export class LoginViewComponent implements OnInit {
|
||||
loading = false;
|
||||
|
||||
ngOnInit(): void {
|
||||
console.log('Init loginViewComponent');
|
||||
this.auth$.isGoogleLibLoaded.subscribe((isLoaded) => {
|
||||
console.log('GoogleLibLoaded', isLoaded);
|
||||
if (isLoaded) {
|
||||
this.initGoogleLogin();
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ import { Component, NgZone, ViewChild } from '@angular/core';
|
||||
import { MatSidenav, MatSidenavModule } from '@angular/material/sidenav';
|
||||
import { NavigationStart, Router, RouterLink, RouterOutlet } from '@angular/router';
|
||||
import { MatMenuModule } from '@angular/material/menu';
|
||||
import * as moment from 'moment';
|
||||
import packageInfo from 'package.json';
|
||||
import { delay } from 'rxjs';
|
||||
import { environment } from 'src/environments/environment';
|
||||
@@ -16,13 +15,14 @@ import { MatToolbarModule } from '@angular/material/toolbar';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { NgIf, DatePipe } from '@angular/common';
|
||||
import { MainMenuComponent } from 'src/app/components/main-menu/main-menu.component';
|
||||
import moment from "moment";
|
||||
|
||||
@Component({
|
||||
selector: 'diunabi-main-view',
|
||||
templateUrl: './main-view.component.html',
|
||||
styleUrls: ['./main-view.component.scss'],
|
||||
standalone: true,
|
||||
imports: [NgIf, MatIconModule, MatToolbarModule, MatButtonModule, MatSidenavModule,
|
||||
imports: [NgIf, MatIconModule, MatToolbarModule, MatButtonModule, MatSidenavModule,
|
||||
MatListModule, RouterLink, MatDividerModule, RouterOutlet, DatePipe, MatMenuModule, MainMenuComponent]
|
||||
})
|
||||
export class MainViewComponent {
|
||||
@@ -49,7 +49,7 @@ export class MainViewComponent {
|
||||
|
||||
//listen to loading subject
|
||||
data$.showLoader.pipe(delay(0)).subscribe(loading => {
|
||||
this.ngZone$.run(() => {
|
||||
this.ngZone$.run(() => {
|
||||
this.loading = loading;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
@include mat.core();
|
||||
|
||||
$my-app-primary: mat.define-palette(mat.$orange-palette);
|
||||
$my-app-accent: mat.define-palette(mat.$pink-palette, A200, A100, A400);
|
||||
$my-app-warn: mat.define-palette(mat.$red-palette);
|
||||
$my-app-primary: mat.m2-define-palette(mat.$m2-orange-palette);
|
||||
$my-app-accent: mat.m2-define-palette(mat.$m2-pink-palette, A200, A100, A400);
|
||||
$my-app-warn: mat.m2-define-palette(mat.$m2-red-palette);
|
||||
|
||||
$my-app-theme: mat.define-light-theme((color: (primary: $my-app-primary,
|
||||
$my-app-theme: mat.m2-define-light-theme((color: (primary: $my-app-primary,
|
||||
accent: $my-app-accent,
|
||||
warn: $my-app-warn,
|
||||
),
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
"outDir": "./dist/out-tsc",
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"noImplicitOverride": true,
|
||||
"noPropertyAccessFromIndexSignature": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"sourceMap": true,
|
||||
"declaration": false,
|
||||
"downlevelIteration": true,
|
||||
"experimentalDecorators": true,
|
||||
"moduleResolution": "node",
|
||||
"importHelpers": true,
|
||||
@@ -22,8 +22,7 @@
|
||||
"dom"
|
||||
],
|
||||
"useDefineForClassFields": false,
|
||||
"resolveJsonModule": true,
|
||||
"allowSyntheticDefaultImports": true
|
||||
"resolveJsonModule": true
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"enableI18nLegacyMessageIdFormat": false,
|
||||
|
||||
6961
Frontend/yarn.lock
6961
Frontend/yarn.lock
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user