diff --git a/src/modules/06_retirement/components/resign/Resign.vue b/src/modules/06_retirement/components/resign/Resign.vue index 32b651144..c58813040 100644 --- a/src/modules/06_retirement/components/resign/Resign.vue +++ b/src/modules/06_retirement/components/resign/Resign.vue @@ -5,10 +5,8 @@ import { useRouter } from "vue-router"; import { useCounterMixin } from "@/stores/mixin"; import { useRetirementDataStore } from "@/modules/06_retirement/store"; import DialogHeader from "@/modules/06_retirement/components/DialogHeader.vue"; - import http from "@/plugins/http"; import config from "@/app.config"; - import type { QTableProps } from "quasar"; import type { ResponseItems } from "@/modules/06_retirement/interface/response/Main"; @@ -16,9 +14,7 @@ const $q = useQuasar(); //ใช้ noti quasar const router = useRouter(); const mixin = useCounterMixin(); const RetirementData = useRetirementDataStore(); - const { messageError, date2Thai, showLoader, hideLoader, success } = mixin; -const { statusText } = RetirementData; const rows = ref([]); const columns = ref([ @@ -276,7 +272,6 @@ const closeModal = () => (modal.value = false); const selected = ref([]); const checkSelected = computed(() => { if (selected.value.length === 0) { - return true; } }); @@ -287,20 +282,19 @@ const resetFilter = () => { }; const openModalOrder = () => { - openModal(); const row = filters.value.filter( (r: ResponseItems) => r.status == "PENDING" || r.status == "APPROVE" || r.status == "REJECT" ); rows2.value = row; - }; onMounted(async () => { await fecthlist(); }); +//นำข้อมูลจาก API มาแสดง const fecthlist = async () => { showLoader(); await http @@ -346,6 +340,7 @@ const fecthlist = async () => { }); }; +//บันทึกคำสั่ง const saveOrder = async () => { const id = selected.value.map((r) => r.id); const body = { @@ -369,6 +364,8 @@ const saveOrder = async () => { hideLoader(); }); }; + +//แปลงข้อความ status const status = (val: string) => { switch (val) { case "WAITTING": @@ -405,28 +402,66 @@ const pagination = ref({
- + ส่งไปออกคำสั่งลาออก
- + - +
- +