forked from verdnatura/hedera-web
Refresh content after supplanted user logout
This commit is contained in:
parent
49244a411c
commit
5cab14f371
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue