The notification message title and text were inverted.
Signed-off-by: Volker Theile <vtheile@suse.com>
() => {
this.notificationService.show(
NotificationType.success,
- `User "${userFormModel.username}" has been created.`,
- 'Create User'
+ `Created user "${userFormModel.username}"`
);
this.router.navigate(['/users']);
},
} else {
this.notificationService.show(
NotificationType.success,
- `User "${userFormModel.username}" has been updated.`,
- 'Edit User'
+ `Updated user "${userFormModel.username}"`
);
this.router.navigate(['/users']);
}
() => {
this.getUsers();
this.modalRef.hide();
- this.notificationService.show(
- NotificationType.success,
- `User "${username}" has been deleted.`,
- 'Delete User'
- );
+ this.notificationService.show(NotificationType.success, `Deleted user "${username}"`);
},
() => {
this.modalRef.content.stopLoadingSpinner();
if (sessionUsername === username) {
this.notificationService.show(
NotificationType.error,
- `You are currently authenticated with user "${username}".`,
- 'Cannot Delete User'
+ `Failed to delete user "${username}"`,
+ `You are currently logged in as "${username}".`
);
return;
}
* Method for showing a notification.
* @param {NotificationType} type toastr type
* @param {string} title
- * @param {string} [message]
+ * @param {string} [message] The message to be displayed. Note, use this field
+ * for error notifications only.
* @param {*} [options] toastr compatible options, used when creating a toastr
* @memberof NotificationService
* @returns The timeout ID that is set to be able to cancel the notification.