diff --git a/support-portal-frontend/src/app/notification/notification-type.ts b/support-portal-frontend/src/app/notification/notification-type.ts new file mode 100644 index 0000000..f8253db --- /dev/null +++ b/support-portal-frontend/src/app/notification/notification-type.ts @@ -0,0 +1,7 @@ +export enum NotificationType { + DEFAULT = 'default', + INFO = 'info', + SUCCESS = 'success', + WARNING = 'warning', + ERROR = 'error' +} diff --git a/support-portal-frontend/src/app/service/notification.service.ts b/support-portal-frontend/src/app/service/notification.service.ts index 986497c..e89168a 100644 --- a/support-portal-frontend/src/app/service/notification.service.ts +++ b/support-portal-frontend/src/app/service/notification.service.ts @@ -1,5 +1,6 @@ import {Injectable} from '@angular/core'; import {NotifierService} from "angular-notifier"; +import {NotificationType} from "../notification/notification-type"; @Injectable({ providedIn: 'root' @@ -9,7 +10,7 @@ export class NotificationService { constructor(private notifier: NotifierService) { } - public notify(type: string, message: string): void { + public notify(type: NotificationType, message: string): void { this.notifier.notify(type, message); }