This commit is contained in:
Viet An
2026-06-11 11:50:11 +07:00
parent a5a88b3b1c
commit 069ea1002c
20 changed files with 112 additions and 474 deletions

View File

@@ -128,6 +128,7 @@ const emit = defineEmits(["changeTab"]);
const { $find, $filter, $store, $snackbar } = useNuxtApp();
const lang = computed(() => $store.lang);
const menu = $filter($store.common, { category: "topmenu" });
const submenus = $filter($store.common, { category: "submenu" });
// if($store.rights.length>0) {
// menu = menu.filter(v=>$findIndex($store.rights, {setting: v.id})>=0)
// }
@@ -185,8 +186,9 @@ function openProfile() {
title: $store.lang === "vi" ? "Thông tin cá nhân" : "User profile",
});
}
const found = route.query.tab && $find(menu, { code: route.query.tab });
if (found || currentTab.value) changeTab(found || currentTab.value);
const foundTab = route.query.tab && $find(menu, { code: route.query.tab });
const foundSub = route.query.subtab && $find(submenus, { code: route.query.subtab });
if (foundTab || currentTab.value) changeTab(foundTab || currentTab.value, foundSub);
onMounted(() => {
if (!$store.login) return;