Code Review
/
portal
/
ric-dashboard.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Revise the notification services
[portal/ric-dashboard.git]
/
webapp-frontend
/
src
/
app
/
services
/
ui
/
notification.service.ts
diff --git
a/webapp-frontend/src/app/services/ui/notification.service.ts
b/webapp-frontend/src/app/services/ui/notification.service.ts
index
30f8021
..
6477125
100644
(file)
--- a/
webapp-frontend/src/app/services/ui/notification.service.ts
+++ b/
webapp-frontend/src/app/services/ui/notification.service.ts
@@
-28,25
+28,34
@@
export class NotificationService {
constructor(public snackBar: MatSnackBar) { }
constructor(public snackBar: MatSnackBar) { }
-
c
onfig: MatSnackBarConfig = {
- duration:
3
000,
+
successC
onfig: MatSnackBarConfig = {
+ duration:
10
000,
horizontalPosition: 'right',
verticalPosition: 'top'
};
horizontalPosition: 'right',
verticalPosition: 'top'
};
+ warningConfig: MatSnackBarConfig = {
+ horizontalPosition: 'right',
+ verticalPosition: 'top'
+ };
+
+ errorConfig: MatSnackBarConfig = {
+ horizontalPosition: 'right',
+ verticalPosition: 'top'
+ };
success(msg: string) {
success(msg: string) {
- this.
c
onfig['panelClass'] = ['notification', 'success', 'default'];
- this.snackBar.open(msg, '', this.
c
onfig);
+ this.
successC
onfig['panelClass'] = ['notification', 'success', 'default'];
+ this.snackBar.open(msg, '', this.
successC
onfig);
}
warn(msg: string) {
}
warn(msg: string) {
- this.
c
onfig['panelClass'] = ['notification', 'warn', 'default'];
- this.snackBar.open(msg, '
', this.c
onfig);
+ this.
warningC
onfig['panelClass'] = ['notification', 'warn', 'default'];
+ this.snackBar.open(msg, '
Dismiss', this.warningC
onfig);
}
error(msg: string) {
}
error(msg: string) {
- this.
c
onfig['panelClass'] = ['notification', 'error', 'default'];
- this.snackBar.open(msg, '
', this.c
onfig);
+ this.
errorC
onfig['panelClass'] = ['notification', 'error', 'default'];
+ this.snackBar.open(msg, '
Dismiss', this.errorC
onfig);
}
}
}
}