0
1
Fork 0

Refresh content after supplanted user logout

This commit is contained in:
William Buezas 2024-09-29 20:53:14 -03:00
parent 49244a411c
commit 5cab14f371
1 changed files with 3 additions and 1 deletions

View File

@ -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++;
};
</script>
@ -127,7 +129,7 @@ const logoutSupplantedUser = async () => {
</QExpansionItem>
</QList>
</QDrawer>
<QPageContainer>
<QPageContainer :key="refreshContentKey">
<router-view />
</QPageContainer>
</QLayout>