@posiwise/dashboard-module 0.0.51 → 0.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/navbar/navbar.component.mjs +13 -11
- package/fesm2015/posiwise-dashboard-module.mjs +12 -10
- package/fesm2015/posiwise-dashboard-module.mjs.map +1 -1
- package/fesm2020/posiwise-dashboard-module.mjs +12 -10
- package/fesm2020/posiwise-dashboard-module.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -392,17 +392,19 @@ class NavbarComponent extends AppBaseComponent {
|
|
|
392
392
|
// TODO: Add animation while removing
|
|
393
393
|
const index = this.notifications.findIndex(x => x.id === id);
|
|
394
394
|
this.notifications.splice(index, 1);
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
val.
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
395
|
+
if (data) {
|
|
396
|
+
const val = JSON.parse(data);
|
|
397
|
+
if (val.length > 0) {
|
|
398
|
+
val.forEach(element => {
|
|
399
|
+
const existNotification = this.notifications.find(({ key }) => element.id === key);
|
|
400
|
+
if (!existNotification) {
|
|
401
|
+
this.notifications.push(element);
|
|
402
|
+
if (element.unread === true) {
|
|
403
|
+
this.notificationCount++;
|
|
404
|
+
}
|
|
403
405
|
}
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
+
});
|
|
407
|
+
}
|
|
406
408
|
}
|
|
407
409
|
if (this.notifications.length === 0) {
|
|
408
410
|
this.noNoti = true;
|