diff --git a/src/designer/elsa-workflows-designer/src/modules/notifications/notification-manager.tsx b/src/designer/elsa-workflows-designer/src/modules/notifications/notification-manager.tsx index 20b974977..f9a16d20c 100644 --- a/src/designer/elsa-workflows-designer/src/modules/notifications/notification-manager.tsx +++ b/src/designer/elsa-workflows-designer/src/modules/notifications/notification-manager.tsx @@ -27,6 +27,11 @@ export class NotificationManager { this.eventBus.on(NotificationEventTypes.Toggle, this.handleToggle); } + deleteNotif = (id) => { + console.log(id); + notificationStore.notifications = [...notificationStore.notifications.filter(item => item.id !== id)] + } + handleAddNotification = (e: Notification) => { if (!this.isOpened) { this.notyfs.set(e.id, this.notyf.success({ message: e.message, type: 'regular', duration: 4000, className: 'p-3 rounded bg-white shadow-lg' })); @@ -54,87 +59,83 @@ export class NotificationManager { const { notifications } = notificationStore; console.log(notifications) return ( -
+
+
- {/*
{notif.message}
*/} -
-
+
+
+
+
+

Notifications

+
+ +
+
+
+ {notifications.length === 0 &&
There is no notifications yet
} + {notifications.map(notif => ( +
    +
  • +
    + +
    + + + + +
    +

    {notif.message}

    +
    +
    +
    +
    + -
    -
    -
    -
    -

    Notifications

    -
    - + +
    - {notifications.length === 0 &&
    There is no notifications yet
    } - {notifications.map(notif => ( -
    -
    -
  • - -
- ))} -
-
+ + ))}
+
+
); diff --git a/src/designer/elsa-workflows-designer/src/modules/notifications/notification.scss b/src/designer/elsa-workflows-designer/src/modules/notifications/notification.scss index 944a461af..c46d5ed78 100644 --- a/src/designer/elsa-workflows-designer/src/modules/notifications/notification.scss +++ b/src/designer/elsa-workflows-designer/src/modules/notifications/notification.scss @@ -43,3 +43,7 @@ min-width: 300px; z-index: 30; } + +.notific_ul { + width: 100%; +}