diff --git a/src/api/07_insignia/api.insignia.ts b/src/api/07_insignia/api.insignia.ts index 0fd9ea551..8ea454898 100644 --- a/src/api/07_insignia/api.insignia.ts +++ b/src/api/07_insignia/api.insignia.ts @@ -98,4 +98,8 @@ export default { reportInsignia: (type: string, fileType: string, fileId: string) => `${report}/insignia/${type}/${fileType}/${fileId}`, + // เจ้าหน้าที่เป็นคนอัปโหลดไฟล์ + uploadfileOnlyInsignia: (requestId: string) => `${insignia}/request/upload/${requestId}`, + // สกจ. ตีกลับให้หัวหน้าเขต + rejectRequest: (id: string, ocId: string) => `${insignia}/request/head/reject/${id}/${ocId}` }; diff --git a/src/modules/03_recruiting/components/Document.vue b/src/modules/03_recruiting/components/Document.vue index ff6e9a764..bc9293823 100644 --- a/src/modules/03_recruiting/components/Document.vue +++ b/src/modules/03_recruiting/components/Document.vue @@ -242,4 +242,6 @@ const uploadData = async () => { const downloadData = async (path: string) => { window.open(path); }; + + diff --git a/src/modules/04_registry/components/Profile.vue b/src/modules/04_registry/components/Profile.vue index 034d853d8..947e418fc 100644 --- a/src/modules/04_registry/components/Profile.vue +++ b/src/modules/04_registry/components/Profile.vue @@ -1021,27 +1021,60 @@ const closeKp7Short = () => { dialogShort.value = false; }; -const helpPost = () => { +const helpPost = async () => { + const formData = new FormData(); + formData.append("id", profileId.value); dialogConfirm($q, async () => { - const formData = new FormData(); - formData.append("id", profileId.value); - await http.post(config.API.placemenHelpGov, formData); + showLoader(); + await http + .post(config.API.placemenHelpGov, formData) + .then(() => { + success($q, "ดำเนินการสำเร็จ"); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + hideLoader(); + }); }); }; const repatriationPost = async () => { + const formData = new FormData(); + formData.append("id", profileId.value); dialogConfirm($q, async () => { - const formData = new FormData(); - formData.append("id", profileId.value); - await http.post(config.API.placemenRepatriation, formData); + showLoader(); + await http + .post(config.API.placemenRepatriation, formData) + .then(() => { + success($q, "ดำเนินการสำเร็จ"); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + hideLoader(); + }); }); }; const appointPost = async () => { + const formData = new FormData(); + formData.append("id", profileId.value); dialogConfirm($q, async () => { - const formData = new FormData(); - formData.append("id", profileId.value); - await http.post(config.API.placemenAppointment, formData); + showLoader(); + await http + .post(config.API.placemenAppointment, formData) + .then(() => { + success($q, "ดำเนินการสำเร็จ"); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + hideLoader(); + }); }); }; @@ -1054,34 +1087,78 @@ const appointPost = async () => { // }; const outPost = async () => { + const formData = new FormData(); + formData.append("id", profileId.value); dialogConfirm($q, async () => { - const formData = new FormData(); - formData.append("id", profileId.value); - await http.post(config.API.retirementOut, formData); + showLoader(); + await http + .post(config.API.retirementOut, formData) + .then(() => { + success($q, "ดำเนินการสำเร็จ"); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + hideLoader(); + }); }); }; const dischargePost = async () => { + const formData = new FormData(); + formData.append("id", profileId.value); dialogConfirm($q, async () => { - const formData = new FormData(); - formData.append("id", profileId.value); - await http.post(config.API.retirementDischarge, formData); + showLoader(); + await http + .post(config.API.retirementDischarge, formData) + .then(() => { + success($q, "ดำเนินการสำเร็จ"); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + hideLoader(); + }); }); }; const expulsionPost = async () => { + const formData = new FormData(); + formData.append("id", profileId.value); dialogConfirm($q, async () => { - const formData = new FormData(); - formData.append("id", profileId.value); - await http.post(config.API.retirementExpulsion, formData); + showLoader(); + await http + .post(config.API.retirementExpulsion, formData) + .then(() => { + success($q, "ดำเนินการสำเร็จ"); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + hideLoader(); + }); }); }; const otherPost = async () => { + const formData = new FormData(); + formData.append("id", profileId.value); dialogConfirm($q, async () => { - const formData = new FormData(); - formData.append("id", profileId.value); - await http.post(config.API.placemenOther, formData); + showLoader(); + await http + .post(config.API.placemenOther, formData) + .then(() => { + success($q, "ดำเนินการสำเร็จ"); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + hideLoader(); + }); }); }; diff --git a/src/modules/05_placement/components/probation/FormEvaluation/Template1Commader.vue b/src/modules/05_placement/components/probation/FormEvaluation/Template1Commader.vue index a8c10fd77..fe3746966 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/Template1Commader.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/Template1Commader.vue @@ -81,7 +81,7 @@ const FileDownload = async (type: string) => { .then(async (res) => { downloadFile( res, - `แบบบันทึกผล(ผู้บักคับบัญชา)_${fullname.value}_ครั้งที่${numTab.no}.${type}` + `แบบบันทึกผล(ผู้บังคับบัญชา)_${fullname.value}_ครั้งที่${numTab.no}.${type}` ); }) .catch((e) => { diff --git a/src/modules/07_insignia/components/1_Proposals/listProposals.vue b/src/modules/07_insignia/components/1_Proposals/listProposals.vue index 511a9c20d..0dfb156a6 100644 --- a/src/modules/07_insignia/components/1_Proposals/listProposals.vue +++ b/src/modules/07_insignia/components/1_Proposals/listProposals.vue @@ -7,6 +7,7 @@ import { useQuasar } from "quasar"; import type { FormProprsalsRound2 } from "@/modules/07_insignia/interface/request/Main"; import config from "@/app.config"; import http from "@/plugins/http"; +import { useInsigniaDataStore } from "@/modules/07_insignia/store"; const mixin = useCounterMixin(); const { @@ -19,6 +20,7 @@ const { dialogRemove, } = mixin; const $q = useQuasar(); //ใช้ noti quasar +const storeInsignia = useInsigniaDataStore(); const visibleColumns = ref([ "period_name", @@ -108,7 +110,7 @@ const fetchData = async () => { period_isActive: e.period_isActive, period_doc: e.period_doc, period_status: e.period_status.result, - statusRoyal: 'กำลังดำเนินการ' + statusRoyal: storeInsignia.convertStatus(e.period_status), })); }) .catch((e) => { diff --git a/src/modules/07_insignia/components/2_Manage/Tab1.vue b/src/modules/07_insignia/components/2_Manage/Tab1.vue index 4b3f87052..eb88cffc5 100644 --- a/src/modules/07_insignia/components/2_Manage/Tab1.vue +++ b/src/modules/07_insignia/components/2_Manage/Tab1.vue @@ -816,7 +816,6 @@ const clickShowWarn = () => { /> -