diff --git a/src/modules/07_insignia/components/2_Manage/InfoAssessments.vue b/src/modules/07_insignia/components/2_Manage/InfoAssessments.vue new file mode 100644 index 000000000..182db1b57 --- /dev/null +++ b/src/modules/07_insignia/components/2_Manage/InfoAssessments.vue @@ -0,0 +1,232 @@ + + + + + diff --git a/src/modules/07_insignia/components/2_Manage/InfoInsignia.vue b/src/modules/07_insignia/components/2_Manage/InfoInsignia.vue new file mode 100644 index 000000000..501794752 --- /dev/null +++ b/src/modules/07_insignia/components/2_Manage/InfoInsignia.vue @@ -0,0 +1,327 @@ + + + + + diff --git a/src/modules/07_insignia/components/2_Manage/Tab1.vue b/src/modules/07_insignia/components/2_Manage/Tab1.vue index 607702363..610af7281 100644 --- a/src/modules/07_insignia/components/2_Manage/Tab1.vue +++ b/src/modules/07_insignia/components/2_Manage/Tab1.vue @@ -28,6 +28,7 @@ import DialogInformation from "@/components/Dialogs/Information.vue"; import DialogHeader from "@/components/DialogHeader.vue"; import btnDownloadFile from "@/modules/07_insignia/components/2_Manage/downloadFile.vue"; import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue"; +import DialogInfo from "@/modules/13_salary/components/DialogInfoMain.vue"; /**use*/ const myForm = ref(); @@ -106,7 +107,11 @@ const visibleColumns = ref([ "insigniaLevel", "dateSend", "note", - "warn", + // "warn", + "discipline", + "leave", + "assessments", + "insignia", ]); const columns = ref([ { @@ -217,10 +222,48 @@ const columns = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", }, + // { + // name: "warn", + // align: "left", + // label: "แจ้งเตือน", + // sortable: false, + // field: "", + // headerStyle: "font-size: 14px", + // style: "font-size: 14px", + // }, + { - name: "warn", + name: "discipline", align: "left", - label: "แจ้งเตือน", + label: "โทษทางวินัย", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "leave", + align: "left", + label: "ไม่ได้เลื่อนเงินเดือน/ไม่ได้เลื่อนขั้น เนื่องจากลาเกิน", + sortable: false, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "assessments", + align: "left", + label: + "ผลการประเมินการปฏิบัติราชการในรอบ 5 ปี ต่ำกว่าระดับดี (น้อยกว่าร้อยละ 70)", + sortable: false, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "insignia", + align: "left", + label: "ข้อมูลเครื่องราชฯ", sortable: false, field: "", headerStyle: "font-size: 14px", @@ -675,11 +718,7 @@ function updatemodalPersonal(modal: boolean) { const filterKeyword = ref(""); const filterKeyword2 = ref(""); const filterRef = ref(null); -const resetFilter = () => { - filterKeyword.value = ""; - filterKeyword2.value = ""; - filterRef.value.focus(); -}; + const pagination = ref({ sortBy: "name", descending: false, @@ -804,6 +843,23 @@ function onSearch() { ); } +const infoType = ref(""); //ประเภทข้อมูล +const profileId = ref(""); //id คน +const modalDialogInfo = ref(false); // /popup ข้อมูลส่วนตัว +const employeeClass = ref(""); + +/** + * function ดูข้อมูลส่วนตัว + * @param type ประเภทข้อมูล + * @param id id ที่ต้องการดู + */ +function onClickViewInfo(type: string, id: string, empClass: string) { + infoType.value = type; + profileId.value = id; + modalDialogInfo.value = true; + employeeClass.value = empClass === "officer" ? "" : "-employee"; +} + /** Hook*/ onMounted(async () => { filterOrganizationOP.value = await DataStore.optionsTypeOc; @@ -1040,6 +1096,8 @@ onMounted(async () => { /> + + {{ col.label }} @@ -1230,6 +1288,81 @@ onMounted(async () => { แจ้งเตือน + + + + + + + + + + + + + + + + @@ -1543,4 +1676,11 @@ onMounted(async () => { :id="personId" @update:modal="updatemodalPersonal" /> + + diff --git a/src/modules/07_insignia/store.ts b/src/modules/07_insignia/store.ts index 049e9aa94..38a6dce73 100644 --- a/src/modules/07_insignia/store.ts +++ b/src/modules/07_insignia/store.ts @@ -94,6 +94,7 @@ export const useInsigniaDataStore = defineStore("insignia", () => { dateSend: e.requestDate ? date2Thai(e.requestDate) : null, requestNote: e.requestNote ? e.requestNote : "", employeeType: profileType(e.profileType) || null, + employeeClass: e.profileType, reason: e.reason ? e.reason : "", markDiscipline: e.markDiscipline, markLeave: e.markLeave, diff --git a/src/modules/13_salary/components/DialogInfoMain.vue b/src/modules/13_salary/components/DialogInfoMain.vue index 07ac60a02..4ff5b1af6 100644 --- a/src/modules/13_salary/components/DialogInfoMain.vue +++ b/src/modules/13_salary/components/DialogInfoMain.vue @@ -12,6 +12,8 @@ import { checkPermissionGet } from "@/utils/permissions"; import InfoSalary from "@/modules/13_salary/components/InfoSalary.vue"; import InfoDiscipline from "@/modules/13_salary/components/InfoDiscipline.vue"; import InfoLeave from "@/modules/13_salary/components/InfoLeave.vue"; +import InfoAssessments from "@/modules/07_insignia/components/2_Manage/InfoAssessments.vue"; +import InfoInsignia from "@/modules/07_insignia/components/2_Manage/InfoInsignia.vue"; /** * importStore @@ -42,11 +44,8 @@ const avatar = ref(""); const fullName = ref(""); const position = ref(""); -/** - * function เรียกข้อมูลส่วนตัว - */ +/** function เรียกข้อมูลส่วนตัว*/ function fetchInformation() { - showLoader(); http .get(config.API.orgProfileById(profileId.value, props.employeeClass)) .then(async (res) => { @@ -60,7 +59,6 @@ function fetchInformation() { }) .catch((err) => { messageError($q, err); - hideLoader(); }); } @@ -69,7 +67,7 @@ function fetchInformation() { * @param id profileId * @param avatarName ชื้อไฟล์ */ -function fetchProfile(id: string, avatarName: string) { +async function fetchProfile(id: string, avatarName: string) { http .get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, avatarName)) .then(async (res) => { @@ -155,41 +153,58 @@ watch( - -
- - -
- - {{ - type === "posSalary" - ? "ข้อมูลเงินเดือน/ค่าจ้าง" - : type === "discipline" - ? "ข้อมูลวินัย" - : "ข้อมูลการลา" - }} - -
-
+
+ + +
+ + {{ + type === "posSalary" + ? "ข้อมูลเงินเดือน/ค่าจ้าง" + : type === "discipline" + ? "ข้อมูลวินัย" + : type === "leave" + ? "ข้อมูลการลา" + : type === "assessments" + ? "ข้อมูลผลการประเมินการปฏิบัติราชการ" + : type === "insignia" + ? "ข้อมูลเครื่องราชฯ" + : "" + }} + +
+
- - - -
-
- + + + + + + + + +
+