other error
parent
501cb33406
commit
964795019d
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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){
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@
|
|||
|
||||
|
||||
<div
|
||||
*ngIf="!this.showNoResultsError && !this.errorService.critical && !this.errorService.rsso" id="showSpin" data-bind="visible: spin"
|
||||
*ngIf="!this.showNoResultsError && !this.errorService.critical && !this.errorService.rsso && !this.errorService.error" id="showSpin" data-bind="visible: spin"
|
||||
style=" position: absolute; top: auto; left: 30%;">
|
||||
<img src="https://upload.wikimedia.org/wikipedia/commons/b/b1/Loading_icon.gif" rel="stylesheet"/>
|
||||
</div>
|
||||
|
|
@ -253,7 +253,17 @@
|
|||
<mat-card-content>
|
||||
<p style="padding-left: 15px;">{{errorService.getLastError('critical').message}}</p>
|
||||
</mat-card-content>
|
||||
|
||||
</mat-card>
|
||||
|
||||
<mat-card style="width: 50%; margin: auto;" *ngIf="!errorService.rsso && !errorService.critical && errorService.error">
|
||||
<mat-card-header>
|
||||
<mat-card-title><mat-icon style="color: red;">error</mat-icon> {{errorService.getLastError('error').name}}</mat-card-title>
|
||||
<mat-card-subtitle>{{errorService.getLastError('error').userInfo}}</mat-card-subtitle>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<p style="padding-left: 15px;">{{errorService.getLastError('error').message}}</p>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue