อัตรากำลังลูกจ้างประจำ ฯ => refactor code
This commit is contained in:
parent
7e2350eef8
commit
81e0a82b0e
18 changed files with 377 additions and 188 deletions
|
|
@ -2,11 +2,16 @@ import { defineStore } from "pinia";
|
|||
import { ref } from "vue";
|
||||
|
||||
/**
|
||||
* importType
|
||||
*/
|
||||
import type { ListMenu, ChildLevelTree } from "@/interface/response/main";
|
||||
* importType
|
||||
*/
|
||||
import type {
|
||||
ListMenu,
|
||||
ChildLevelTree,
|
||||
DataPermissions,
|
||||
} from "@/interface/response/main";
|
||||
|
||||
export const useMenuDataStore = defineStore("menuUse", () => {
|
||||
/****************** เมนู **************************/
|
||||
/** รายการเมนู*/
|
||||
const menuList = ref<ListMenu[]>([
|
||||
{
|
||||
|
|
@ -113,8 +118,23 @@ export const useMenuDataStore = defineStore("menuUse", () => {
|
|||
menuList.value.push(...data);
|
||||
}
|
||||
|
||||
/****************** สิทธิ์ **************************/
|
||||
const dataPermissions = ref<DataPermissions>();
|
||||
|
||||
/**
|
||||
* function เรียก
|
||||
* @param data ข้อมูลสิทธิ์
|
||||
*/
|
||||
function fetchDataPermission(data: DataPermissions) {
|
||||
dataPermissions.value = data;
|
||||
}
|
||||
|
||||
return {
|
||||
/****************** เมนู **************************/
|
||||
fetchListMenu,
|
||||
menuList,
|
||||
/****************** สิทธิ์ **************************/
|
||||
fetchDataPermission,
|
||||
dataPermissions,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue