diff --git a/src/components/header/header.ts b/src/components/header/header.ts index 863f02d..7c3fca3 100755 --- a/src/components/header/header.ts +++ b/src/components/header/header.ts @@ -1,3 +1,4 @@ +import ModalService from '~/services/modal.service'; import { INotification } from '../../models/notification.model'; import { currentRoute, navigate } from '../../router'; import Services from '../../services/service'; @@ -81,12 +82,17 @@ async function setNotification(notifications: any[]): Promise { for (const notif of notifications) { const notifElement = document.createElement('div'); notifElement.className = 'notification-element'; - notifElement.setAttribute('notif-id', notif.states[0]?.commited_in.toString()); + notifElement.setAttribute('notif-id', notif.processId); notifElement.innerHTML = ` -
${notif.states[0]?.commited_in}
+
Validation required :
+
${notif.processId}
`; // this.addSubscription(notifElement, 'click', 'goToProcessPage') notificationBoard.appendChild(notifElement); + notifElement.addEventListener('click', async () => { + const modalService = await ModalService.getInstance() + modalService.injectValidationModal(notif) + }) } } else { noNotifications.style.display = 'block'; diff --git a/src/components/validation-modal/validation-modal.html b/src/components/validation-modal/validation-modal.html index 24af5c6..409c189 100755 --- a/src/components/validation-modal/validation-modal.html +++ b/src/components/validation-modal/validation-modal.html @@ -1,7 +1,4 @@ -