stroes roleUser ,แก้ไขคำผิด
This commit is contained in:
parent
6985318f13
commit
7c60c42cb0
3 changed files with 53 additions and 6 deletions
|
|
@ -20,6 +20,7 @@ import {
|
|||
tabList,
|
||||
tabListPlacement,
|
||||
} from "../interface/request/main/main";
|
||||
import { useroleUserDataStore } from "@/stores/roleUser";
|
||||
|
||||
const { setVerticalScrollPosition, getVerticalScrollPosition } = scroll;
|
||||
const store = useDataStore();
|
||||
|
|
@ -35,6 +36,8 @@ const {
|
|||
messageError,
|
||||
date2Thai,
|
||||
} = mixin;
|
||||
const DataStore = useroleUserDataStore();
|
||||
const { fetchroleUser } = DataStore;
|
||||
|
||||
const $q = useQuasar();
|
||||
const { tabData, loader } = storeToRefs(store);
|
||||
|
|
@ -211,7 +214,8 @@ const activeBtn = () => {
|
|||
* ยังจับ boolean ผิด จึงต้อง set
|
||||
*/
|
||||
onMounted(async () => {
|
||||
await getDataNotification();
|
||||
await fetchroleUser(keycloak.tokenParsed.role);
|
||||
await getDataNotification();
|
||||
myEventHandler(null, false);
|
||||
window.addEventListener("resize", (e: any) => {
|
||||
myEventHandler(e, true);
|
||||
|
|
@ -266,9 +270,11 @@ const myEventHandler = (e: any, setSCroll: boolean) => {
|
|||
*/
|
||||
const activeMenu = (path: string) => {
|
||||
if (path == "dashboard" && route.fullPath == "/") return true;
|
||||
if (path == "registry" && route.fullPath == "/registry-employee") return false;
|
||||
if (path == "registry" && route.fullPath.includes(`/registry-employee/edit`)) return false;
|
||||
|
||||
if (path == "registry" && route.fullPath == "/registry-employee")
|
||||
return false;
|
||||
if (path == "registry" && route.fullPath.includes(`/registry-employee/edit`))
|
||||
return false;
|
||||
|
||||
if (path == "registry" && route.fullPath == "/") return false;
|
||||
// if (path != "registry" && path == "registryEmployee" && route.fullPath == "/registryEmployee") return true;
|
||||
const bool = route.fullPath.includes(`/${path}`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue