diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index 12f774d8..ef2f762e 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -13,8 +13,13 @@ const appStore = useAppStore(); const refreshContentKey = ref(0); const { mainUser, supplantedUser } = storeToRefs(userStore); -const { title, subtitle, useRightDrawer, rightDrawerOpen, filteredMenuItems } = - storeToRefs(appStore); +const { + menuTitle, + subtitle, + useRightDrawer, + rightDrawerOpen, + filteredMenuItems +} = storeToRefs(appStore); const actions = ref(null); const leftDrawerOpen = ref(false); @@ -53,7 +58,7 @@ const logoutSupplantedUser = async () => { @click="toggleLeftDrawer" /> - {{ title }} + {{ menuTitle }}
{{ subtitle }}
diff --git a/src/pages/Account/AccountConfig.vue b/src/pages/Account/AccountConfig.vue index 631073ab..813dc5c7 100644 --- a/src/pages/Account/AccountConfig.vue +++ b/src/pages/Account/AccountConfig.vue @@ -57,6 +57,15 @@ const formatMailData = data => { data.isToBeMailed = Boolean(data.isToBeMailed); }; +const updateConfigLang = async lang => { + try { + await vnFormRef.value.submit(); + userStore.updateUserLang(lang); + } catch (error) { + console.error(error); + } +}; + onMounted(() => fetchLanguagesSql()); @@ -113,9 +122,7 @@ onMounted(() => fetchLanguagesSql()); option-label="name" option-value="code" :options="langOptions" - @update:model-value=" - userStore.updateUserLang(data.lang) - " + @update:model-value="updateConfigLang(data.lang)" />