diff --git a/src/modules/09_leave/components/1_Work/DialogDetail.vue b/src/modules/09_leave/components/1_Work/DialogDetail.vue index e018e379b..647682135 100644 --- a/src/modules/09_leave/components/1_Work/DialogDetail.vue +++ b/src/modules/09_leave/components/1_Work/DialogDetail.vue @@ -4,6 +4,7 @@ import http from "@/plugins/http"; import config from "@/app.config"; import { useQuasar } from "quasar"; +/** import Type*/ import type { FormDetail } from "@/modules/09_leave/interface/response/work"; /** importStores */ diff --git a/src/modules/09_leave/components/1_Work/TableList.vue b/src/modules/09_leave/components/1_Work/TableList.vue index b23e09053..27b8930b1 100644 --- a/src/modules/09_leave/components/1_Work/TableList.vue +++ b/src/modules/09_leave/components/1_Work/TableList.vue @@ -85,6 +85,10 @@ watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => { updateProp(pagination.value, currentPage.value); }); +/** + * function updatePageSize + * @param newPagination PageSize + */ function updateRowsPerPagen(newPagination: any) { pagination.value.rowsPerPage = newPagination.rowsPerPage; currentPage.value = 1; @@ -122,8 +126,6 @@ function updateRowsPerPagen(newPagination: any) { @click.prevent="clickDetail(props.row)" >
- - {{ (currentPage - 1) * Number(pagination.rowsPerPage) + props.rowIndex + diff --git a/src/modules/09_leave/components/1_Work/ToolBar.vue b/src/modules/09_leave/components/1_Work/ToolBar.vue index 23412af3a..16c881267 100644 --- a/src/modules/09_leave/components/1_Work/ToolBar.vue +++ b/src/modules/09_leave/components/1_Work/ToolBar.vue @@ -7,6 +7,7 @@ import type { DataOption } from "@/modules/09_leave/interface/index/Main"; /** importStores */ import { useCounterMixin } from "@/stores/mixin"; import { useWorklistDataStore } from "@/modules/09_leave/stores/WorkStore"; + /** useStore */ const workStore = useWorklistDataStore(); const mixin = useCounterMixin(); diff --git a/src/modules/09_leave/components/1_Work/ToolBarDate.vue b/src/modules/09_leave/components/1_Work/ToolBarDate.vue index 67b62fc02..aa44960ac 100644 --- a/src/modules/09_leave/components/1_Work/ToolBarDate.vue +++ b/src/modules/09_leave/components/1_Work/ToolBarDate.vue @@ -4,6 +4,7 @@ import { ref } from "vue"; /** importStores */ import { useCounterMixin } from "@/stores/mixin"; import { useWorklistDataStore } from "@/modules/09_leave/stores/WorkStore"; + /** useStore */ const workStore = useWorklistDataStore(); const mixin = useCounterMixin(); diff --git a/src/modules/09_leave/components/3_Report/DetailReport.vue b/src/modules/09_leave/components/3_Report/DetailReport.vue index 7086336b6..e50c97593 100644 --- a/src/modules/09_leave/components/3_Report/DetailReport.vue +++ b/src/modules/09_leave/components/3_Report/DetailReport.vue @@ -11,8 +11,7 @@ import { useCounterMixin } from "@/stores/mixin"; const route = useRoute(); const mixin = useCounterMixin(); -const { messageError, showLoader, hideLoader, date2Thai, monthYear2Thai } = - mixin; +const { date2Thai, monthYear2Thai } = mixin; const typeReport = route.params.type.toString(); const titleReport = computed(() => { @@ -59,6 +58,12 @@ const employeeClassOption = ref(employeeClassMain.value); const yearTypeOptionOption = ref(yearTypeOptionMain.value); const filterTypeOption = ref(filterTypeMain.value); +/** + * function ค้นหาข้อมูล Option + * @param val คำค้นหา + * @param update function + * @param type ประเภท option + */ function filterFnOptions(val: any, update: Function, type: string) { switch (type) { case "filterType": diff --git a/src/modules/09_leave/components/3_WorkTime/DialogForm.vue b/src/modules/09_leave/components/3_WorkTime/DialogForm.vue index 3dbb7eaca..967471626 100644 --- a/src/modules/09_leave/components/3_WorkTime/DialogForm.vue +++ b/src/modules/09_leave/components/3_WorkTime/DialogForm.vue @@ -2,6 +2,7 @@ import { ref, reactive, watch } from "vue"; import http from "@/plugins/http"; import config from "@/app.config"; +import { useQuasar } from "quasar"; /** ImportType */ import type { @@ -11,10 +12,12 @@ import type { /** ImportComponents */ import DialogHeader from "@/components/DialogHeader.vue"; + +/** importstore*/ import { useCounterMixin } from "@/stores/mixin"; -import { useQuasar } from "quasar"; const $q = useQuasar(); + const mixin = useCounterMixin(); const { dialogConfirm, success, messageError } = mixin; @@ -142,7 +145,7 @@ function close() { /***/ watch( () => props.modal, - (newDetailData, oldDetailData) => { + () => { if (props.editCheck === "add") { formData.startTimeMorning = ""; formData.endTimeMorning = ""; diff --git a/src/modules/09_leave/components/4_ChangeRound/DialogForm.vue b/src/modules/09_leave/components/4_ChangeRound/DialogForm.vue index 5812ae463..1eff7447b 100644 --- a/src/modules/09_leave/components/4_ChangeRound/DialogForm.vue +++ b/src/modules/09_leave/components/4_ChangeRound/DialogForm.vue @@ -3,7 +3,6 @@ import { ref, reactive, watch, onMounted } from "vue"; import { date, useQuasar } from "quasar"; import http from "@/plugins/http"; import config from "@/app.config"; -import { useRoute } from "vue-router"; /** importType */ import type { @@ -15,6 +14,7 @@ import type { /** importStore */ import { useCounterMixin } from "@/stores/mixin"; import { useChangeRoundDataStore } from "@/modules/09_leave/stores/ChangeRoundStore"; + /** useStore */ const dataStore = useChangeRoundDataStore(); const mixin = useCounterMixin(); @@ -27,9 +27,7 @@ const { success, } = mixin; -const route = useRoute(); const $q = useQuasar(); -const roundOp = ref([]); /**Hook */ onMounted(async () => { @@ -78,7 +76,7 @@ const dataToday = ref(new Date()); function onSubmit() { dialogConfirm( $q, - async () => { + () => { changeRound(); props.closeDialog?.(); }, @@ -107,6 +105,7 @@ async function changeRound() { }); } +const roundOp = ref([]); /** *ประวัติการเปลี่ยนรอบการปฏิบัติงาน" * @@ -138,9 +137,8 @@ async function fetchDataOption() { } // paging -const page = ref(1); const pageSize = ref(10); -const filter = ref(""); //search data table + /** * ฟังก์ชั่น api เปลี่ยนหน้า * @param pageVal page @@ -169,7 +167,6 @@ watch( } ); const emit = defineEmits(["update:change-page"]); -// Pagination - update rowsPerPage async function updatePagination(newPagination: any) { initialPagination.value = newPagination; currentPage.value = 1; // set current page เป็น 1 เสมอเมื่อเปลี่ยน per row @@ -192,7 +189,7 @@ function close() { } watch( () => props.modal, - async (newDetailData, oldDetailData) => { + async () => { if (props.editCheck === "edit") { formData.round = ""; formData.reson = ""; diff --git a/src/modules/09_leave/components/4_specialTime/DialogApprove.vue b/src/modules/09_leave/components/4_specialTime/DialogApprove.vue index 8652e6645..2fcd3a31c 100644 --- a/src/modules/09_leave/components/4_specialTime/DialogApprove.vue +++ b/src/modules/09_leave/components/4_specialTime/DialogApprove.vue @@ -1,28 +1,38 @@ - diff --git a/src/modules/12_evaluatePersonal/components/Detail/viewstep/viewStep1.vue b/src/modules/12_evaluatePersonal/components/Detail/viewstep/viewStep1.vue index 7bb1f2bf1..d102f1809 100644 --- a/src/modules/12_evaluatePersonal/components/Detail/viewstep/viewStep1.vue +++ b/src/modules/12_evaluatePersonal/components/Detail/viewstep/viewStep1.vue @@ -1,304 +1,292 @@ -@/modules/12_evaluatePersonal/store/evaluate \ No newline at end of file +@/modules/12_evaluatePersonal/store/evaluate diff --git a/src/modules/12_evaluatePersonal/interface/index/evalute.ts b/src/modules/12_evaluatePersonal/interface/index/evalute.ts new file mode 100644 index 000000000..60f9e8e24 --- /dev/null +++ b/src/modules/12_evaluatePersonal/interface/index/evalute.ts @@ -0,0 +1,17 @@ +interface FormCommand { + elementaryFullName: string; + elementaryPosition: string; + abovelevelFullname: string; + abovelevelPosition: string; +} + +interface FormCommandRef { + elementaryFullName: object | null; + elementaryPosition: object | null; + abovelevelFullname: object | null; + abovelevelPosition: object | null; + + [key: string]: any; +} + +export type { FormCommand, FormCommandRef }; diff --git a/src/modules/12_evaluatePersonal/store/Evaluate.ts b/src/modules/12_evaluatePersonal/store/Evaluate.ts index 1560fa238..9241e78e0 100644 --- a/src/modules/12_evaluatePersonal/store/Evaluate.ts +++ b/src/modules/12_evaluatePersonal/store/Evaluate.ts @@ -28,7 +28,6 @@ export const useEvalutuonStore = defineStore("EvalutuonStore", () => { return "ตรวจสอบความถูกต้องของเอกสารเล่ม"; case "DONE": return "เสร็จสิ้น"; - } } @@ -150,287 +149,11 @@ export const useEvalutuonStore = defineStore("EvalutuonStore", () => { }, ]); - const columnsLicense = ref([ - { - name: "", - align: "center", - label: "ชื่อใบอนุณาต", - sortable: false, - field: "", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "", - align: "left", - label: "หน่วยงานผู้ออกใบอนุญาต", - sortable: true, - field: "", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "", - align: "left", - label: "เลขที่ใบอนุญาต", - sortable: true, - field: "", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "", - align: "left", - label: "วันที่ออกใบอนุญาต", - sortable: true, - field: "", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, - { - name: "", - align: "left", - label: "วันที่หมดอายุ", - sortable: true, - field: "", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, - ]); - - const columnPeriodhistory = ref([ - { - name: "", - align: "center", - label: "วัน เดือน ปี", - sortable: false, - field: "", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, - { - name: "", - align: "left", - label: "สังกัด", - sortable: true, - field: "", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "", - align: "left", - label: "ตำแหน่ง", - sortable: true, - field: "", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "", - align: "left", - label: "ตำแหน่งเลขที่", - sortable: true, - field: "", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, - { - name: "", - align: "left", - label: "สายงาน", - sortable: true, - field: "", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "", - align: "left", - label: "ด้าน/สาขา", - sortable: true, - field: "", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "", - align: "left", - label: "ตำแหน่งประเภท", - sortable: true, - field: "", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "", - align: "left", - label: "ระดับ", - sortable: true, - field: "", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "", - align: "left", - label: "ตำแหน่งทางการบริหาร", - sortable: true, - field: "", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "", - align: "left", - label: "ด้านทางการบริหาร", - sortable: true, - field: "", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - ]); - - const columnTrainingHistory = ref([ - { - name: "", - align: "center", - label: "ชื่อโครงการ/หลักสูตรการฝึกอบรม", - sortable: false, - field: "", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "", - align: "left", - label: "หัวข้อการฝึกอบรม/ดูงาน", - sortable: true, - field: "", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "", - align: "left", - label: "วันเริ่มต้นการฝึกอบรม/ดูงาน", - sortable: true, - field: "", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, - { - name: "", - align: "left", - label: "วันสิ้นสุดการฝึกอบรม/ดูงาน", - sortable: true, - field: "", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, - { - name: "", - align: "left", - label: "ปีที่อบรม/ดูงาน", - sortable: true, - field: "", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "", - align: "left", - label: "รวมระยะเวลาในการฝึกอบรม/ดูงาน", - sortable: true, - field: "", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "", - align: "left", - label: "หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน", - sortable: true, - field: "", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - ]); - - const columnProjectsProposed = ref([ - { - name: "", - align: "center", - label: "วันที่ได้รับ", - sortable: false, - field: "", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, - { - name: "", - align: "left", - label: "ผู้มีอำนาจลงนาม", - sortable: true, - field: "", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "", - align: "left", - label: "รายละเอียด", - sortable: true, - field: "", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - - }, - { - name: "", - align: "left", - label: "เลขที่คำสั่ง", - sortable: true, - field: "", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, - { - name: "", - align: "left", - label: "เอกสารอ้างอิง", - sortable: true, - field: "", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - ]); - return { visibleColumns, columns, rows, convertStatus, fetchData, - columnsLicense, - columnPeriodhistory, - columnTrainingHistory, - columnProjectsProposed, }; }); diff --git a/src/modules/12_evaluatePersonal/store/EvaluateDetail.ts b/src/modules/12_evaluatePersonal/store/EvaluateDetail.ts index 0940a9c5e..44796b05e 100644 --- a/src/modules/12_evaluatePersonal/store/EvaluateDetail.ts +++ b/src/modules/12_evaluatePersonal/store/EvaluateDetail.ts @@ -1,14 +1,15 @@ - import { defineStore } from "pinia"; import { ref } from "vue"; +import type { QTableProps } from "quasar"; + export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => { const tabMenu = ref("1"); const step = ref(1); const titel = ref([ "ตรวจสอบคุณสมบัติ", - "จัดเตรียมเอกสาร", - "ตรวจสอบเอกสาร", + "จัดเตรียมเอกสารเล่ม 1", + "ตรวจสอบเอกสารเล่ม 1", "รอตรวจสอบคุณสมบัติ", "ประกาศบนเว็บไซต์", "จัดเตรียมเอกสารเล่ม 2", @@ -19,10 +20,286 @@ export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => { const tabPanels = ref("1"); + const columnsLicense = ref([ + { + name: "", + align: "center", + label: "ชื่อใบอนุณาต", + sortable: false, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "หน่วยงานผู้ออกใบอนุญาต", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "เลขที่ใบอนุญาต", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "วันที่ออกใบอนุญาต", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { + name: "", + align: "left", + label: "วันที่หมดอายุ", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + ]); + + const columnPeriodhistory = ref([ + { + name: "", + align: "center", + label: "วัน เดือน ปี", + sortable: false, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { + name: "", + align: "left", + label: "สังกัด", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "ตำแหน่ง", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "ตำแหน่งเลขที่", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { + name: "", + align: "left", + label: "สายงาน", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "ด้าน/สาขา", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "ตำแหน่งประเภท", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "ระดับ", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "ตำแหน่งทางการบริหาร", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "ด้านทางการบริหาร", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + ]); + + const columnTrainingHistory = ref([ + { + name: "", + align: "center", + label: "ชื่อโครงการ/หลักสูตรการฝึกอบรม", + sortable: false, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "หัวข้อการฝึกอบรม/ดูงาน", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "วันเริ่มต้นการฝึกอบรม/ดูงาน", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { + name: "", + align: "left", + label: "วันสิ้นสุดการฝึกอบรม/ดูงาน", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { + name: "", + align: "left", + label: "ปีที่อบรม/ดูงาน", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "รวมระยะเวลาในการฝึกอบรม/ดูงาน", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "หน่วยงานที่รับผิดชอบจัดการฝึกอบรม/ดูงาน", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + ]); + + const columnProjectsProposed = ref([ + { + name: "", + align: "center", + label: "วันที่ได้รับ", + sortable: false, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { + name: "", + align: "left", + label: "ผู้มีอำนาจลงนาม", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "รายละเอียด", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "", + align: "left", + label: "เลขที่คำสั่ง", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { + name: "", + align: "left", + label: "เอกสารอ้างอิง", + sortable: true, + field: "", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + ]); + return { tabMenu, step, titel, tabPanels, + /** step1*/ + columnsLicense, + columnPeriodhistory, + columnTrainingHistory, + columnProjectsProposed, }; -}); \ No newline at end of file +});