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_Evaluate/store/Evaluate.ts b/src/modules/12_Evaluate/store/Evaluate.ts deleted file mode 100644 index a5dfe0efc..000000000 --- a/src/modules/12_Evaluate/store/Evaluate.ts +++ /dev/null @@ -1,149 +0,0 @@ -import { defineStore } from "pinia"; -import { ref } from "vue"; -import type { QTableProps } from "quasar"; -import type { DataOption } from "@/modules/12_Evaluate/interface/index/Main"; -import { useCounterMixin } from "@/stores/mixin"; - -const mixin = useCounterMixin(); -const { date2Thai } = mixin; -export const useEvalutuonStore = defineStore("EvalutuonStore", () => { - /** function สถานะ*/ - function convertStatus(val: string) { - switch (val) { - case "CHECK_SPEC": - return "ตรวจสอบคุณสมบัติด้วยตนเอง"; - case "PREPARE_DOC_V1": - return "จัดเตรียมเอกสารเล่ม"; - case "CHECK_DOC_V1": - return "ตรวจสอบความถูกต้องของเอกสารเล่ม"; - case "WAIT_CHECK_DOC_V1": - return "รอตรวจสอบคุณสมบัติ"; - case "ANNOUNCE_WEB": - return "ประกาศบนเว็บไซต์"; - case "PREPARE_DOC_V2": - return "จัดเตรียมเอกสารเล่ม"; - case "WAIT_CHECK_DOC_V2": - return "รอพิจารณาผลการประเมิน"; - case "CHECK_DOC_V2": - return "ตรวจสอบความถูกต้องของเอกสารเล่ม"; - case "DONE": - return "เสร็จสิ้น"; - } - } - - // ตรวจสอบคุณสมบัติด้วยตนเอง -> CHECK_SPEC - // จัดเตรียมเอกสารเล่ม 1-> PREPARE_DOC_V1 - // ตรวจสอบความถูกต้องของเอกสารเล่ม 1 -> CHECK_DOC_V1 - // รอตรวจสอบคุณสมบัติ -> WAIT_CHECK_DOC_V1 - // ประกาศบนเว็บไซต์ -> ANNOUNCE_WEB - // จัดเตรียมเอกสารเล่ม 2 -> PREPARE_DOC_V2 - // ตรวจสอบความถูกต้องของเอกสารเล่ม 2 -> CHECK_DOC_V2 - // รอพิจารณาผลการประเมิน -> WAIT_CHECK_DOC_V2 - // เสร็จสิ้น -> DONE - - const visibleColumns = ref([ - "citizanId", - "fullName", - "position", - "level", - "positionNumber", - "agency", - "status", - ]); - const rows = ref([]); - function fetchData(data: any[]) { - const dataList: any[] = data.map((data: any) => ({ - citizanId: data.citizanId, - fullName: data.fullName, - position: data.position, - level: data.level, - positionNumber: data.positionNumber, - agency: data.agency, - status: convertStatus(data.status), - })); - rows.value = dataList; - console.log(dataList); - } - - const columns = ref([ - { - name: "citizanId", - align: "center", - label: "เลขประจำตัวประชาชน", - sortable: false, - field: "citizanId", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "fullName", - align: "left", - label: "ชื่อ-นามสกุล", - sortable: true, - field: "fullName", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "position", - align: "left", - label: "ตำแหน่ง", - sortable: true, - field: "position", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, - { - name: "level", - align: "left", - label: "ระดับ", - sortable: true, - field: "level", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, - { - name: "positionNumber", - align: "left", - label: "ตำแหน่งเลขที่", - sortable: true, - field: "positionNumber", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, - { - name: "agency", - align: "left", - label: "สังกัด", - sortable: true, - field: "agency", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, - { - name: "status", - align: "left", - label: "สถานะ(ตรวจสอบคุณสมบัติ)", - sortable: true, - field: "status", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - ]); - - return { - visibleColumns, - columns, - rows, - convertStatus, - fetchData, - }; -});