diff --git a/frontend/src/app/data.service.ts b/frontend/src/app/data.service.ts index 9368a80..7a69ba0 100644 --- a/frontend/src/app/data.service.ts +++ b/frontend/src/app/data.service.ts @@ -677,8 +677,11 @@ export class DataService { }) console.log(res); + this.errorService.error = false; resolve(res); - }) + },(error=>{ + this.errorService.handleCostumError('Fehler beim Laden der Change Pakete','Möglicherweise sind dem User keine Changes zugewiesen', error.message, 'error'); + })) }) return promise; } diff --git a/frontend/src/app/error.service.ts b/frontend/src/app/error.service.ts index 08c4385..53786da 100644 --- a/frontend/src/app/error.service.ts +++ b/frontend/src/app/error.service.ts @@ -42,8 +42,20 @@ export class ErrorService { public handleCostumError(name: string, userInfo: string, message: string, type: string){ this.errors.push({name: name,userInfo: userInfo, message: message, type: type}); - this.rsso = true; - console.log("RSSO ERROR"); + if(type == 'rsso'){ + this.rsso = true; + } + if(type == 'critical'){ + this.critical = true; + } + if(type == 'error'){ + this.error = true; + } + console.log({name: name,userInfo: userInfo, message: message, type: type}); + console.log(this.errors); + console.log(this.error); + console.log(this.rsso); + console.log(this.critical); } public getLastError(type: string){ diff --git a/frontend/src/app/ntt-gantt/ntt-gantt.component.html b/frontend/src/app/ntt-gantt/ntt-gantt.component.html index f3ac639..c8b1f6b 100644 --- a/frontend/src/app/ntt-gantt/ntt-gantt.component.html +++ b/frontend/src/app/ntt-gantt/ntt-gantt.component.html @@ -75,7 +75,7 @@
@@ -253,7 +253,17 @@

{{errorService.getLastError('critical').message}}

- + + + + + error {{errorService.getLastError('error').name}} + {{errorService.getLastError('error').userInfo}} + + +

{{errorService.getLastError('error').message}}

+
+