fix(console): toast message (#440)

* fix: toast message

* i18n fully

* fix toast payload
This commit is contained in:
Max Peintner
2020-07-09 18:47:01 +02:00
committed by GitHub
parent 1b59a52f26
commit e5172bad70
3 changed files with 17 additions and 17 deletions

View File

@@ -82,8 +82,8 @@ export class AuthUserDetailComponent implements OnDestroy {
this.toast.showInfo('USER.TOAST.EMAILSAVED', true); this.toast.showInfo('USER.TOAST.EMAILSAVED', true);
this.user.email = data.toObject().email; this.user.email = data.toObject().email;
this.emailEditState = false; this.emailEditState = false;
}).catch(data => { }).catch(error => {
this.toast.showError(data.message); this.toast.showError(error);
this.emailEditState = false; this.emailEditState = false;
}); });
} }
@@ -145,7 +145,7 @@ export class AuthUserDetailComponent implements OnDestroy {
this.user.phone = data.toObject().phone; this.user.phone = data.toObject().phone;
this.phoneEditState = false; this.phoneEditState = false;
}).catch(data => { }).catch(data => {
this.toast.showError(data.message); this.toast.showError(data);
this.phoneEditState = false; this.phoneEditState = false;
}); });
} }

View File

@@ -99,8 +99,8 @@ export class UserDetailComponent implements OnInit, OnDestroy {
this.toast.showInfo('USER.TOAST.SAVED', true); this.toast.showInfo('USER.TOAST.SAVED', true);
this.user = Object.assign(this.user, data.toObject()); this.user = Object.assign(this.user, data.toObject());
}) })
.catch(data => { .catch(error => {
this.toast.showError(data.message); this.toast.showError(error);
}); });
} }
@@ -136,8 +136,8 @@ export class UserDetailComponent implements OnInit, OnDestroy {
.SaveUserEmail(this.user.id, this.user.email).then((data: UserEmail) => { .SaveUserEmail(this.user.id, this.user.email).then((data: UserEmail) => {
this.toast.showInfo('USER.TOAST.EMAILSENT', true); this.toast.showInfo('USER.TOAST.EMAILSENT', true);
this.user.email = data.toObject().email; this.user.email = data.toObject().email;
}).catch(data => { }).catch(error => {
this.toast.showError(data.message); this.toast.showError(error);
}); });
} }
@@ -148,8 +148,8 @@ export class UserDetailComponent implements OnInit, OnDestroy {
this.toast.showInfo('USER.TOAST.PHONESAVED', true); this.toast.showInfo('USER.TOAST.PHONESAVED', true);
this.user.phone = data.toObject().phone; this.user.phone = data.toObject().phone;
this.phoneEditState = false; this.phoneEditState = false;
}).catch(data => { }).catch(error => {
this.toast.showError(data.message); this.toast.showError(error);
}); });
} }
@@ -170,8 +170,8 @@ export class UserDetailComponent implements OnInit, OnDestroy {
this.mgmtUserService.SendSetPasswordNotification(this.user.id, NotificationType.NOTIFICATIONTYPE_EMAIL) this.mgmtUserService.SendSetPasswordNotification(this.user.id, NotificationType.NOTIFICATIONTYPE_EMAIL)
.then(() => { .then(() => {
this.toast.showInfo('USER.TOAST.PASSWORDNOTIFICATIONSENT', true); this.toast.showInfo('USER.TOAST.PASSWORDNOTIFICATIONSENT', true);
}).catch(data => { }).catch(error => {
this.toast.showError(data.message); this.toast.showError(error);
}); });
} }

View File

@@ -194,18 +194,18 @@
"EDITACCOUNT":"Edit Account", "EDITACCOUNT":"Edit Account",
"ADDACCOUNT":"Log in with another account", "ADDACCOUNT":"Log in with another account",
"TOAST": { "TOAST": {
"CREATED":"User created successful!", "CREATED":"User created successfully!",
"SAVED":"Profile saved successful!", "SAVED":"Profile saved successfully!",
"EMAILSAVED":"Email saved successful!", "EMAILSAVED":"Email saved successfully!",
"PHONESAVED":"Phone saved successful!", "PHONESAVED":"Phone saved successfully!",
"PHONEREMOVED":"Phone has been removed!", "PHONEREMOVED":"Phone has been removed!",
"PHONEVERIFIED":"Phone verified successful!", "PHONEVERIFIED":"Phone verified successfully!",
"PHONEVERIFICATIONSENT":"Phone verification code sent!", "PHONEVERIFICATIONSENT":"Phone verification code sent!",
"EMAILVERIFICATIONSENT":"Email verification code sent!", "EMAILVERIFICATIONSENT":"Email verification code sent!",
"OTPREMOVED":"OTP removed!", "OTPREMOVED":"OTP removed!",
"INITIALPASSWORDSET":"Initial password set!", "INITIALPASSWORDSET":"Initial password set!",
"PASSWORDNOTIFICATIONSENT":"Password Change Notification sent", "PASSWORDNOTIFICATIONSENT":"Password Change Notification sent",
"PASSWORDCHANGED":"Password changed successful!", "PASSWORDCHANGED":"Password changed successfully!",
"REACTIVATED":"User reactivated", "REACTIVATED":"User reactivated",
"DEACTIVATED":"User deactivated" "DEACTIVATED":"User deactivated"
} }