[ACA-1057] Upload - snack-bar error messages (#837)

* upload error notification

* remove duplicate

* test
This commit is contained in:
Cilibiu Bogdan
2018-11-28 10:32:12 +00:00
committed by Denys Vuika
parent 9b717c2743
commit 4c77ace5eb
2 changed files with 79 additions and 2 deletions
+12
View File
@@ -167,6 +167,14 @@ export class AppComponent implements OnInit, OnDestroy {
onFileUploadedError(error: FileUploadErrorEvent) {
let message = 'APP.MESSAGES.UPLOAD.ERROR.GENERIC';
if (error.error.status === 403) {
message = 'APP.MESSAGES.UPLOAD.ERROR.403';
}
if (error.error.status === 404) {
message = 'APP.MESSAGES.UPLOAD.ERROR.404';
}
if (error.error.status === 409) {
message = 'APP.MESSAGES.UPLOAD.ERROR.CONFLICT';
}
@@ -175,6 +183,10 @@ export class AppComponent implements OnInit, OnDestroy {
message = 'APP.MESSAGES.UPLOAD.ERROR.500';
}
if (error.error.status === 504) {
message = 'APP.MESSAGES.UPLOAD.ERROR.504';
}
this.store.dispatch(new SnackbarErrorAction(message));
}
}