From 5cab14f37160642deea9c4027c65031491733f15 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Sun, 29 Sep 2024 20:53:14 -0300 Subject: [PATCH] Refresh content after supplanted user logout --- src/layouts/MainLayout.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index e35f5d82..94daa6f8 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -12,6 +12,7 @@ const userStore = useUserStore(); const appStore = useAppStore(); const hiddenMenuItems = new Set(['Reports']); +const refreshContentKey = ref(0); const { user, supplantedUser } = storeToRefs(userStore); const { menuEssentialLinks, title, subtitle, useRightDrawer, rightDrawerOpen } = storeToRefs(appStore); @@ -40,6 +41,7 @@ const logout = async () => { const logoutSupplantedUser = async () => { await userStore.logoutSupplantedUser(); await appStore.getMenuLinks(); + refreshContentKey.value++; }; @@ -127,7 +129,7 @@ const logoutSupplantedUser = async () => { - +