564995 - Overlay messages stop working, if one message was dismissed by
an user

Replaced deprecated growl with toast

Signed-off-by: Juergen Kleck <j.kleck@peak-solution.de>
diff --git a/nucleus/webclient/src/main/webapp/src/app/core/mdm-core.module.ts b/nucleus/webclient/src/main/webapp/src/app/core/mdm-core.module.ts
index bf5dbe5..36bdc62 100644
--- a/nucleus/webclient/src/main/webapp/src/app/core/mdm-core.module.ts
+++ b/nucleus/webclient/src/main/webapp/src/app/core/mdm-core.module.ts
@@ -28,7 +28,9 @@
 import { BsDropdownModule } from 'ngx-bootstrap';
 
 import { TreeModule, DataTableModule, SharedModule, ContextMenuModule } from 'primeng/primeng';
-import { GrowlModule, DropdownModule, MultiSelectModule, CalendarModule } from 'primeng/primeng';
+import { DropdownModule, MultiSelectModule, CalendarModule } from 'primeng/primeng';
+import { ToastModule } from 'primeng/toast';
+import { MessageService } from 'primeng/api';
 
 import { PropertyService } from './property.service';
 import { PreferenceService } from './preference.service';
@@ -71,7 +73,7 @@
     ContextMenuModule,
     DropdownModule,
     MultiSelectModule,
-    GrowlModule,
+    ToastModule,
     AccordionModule.forRoot(),
     BsDropdownModule.forRoot(),
     HttpClientModule,
@@ -95,7 +97,7 @@
     DataTableModule,
     SharedModule,
     ContextMenuModule,
-    GrowlModule,
+    ToastModule,
     AccordionModule,
     BsDropdownModule,
     TypeaheadModule,
@@ -111,7 +113,8 @@
       PositioningService,
       ComponentLoaderFactory,
       PropertyService,
-      PreferenceService
+      PreferenceService,
+      MessageService
     ]
 })
 export class MDMCoreModule {
diff --git a/nucleus/webclient/src/main/webapp/src/app/core/mdm-notification.component.ts b/nucleus/webclient/src/main/webapp/src/app/core/mdm-notification.component.ts
index 2ee0f69..6d79cb0 100644
--- a/nucleus/webclient/src/main/webapp/src/app/core/mdm-notification.component.ts
+++ b/nucleus/webclient/src/main/webapp/src/app/core/mdm-notification.component.ts
@@ -14,19 +14,19 @@
 
 
 import { Component, OnInit, OnDestroy } from '@angular/core';
-import { Message } from 'primeng/primeng';
+import { MessageService } from 'primeng/api';
 import { MDMNotificationService } from './mdm-notification.service';
 import { Subscription } from 'rxjs';
 
 @Component({
   selector: 'mdm-notifications',
-  template: '<p-growl [value]="msgs" sticky="true"></p-growl>'
+  template: '<p-toast baseZIndex="2000"></p-toast>'
 })
 export class MDMNotificationComponent implements OnInit, OnDestroy {
-  msgs: Message[] = [];
   subscription: Subscription;
 
-  constructor(private notificationsService: MDMNotificationService) { }
+  constructor(private notificationsService: MDMNotificationService,
+   private messageService: MessageService) { }
 
   ngOnInit() {
     this.subscribeToNotifications();
@@ -34,7 +34,13 @@
 
   subscribeToNotifications() {
     this.subscription = this.notificationsService.notificationChange
-      .subscribe(notification => this.msgs.push(notification));
+      .subscribe(notification => {
+        notification.life = 10000;
+        if (notification.severity === 'error') {
+          notification.sticky = true;
+        }
+        this.messageService.add(notification);
+      });
   }
 
   ngOnDestroy() {