TSK-1460 Disable inbox popup (#3155)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2023-05-10 19:05:57 +06:00 committed by GitHub
parent 9a36559fe2
commit 30980a8556
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -505,6 +505,7 @@
$: checkInbox($popupstore)
let inboxPopup: PopupResult | undefined = undefined
let lastLoc: Location | undefined = undefined
</script>
{#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}
/>