This commit is contained in:
Viet An
2026-04-07 10:08:00 +07:00
parent f8bdfc98fc
commit 7402e61906
9 changed files with 673 additions and 436 deletions

View File

@@ -166,20 +166,20 @@ const menu = [
if ($store.rights.length > 0) {
menu = menu.filter((v) => $findIndex($store.rights, { setting: v.id }) >= 0);
}
if (menu.length === 0) {
$snackbar(
$store.lang === 'vi'
? 'Bạn không có quyền truy cập'
: 'You do not have permission to access.',
);
}
menu.map((v) => {
let arr = $filter($store.common, { category: 'submenu', classify: v.code });
if ($store.rights.length > 0) {
arr = arr.filter((x) => $findIndex($store.rights, { setting: x.id }) >= 0);
}
v.submenu = arr.length > 0 ? arr : null;
});
// if (menu.length === 0) {
// $snackbar(
// $store.lang === 'vi'
// ? 'Bạn không có quyền truy cập'
// : 'You do not have permission to access.',
// );
// }
// menu.map((v) => {
// let arr = $filter($store.common, { category: 'submenu', classify: v.code });
// if ($store.rights.length > 0) {
// arr = arr.filter((x) => $findIndex($store.rights, { setting: x.id }) >= 0);
// }
// v.submenu = arr.length > 0 ? arr : null;
// });
const leftmenu = $filter(menu, { category: 'topmenu', classify: 'left' });
let currentTab = ref(leftmenu.length > 0 ? leftmenu[0] : undefined);
const subTab = ref();