Fix error message display for login page (CC-71)

pull/47/head
HardiReady 2018-11-24 14:12:05 +01:00
parent 118214a906
commit f33c1e556a
2 changed files with 6 additions and 1 deletions

View File

@ -38,7 +38,8 @@ export class LoginComponent implements OnInit {
this.router.navigate([this.returnUrl]);
},
error => {
this.snackBarService.showError(error._body, 15000);
// TODO: return i18n key from backend to use translate error method
this.snackBarService.showUntranslatedError(error.error, 15000);
this.loading = false;
});
}

View File

@ -42,4 +42,8 @@ export class SnackBarService {
});
});
}
showUntranslatedError(message: string, duration?: number) {
return this.show(message, 'OK', duration, ['custom-snack-bar', 'label-danger']);
}
}