diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts index 1ab6d155c..1c1e7b4a3 100644 --- a/src/api/05_placement/api.placement.ts +++ b/src/api/05_placement/api.placement.ts @@ -60,8 +60,7 @@ export default { // clear Position clearPosition: (personalId: string) => `${placement}/position/clear/${personalId}`, - clearDate: (personalId: string) => - `${placement}/date/update/${personalId}`, + clearDate: (personalId: string) => `${placement}/date/update/${personalId}`, // Document documentByid: (personalId: string) => `${placement}/doc/${personalId}`, documentDelid: (personalId: string, docid: string) => @@ -69,7 +68,8 @@ export default { // order organizationsOrder: () => `${order}/order/organizations`, - approverOC: (id: string) => `${order}/order/approver/${id}`, + // approverOC: (id: string) => `${order}/order/approver/${id}`, + approverOC: (id: string) => `${order}/org/approver/${id}`, yearOptionsOrder: () => `${order}/order/fiscal-year`, listOrder: () => `${order}/order`, detailOrder: (orderId: string) => `${order}/order/detail/${orderId}`, @@ -175,7 +175,4 @@ export default { appointEmployeeOrder: (typeId: string) => `${placement}/appointment/temp/report/${typeId}`, apppointmentPositionUse: () => `${placement}/appointment/temp/use`, - - - }; diff --git a/src/interface/request/main/main.ts b/src/interface/request/main/main.ts index 8d89da985..b7d4bb013 100644 --- a/src/interface/request/main/main.ts +++ b/src/interface/request/main/main.ts @@ -602,87 +602,87 @@ const menuList = readonly([ }, ], }, - { - key: 13, - icon: "o_note", - label: "ระบบเดิม", - path: "registry", - role: "organization", - children: [ - { - key: 13.0, - icon: "o_person", - label: "ข้อมูลหลัก", - path: "metadata", - role: "metadata", - }, - { - key: 13.1, - icon: "o_groups", - label: "โครงสร้างอัตรากำลัง", - path: "organizational", - role: "organization", - children: [ - { - key: 3.1, - label: "จัดการตำแหน่ง", - path: "organizationalMapping", - }, - { - key: 3.2, - label: "แผนภูมิโครงสร้าง", - path: "organizationalStructChart", - }, - { - key: 3.3, - label: "แผนภูมิองค์กร", - path: "organizationalOrgChart", - }, - { - key: 3.4, - label: "ผังโครงสร้าง", - path: "organizationalTree", - }, - { - key: 3.5, - label: "ผังโครงสร้างลูกจ้าง", - path: "organizationalEmployee", - }, - { - key: 3.6, - label: "จัดการบัญชี 2", - path: "manageReport2", - }, - { - key: 3.7, - label: "รายงานบัญชี", - path: "organizationalReport", - }, - ], - }, - { - key: 13.0, - icon: "o_contact_page", - label: "ทะเบียนประวัติ", - path: "registry", - role: "registry", - }, - ], - }, - { - key: 4, - icon: "o_contact_page", - label: "ทะเบียนประวัติ", - path: "registry", - role: "registry", - }, - { - key: 4, - icon: "verified", - label: "รายการรอตรวจสอบ", - path: "verified", - role: "registryverify", - }, + // { + // key: 13, + // icon: "o_note", + // label: "ระบบเดิม", + // path: "registry", + // role: "organization", + // children: [ + // { + // key: 13.0, + // icon: "o_person", + // label: "ข้อมูลหลัก", + // path: "metadata", + // role: "metadata", + // }, + // { + // key: 13.1, + // icon: "o_groups", + // label: "โครงสร้างอัตรากำลัง", + // path: "organizational", + // role: "organization", + // children: [ + // { + // key: 3.1, + // label: "จัดการตำแหน่ง", + // path: "organizationalMapping", + // }, + // { + // key: 3.2, + // label: "แผนภูมิโครงสร้าง", + // path: "organizationalStructChart", + // }, + // { + // key: 3.3, + // label: "แผนภูมิองค์กร", + // path: "organizationalOrgChart", + // }, + // { + // key: 3.4, + // label: "ผังโครงสร้าง", + // path: "organizationalTree", + // }, + // { + // key: 3.5, + // label: "ผังโครงสร้างลูกจ้าง", + // path: "organizationalEmployee", + // }, + // { + // key: 3.6, + // label: "จัดการบัญชี 2", + // path: "manageReport2", + // }, + // { + // key: 3.7, + // label: "รายงานบัญชี", + // path: "organizationalReport", + // }, + // ], + // }, + // { + // key: 13.0, + // icon: "o_contact_page", + // label: "ทะเบียนประวัติ", + // path: "registry", + // role: "registry", + // }, + // ], + // }, + // { + // key: 4, + // icon: "o_contact_page", + // label: "ทะเบียนประวัติ", + // path: "registry", + // role: "registry", + // }, + // { + // key: 4, + // icon: "verified", + // label: "รายการรอตรวจสอบ", + // path: "verified", + // role: "registryverify", + // }, ]); const tabList = readonly([ diff --git a/src/modules/04_registryNew/components/TableView.vue b/src/modules/04_registryNew/components/TableView.vue index 2bf0609fe..54d1feae6 100644 --- a/src/modules/04_registryNew/components/TableView.vue +++ b/src/modules/04_registryNew/components/TableView.vue @@ -366,8 +366,42 @@ watch( - - + +
ตำแหน่งเลขที่
+
+ {{ props.row.posNo ? props.row.posNo : "-" }} +
+ +
+ {{ empType === "officer" ? `ตำแหน่งในสายงาน` : `ตำแหน่ง` }} +
+
+ {{ props.row.position ? props.row.position : "-" }} +
+ +
+ {{ empType === "officer" ? "ตำแหน่งประเภท" : "กลุ่มงาน" }} +
+
+ {{ props.row.posType ? props.row.posType : "-" }} +
+ +
+ {{ empType === "officer" ? "ระดับ" : "ระดับชั้นงาน" }} +
+
+ {{ + props.row.posLevel + ? props.row.posTypeShortName + ? `${props.row.posTypeShortName} ${props.row.posLevel}` + : props.row.posLevel + : "-" + }} +
+
+ + + - + - + - + +
diff --git a/src/modules/04_registryNew/store.ts b/src/modules/04_registryNew/store.ts index e4aea4edc..8acdab20f 100644 --- a/src/modules/04_registryNew/store.ts +++ b/src/modules/04_registryNew/store.ts @@ -23,7 +23,7 @@ export const useRegistryNewDataStore = defineStore("registryNew", () => { const posTypeMain = ref([]); const posLevelOps = ref([]); const yearOps = ref([]); - const mode = ref("card"); + const mode = ref("table"); function fetchType(data: DataType[]) { posTypeMain.value = data; diff --git a/src/modules/05_placement/components/PersonalList/DialogSelectOrg.vue b/src/modules/05_placement/components/PersonalList/DialogSelectOrg.vue index e4e2b2ddd..dbd946cc9 100644 --- a/src/modules/05_placement/components/PersonalList/DialogSelectOrg.vue +++ b/src/modules/05_placement/components/PersonalList/DialogSelectOrg.vue @@ -137,7 +137,7 @@ function updateSelected(data: TreeMain) { * @param level levelTree */ const isAll = ref(false); -const isBlank = ref(false); +const isBlank = ref(true); async function fetchDataTable(id: string, level: number = 0) { showLoader(); const body = { diff --git a/src/modules/05_placement/components/PersonalList/TableDetail.vue b/src/modules/05_placement/components/PersonalList/TableDetail.vue index 87cc70de2..a1fb38e57 100644 --- a/src/modules/05_placement/components/PersonalList/TableDetail.vue +++ b/src/modules/05_placement/components/PersonalList/TableDetail.vue @@ -137,12 +137,10 @@ watch(props, () => { -
- -
+ diff --git a/src/modules/05_placement/components/Transfer/transferRegistry.vue b/src/modules/05_placement/components/Transfer/transferRegistry.vue index cfbcc4e8f..6ad6cabb8 100644 --- a/src/modules/05_placement/components/Transfer/transferRegistry.vue +++ b/src/modules/05_placement/components/Transfer/transferRegistry.vue @@ -4,7 +4,7 @@ import { useQuasar } from "quasar"; import { useRoute, useRouter } from "vue-router"; import { useCounterMixin } from "@/stores/mixin"; -import CurrencyInput from "@/components/CurruncyInput.vue"; +// import CurrencyInput from "@/components/CurruncyInput.vue"; import http from "@/plugins/http"; import config from "@/app.config"; import keycloak from "@/plugins/keycloak"; diff --git a/src/modules/06_retirement/components/ListRetirement/AddList.vue b/src/modules/06_retirement/components/ListRetirement/AddList.vue index 74e66bd21..3eba31b4a 100644 --- a/src/modules/06_retirement/components/ListRetirement/AddList.vue +++ b/src/modules/06_retirement/components/ListRetirement/AddList.vue @@ -9,7 +9,14 @@ import { useRoute } from "vue-router"; /** Use */ const $q = useQuasar(); //ใช้ noti quasar const mixin = useCounterMixin(); -const { messageError, success, showLoader, hideLoader, dialogConfirm } = mixin; +const { + messageError, + success, + showLoader, + hideLoader, + dialogConfirm, + findOrgName, +} = mixin; const route = useRoute(); const retireld_params = route.params.id; @@ -82,7 +89,7 @@ watch(modal, () => { } }); -function findOrgName(obj: any) { +function findOrgChildName(obj: any) { if (obj) { let name = obj.orgChild4Name != null && obj.orgChild3Name != null @@ -112,7 +119,7 @@ function findOrgName(obj: any) { ? obj.orgChild1Name : ""; name += obj.orgRootName != null ? obj.orgRootName : ""; - return name == "" ? "" : name; + return name == "" ? "-" : name; } else { return ""; } @@ -120,36 +127,77 @@ function findOrgName(obj: any) { const formPagePersonList = reactive({ keyword: "", pageSize: 10, page: 1 }); const maxPage = ref(1); +const totalList = ref(0); // fecth profile const fecthProfile = async () => { - showLoader(); - await http - .post(config.API.orgProfileProbation, formPagePersonList) - .then((res) => { - maxPage.value = Math.ceil( - res.data.result.total / formPagePersonList.pageSize - ); - rows.value = res.data.result.data.map((e: any) => ({ - id: e.id, - prefix:e.prefix, - firstName:e.firstName, - lastName:e.lastName, - fullname: e.prefix + e.firstName + " " + e.lastName, - position: e.position, - level: - e.posTypeName && e.posLevelName - ? e.posTypeName + " (" + e.posLevelName + ")" - : "", - organizationOrganization: findOrgName(e), - })); - }) - .catch((err) => { - messageError($q, err); - }) - .finally(() => { - hideLoader(); - }); + if (props?.dataProfile?.type === "OFFICER") { + showLoader(); + formPagePersonList.keyword = + formPagePersonList.keyword === null ? "" : formPagePersonList.keyword; + await http + .post(config.API.orgProfileProbation, formPagePersonList) + .then((res) => { + maxPage.value = Math.ceil( + res.data.result.total / formPagePersonList.pageSize + ); + totalList.value = res.data.result.total; + rows.value = res.data.result.data.map((e: any) => ({ + id: e.id, + prefix: e.prefix, + firstName: e.firstName, + lastName: e.lastName, + fullname: e.prefix + e.firstName + " " + e.lastName, + position: e.position, + level: + e.posTypeName && e.posLevelName + ? e.posTypeName + " (" + e.posLevelName + ")" + : "-", + organizationOrganization: findOrgChildName(e), + })); + }) + .catch((err) => { + messageError($q, err); + }) + .finally(() => { + hideLoader(); + }); + } else { + let queryParams: any = { + page: formPagePersonList.page, + pageSize: formPagePersonList.pageSize, + searchKeyword: formPagePersonList.keyword, + searchField: "fullName", + type: "perm", + }; + http + .get(config.API.registryNew("-employee"), { params: queryParams }) + .then((res) => { + maxPage.value = Math.ceil( + res.data.result.total / formPagePersonList.pageSize + ); + totalList.value = res.data.result.total; + rows.value = res.data.result.data.map((e: any) => ({ + id: e.id, + prefix: e.prefix, + firstName: e.firstName, + lastName: e.lastName, + fullname: e.prefix + e.firstName + " " + e.lastName, + position: e.position, + level: + e.posTypeName && e.posLevelName + ? e.posTypeName + " (" + e.posLevelName + ")" + : "-", + organizationOrganization: findOrgName(e), + })); + }) + .catch((err) => { + messageError($q, err); + }) + .finally(() => { + hideLoader(); + }); + } }; // ยืนยันการเพิ่มราชชื่อ @@ -183,20 +231,17 @@ const updateListData = (retireld: string, pId: string) => { props.UpdateListId(retireld, pId); }; -/** - * Setiting Pagination - */ -const paging = ref(true); -const pagination = ref({ - sortBy: "fullname", - descending: true, - page: 1, - rowsPerPage: 10, -}); -const paginationLabel = (start: number, end: number, total: number) => { - if (paging.value == true) return " " + start + "-" + end + " ใน " + total; - else return start + "-" + end + " ใน " + total; -}; +function updatePageSize(newPagination: any) { + formPagePersonList.page = 1; + formPagePersonList.pageSize = newPagination.rowsPerPage; +} + +watch( + () => formPagePersonList.pageSize, + () => { + fecthProfile(); + } +);