diff --git a/src/api/02_organizational/api.organization.ts b/src/api/02_organizational/api.organization.ts index be7d27acd..f61dfbb26 100644 --- a/src/api/02_organizational/api.organization.ts +++ b/src/api/02_organizational/api.organization.ts @@ -136,8 +136,10 @@ export default { checkIsOfficer: (id: string) => `${organization}/check/child1/${id}`, + orgPosReport:`${orgPos}/report/draft`, /** * workflow */ workflow: `${workflow}/`, + workflowKeycloakSystem:(type:string)=> `${workflow}/keycloak/isofficer/${type}`, }; diff --git a/src/modules/02_organization/components/TreeMain.vue b/src/modules/02_organization/components/TreeMain.vue index cfb53cde5..53f77c804 100644 --- a/src/modules/02_organization/components/TreeMain.vue +++ b/src/modules/02_organization/components/TreeMain.vue @@ -102,6 +102,9 @@ const orgId = ref(""); */ function updateSelected(data: DataTree) { orgRootId.value = data?.orgLevel === 0 ? data?.orgTreeId : data?.orgRootId; + store.rootId = ( + data.orgLevel === 0 ? data.orgTreeId : data.orgRootId + ) as string; shortName.value = data.orgTreeShortName; if (!store.treeId || store.treeId != data.orgTreeId) { diff --git a/src/modules/02_organization/store/organizational.ts b/src/modules/02_organization/store/organizational.ts index 3b0ff5230..60fa50341 100644 --- a/src/modules/02_organization/store/organizational.ts +++ b/src/modules/02_organization/store/organizational.ts @@ -12,6 +12,10 @@ export const useOrganizational = defineStore("organizationalStore", () => { const typeOrganizational = ref("current"); // ประเภทโครงสร้าง const statusView = ref("list"); // การแสดงผล รายการ,map + const rootId = ref('') + const isOfficer = ref(null); + const isStaff = ref(null); + const dataActive = ref(); //ข้อมูลโครงสร้าง const activeId = ref(); // id โครงสร้างปัจจุบัน const draftId = ref(); // id แบบร่างโครงสร้าง @@ -160,5 +164,8 @@ export const useOrganizational = defineStore("organizationalStore", () => { fetchPosMaster, sumPosition, getSumPosition, + isOfficer, + isStaff, + rootId }; }); diff --git a/src/modules/02_organization/views/main.vue b/src/modules/02_organization/views/main.vue index a5eadf47f..46e6a5e7e 100644 --- a/src/modules/02_organization/views/main.vue +++ b/src/modules/02_organization/views/main.vue @@ -1,5 +1,5 @@ @@ -444,11 +432,10 @@ watch(modal, () => { option-value="id" class="inputgreen" dense + :readonly="isStaff" emit-value map-options - lazy-rules use-input - hide-bottom-space outlined @update:model-value="updateGroup" @filter="(inputValue:any,doneFn:Function) => filterOption(inputValue, doneFn) " @@ -493,7 +480,7 @@ watch(modal, () => { keep-color color="primary" dense - v-model="props.row.selected" + v-model="props.selected" /> @@ -518,6 +505,13 @@ watch(modal, () => { : "-" }} +
+ {{ + props.row.firstName + ? `${props.row.prefix}${props.row.firstName} ${props.row.lastName}` + : "-" + }} +
{{ col.value ? col.value : "-" }}
@@ -548,7 +542,7 @@ watch(modal, () => { label="ส่งไปออกคำสั่ง" :disable=" commandType == '' || - rows.filter((x) => x.selected).length === 0 || + selected.length === 0 || !commandNo || !commandYear "