diff --git a/src/api/02_organizational/api.organization.ts b/src/api/02_organizational/api.organization.ts index 5f4e89eb..ee359018 100644 --- a/src/api/02_organizational/api.organization.ts +++ b/src/api/02_organizational/api.organization.ts @@ -91,4 +91,8 @@ export default { orgDeceasedProfile: `${orgPos}/profile/search`, orgProfileListKeycloak: () => `${orgProfile}/search-personal-no-keycloak`, + + /** กำหนดสิทธิ์จัดการโครงสร้าง */ + permissionOrg: `${organization}/permission-org`, + permissionOrgProfile: `${organization}/permission-org/profile`, // คนที่มีสิทธิ์จัดการโครงสร้าง }; diff --git a/src/interface/request/main/main.ts b/src/interface/request/main/main.ts index 5b275984..8f7b8f8e 100644 --- a/src/interface/request/main/main.ts +++ b/src/interface/request/main/main.ts @@ -108,6 +108,11 @@ const menuList = readonly([ label: "กำหนดสิทธิ์ (Permissions)", path: "managePermission", }, + { + key: 2.0, + label: "กำหนดสิทธิ์จัดการโครงสร้าง", + path: "roleOrganization", + }, ], }, { diff --git a/src/modules/02_users/components/RoleOrganization/DialogAddPerson.vue b/src/modules/02_users/components/RoleOrganization/DialogAddPerson.vue new file mode 100644 index 00000000..6758d6ec --- /dev/null +++ b/src/modules/02_users/components/RoleOrganization/DialogAddPerson.vue @@ -0,0 +1,274 @@ + + + + + diff --git a/src/modules/02_users/interface/index/Main.ts b/src/modules/02_users/interface/index/Main.ts index fcb0b824..c58034f9 100644 --- a/src/modules/02_users/interface/index/Main.ts +++ b/src/modules/02_users/interface/index/Main.ts @@ -52,4 +52,51 @@ interface DataSystem { parentNode: string; } -export type { Pagination, ItemsMenu, DataOption, SystemList, DataSystem }; +interface DataTree { + ancestorDNA: string; + createdAt: string; + createdFullName: string; + createdUserId: "94ba986d-f871-46a2-be92-46c0cbf0bc56"; + id: string; + lastUpdateFullName: string; + lastUpdateUserId: string; + lastUpdatedAt: string; + orgRevisionId: string; + orgRootCode: string; + orgRootFax: string; + orgRootName: string; + orgRootOrder: number; + orgRootPhoneEx: string; + orgRootPhoneIn: string; + orgRootRank: string; + orgRootRankSub: string; + orgRootShortName: string; + responsibility: string; +} + +interface DataProfile { + avatar: string; + avatarName: string; + firstName: string; + id: string; + lastName: string; + org: string; + orgNew?: string; + orgRootId?: string; + posLevel: string; + posNo: string; + posType: string; + position: string; + prefix: string; + rank: string; +} + +export type { + Pagination, + ItemsMenu, + DataOption, + SystemList, + DataSystem, + DataTree, + DataProfile, +}; diff --git a/src/modules/02_users/interface/request/Main.ts b/src/modules/02_users/interface/request/Main.ts index fd5d53c1..d2130a48 100644 --- a/src/modules/02_users/interface/request/Main.ts +++ b/src/modules/02_users/interface/request/Main.ts @@ -27,4 +27,12 @@ interface FilterReqMaster { keyword: string; revisionId: string; } -export type { FormUser, FormRole, Roles, FilterReqMaster }; + +interface QueryProfile { + searchKeyword: string; + searchField: string; + page: number; + pageSize: number; + id: string | null; +} +export type { FormUser, FormRole, Roles, FilterReqMaster, QueryProfile }; diff --git a/src/modules/02_users/router.ts b/src/modules/02_users/router.ts index 384eefec..b92b7397 100644 --- a/src/modules/02_users/router.ts +++ b/src/modules/02_users/router.ts @@ -12,6 +12,10 @@ const ListsPage2Role = () => const PermissionPage = () => import("@/modules/02_users/views/permissionsView.vue"); +/** roleOrganization */ +const roleOrgview = () => + import("@/modules/02_users/views/roleOrganization.vue"); + export default [ { path: "/users", @@ -55,4 +59,13 @@ export default [ Role: ["SUPER_ADMIN", "ADMIN"], }, }, + + { + path: "/roles-organization", + name: "roleOrganization", + component: roleOrgview, + meta: { + Role: ["SUPER_ADMIN", "ADMIN"], + }, + }, ]; diff --git a/src/modules/02_users/stores/main.ts b/src/modules/02_users/stores/main.ts index b96ea3e0..a9d80f8a 100644 --- a/src/modules/02_users/stores/main.ts +++ b/src/modules/02_users/stores/main.ts @@ -1,5 +1,33 @@ import { defineStore } from "pinia"; +import { ref } from "vue"; -export const useDataStore = defineStore("storeData", () => { - return {}; +import type { DataOption } from "@/modules/02_users/interface/index/Main"; + +export const useDataStoreUser = defineStore("storeDataUser", () => { + const searchFieldOption = ref([ + { + name: "ชื่อ-นามสกุล", + id: "fullName", + }, + { + name: "เลขที่ตำแห่นง", + id: "posNo", + }, + + { + name: "ตำแหน่งในสายงาน", + id: "position", + }, + { + name: "ประเภทตำแหน่ง", + id: "postype", + }, + { + name: "ระดับตำแหน่ง", + id: "poslevel", + }, + ]); + return { + searchFieldOption, + }; }); diff --git a/src/modules/02_users/views/roleOrganization.vue b/src/modules/02_users/views/roleOrganization.vue new file mode 100644 index 00000000..a0035395 --- /dev/null +++ b/src/modules/02_users/views/roleOrganization.vue @@ -0,0 +1,418 @@ + + + + +