From a089cb919811086eaa5341a96b01e3b5767307db Mon Sep 17 00:00:00 2001 From: Denis Bunakalya Date: Mon, 27 Feb 2023 11:59:03 +0300 Subject: [PATCH] Add checkIsHeaderHidden func to Application model (#2690) Signed-off-by: Denis Bunakalya --- .../src/components/Workbench.svelte | 12 +++++++++++- plugins/workbench/src/index.ts | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/plugins/workbench-resources/src/components/Workbench.svelte b/plugins/workbench-resources/src/components/Workbench.svelte index 2d98319840..6392a87e9a 100644 --- a/plugins/workbench-resources/src/components/Workbench.svelte +++ b/plugins/workbench-resources/src/components/Workbench.svelte @@ -386,6 +386,12 @@ : 'account' onMount(() => subscribeMobile(setTheme)) + + async function checkIsHeaderHidden () { + return ( + currentApplication?.checkIsHeaderHidden && (await (await getResource(currentApplication.checkIsHeaderHidden))()) + ) + } {#if employee?.active === true} @@ -487,7 +493,11 @@ {#if currentApplication} {#if currentApplication.navHeaderComponent} - + {#await checkIsHeaderHidden() then isHidden} + {#if !isHidden} + + {/if} + {/await} {/if} {/if} Promise> navFooterComponent?: AnyComponent }