diff --git a/src/modules/05_placement/components/PersonalList/DialogOrders.vue b/src/modules/05_placement/components/PersonalList/DialogOrders.vue index 7f865df56..475533f66 100644 --- a/src/modules/05_placement/components/PersonalList/DialogOrders.vue +++ b/src/modules/05_placement/components/PersonalList/DialogOrders.vue @@ -8,8 +8,6 @@ import { useRoute } from "vue-router"; import { useCounterMixin } from "@/stores/mixin"; import { useCommandMainStore } from "@/modules/18_command/store/Main"; import { usePlacementDataStore } from "@/modules/05_placement/store"; -// import http from "@/plugins/http"; -// import config from "@/app.config"; import type { QTableProps } from "quasar"; import type { ResponseData } from "@/modules/05_placement/interface/response/Transfer"; @@ -24,20 +22,10 @@ const mixin = useCounterMixin(); const route = useRoute(); const DataStore = usePlacementDataStore(); const storeCommand = useCommandMainStore(); -const { - showLoader, - success, - messageError, - dialogConfirm, - hideLoader, - date2Thai, - dateText, -} = mixin; +const { dialogConfirm, dateText } = mixin; const modal = defineModel("modal", { required: true }); -/** - * props - */ +/** props */ const props = defineProps({ fetchData: Function, rows: Array, @@ -170,9 +158,7 @@ function filterSelector(val: string, update: Function) { }); } -/** - * ฟังก์ชันยืนยันการออกคำสั่ง - */ +/** ฟังก์ชั่นยืนยันและส่งคนไปสร้างคำสั่ง */ function saveOrder() { dialogConfirm( $q, @@ -185,6 +171,7 @@ function saveOrder() { ); } +/** ฟังก์ชั่นสำหรับ filter รายการข้อมูลคนตามประเภทคำสั่งที่เลือก */ function filterSelectOrder() { const data = props.rows ? props.rows : []; selected.value = []; @@ -209,14 +196,14 @@ function filterSelectOrder() { }); } +/** ปิด Modal และล้างค่าที่เลือก */ function closeModal() { modal.value = false; commandType.value = ""; } /** * เมื่อ props.modal เป็น true - * - * กำหนดให้ selected เป็นค่าว่าง + * กำหนดให้ selected เป็นค่าว่างและกำหนด filter ประเภทตำแหน่งตามประเภทการสอบ */ watch( () => modal.value, @@ -247,6 +234,7 @@ watch( } ); + - - diff --git a/src/modules/05_placement/components/Transfer/DialogOrders.vue b/src/modules/05_placement/components/Transfer/DialogOrders.vue index 2b3a58ecc..3e43430ee 100644 --- a/src/modules/05_placement/components/Transfer/DialogOrders.vue +++ b/src/modules/05_placement/components/Transfer/DialogOrders.vue @@ -16,16 +16,8 @@ import DialogCreateCommand from "@/modules/18_command/components/DialogCreateCom const $q = useQuasar(); const mixin = useCounterMixin(); -const stroeCommand = useCommandMainStore(); const { statusText } = useTransferDataStore(); -const { - showLoader, - success, - messageError, - dialogConfirm, - hideLoader, - date2Thai, -} = mixin; +const { dialogConfirm, date2Thai } = mixin; const modal = defineModel("modal", { required: true }); /** @@ -127,7 +119,7 @@ const columns2 = ref([ ]); /** - * ฟังก์ชันยืนยันการออกคำสั่ง + * ฟังก์ชั่นยืนยันและส่งคนไปสร้างคำสั่ง */ function saveOrder() { dialogConfirm( @@ -140,20 +132,6 @@ function saveOrder() { modalCommand.value = true; modal.value = false; - // showLoader(); - // await http - // .post(config.API.transferReport, body) - // .then(async () => { - // await props.fetchData?.(); - // await success($q, "ส่งไปออกคำสั่งสำเร็จ"); - // props.closeModal?.(); - // }) - // .catch((e) => { - // messageError($q, e); - // }) - // .finally(() => { - // hideLoader(); - // }); }, "ยืนยันส่งไปออกคำสั่ง", "ต้องการยืนยันส่งไปออกคำสั่งใช่หรือไม่?" @@ -162,7 +140,6 @@ function saveOrder() { /** * เมื่อ props.modal เป็น true - * * กำหนดให้ selected เป็นค่าว่าง */ watch( @@ -174,6 +151,7 @@ watch( } ); + - -