Skip to content

Commit

Permalink
display 226 properly
Browse files Browse the repository at this point in the history
  • Loading branch information
kcinay055679 committed Nov 24, 2023
1 parent 3bd6273 commit 21ac830
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ export class ErrorInterceptor implements HttpInterceptor {
this.translate.instant('ERRORS.' + error.errorKey).format(error.params),
);

if (response.status == 226) {
errors.forEach((error: string) => this.toasterService.showWarn(error));
return;
}

errors.forEach((error: string) => this.toasterService.showError(error));
}

Expand All @@ -59,6 +54,12 @@ export class ErrorInterceptor implements HttpInterceptor {
if (NO_TOASTER.some((route) => response.url.includes(route))) {
return;
}

if (response.status == 226) {
this.toasterService.showWarn(this.translate.instant('ERRORS.ILLEGAL_CHANGE_OBJECTIVE_QUARTER'));
return;
}

switch (method) {
case 'POST': {
this.toasterService.showSuccess('Element wurde erfolgreich erstellt');
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/assets/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"NOT_AUTHORIZED_TO_READ": "Du bist nicht autorisiert um dieses {0} anzuzeigen",
"NOT_AUTHORIZED_TO_WRITE":"Du bist nicht autorisiert um dieses {0} zu bearbeiten",
"NOT_AUTHORIZED_TO_DELETE": "Du bist nicht autorisiert um dieses {0} zu löschen",
"TOKEN_NULL": "Das erhaltene Token ist null"
"TOKEN_NULL": "Das erhaltene Token ist null",
"ILLEGAL_CHANGE_OBJECTIVE_QUARTER":"Element kann nicht in ein anderes Quartal verlegt werden"
}
}

0 comments on commit 21ac830

Please sign in to comment.