From 30980a8556da4a15c7165316044bc08287ca6fff Mon Sep 17 00:00:00 2001 From: Denis Bykhov Date: Wed, 10 May 2023 19:05:57 +0600 Subject: [PATCH] TSK-1460 Disable inbox popup (#3155) Signed-off-by: Denis Bykhov --- .../src/components/Workbench.svelte | 37 +++++++++++-------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/plugins/workbench-resources/src/components/Workbench.svelte b/plugins/workbench-resources/src/components/Workbench.svelte index d7dca9bfed..9410272984 100644 --- a/plugins/workbench-resources/src/components/Workbench.svelte +++ b/plugins/workbench-resources/src/components/Workbench.svelte @@ -505,6 +505,7 @@ $: checkInbox($popupstore) let inboxPopup: PopupResult | undefined = undefined + let lastLoc: Location | undefined = undefined {#if employee?.active === true} @@ -558,23 +559,29 @@ selected={currentAppAlias === notificationId || inboxPopup !== undefined} on:click={(e) => { if (e.metaKey || e.ctrlKey) return - if (inboxPopup) { - inboxPopup.close() + // if (inboxPopup) { + // inboxPopup.close() + // } else { + // inboxPopup = showPopup( + // notification.component.Inbox, + // { visibileNav: true }, + // 'content', + // undefined, + // undefined, + // { + // category: 'popup', + // overlay: false + // } + // ) + // } + if (currentAppAlias === notificationId && lastLoc !== undefined) { + e.preventDefault() + e.stopPropagation() + navigate(lastLoc) + lastLoc = undefined } else { - inboxPopup = showPopup( - notification.component.Inbox, - { visibileNav: true }, - 'content', - undefined, - undefined, - { - category: 'popup', - overlay: false - } - ) + lastLoc = $location } - e.preventDefault() - e.stopPropagation() }} notify={hasNotification} />