diff --git a/src/modules/05_placement/components/PersonalDetail/Detail.vue b/src/modules/05_placement/components/PersonalDetail/Detail.vue index 124fd97ed..cb0b02695 100644 --- a/src/modules/05_placement/components/PersonalDetail/Detail.vue +++ b/src/modules/05_placement/components/PersonalDetail/Detail.vue @@ -113,6 +113,7 @@ const guidCheck = (id: string) => { }; const fetchData = async () => { + storePersonal.loading = false; showLoader(); await http .get(config.API.placementPersonalId(examId.value)) diff --git a/src/modules/05_placement/components/PersonalDetail/Information/Document.vue b/src/modules/05_placement/components/PersonalDetail/Information/Document.vue index 948aa977d..26f5b1756 100644 --- a/src/modules/05_placement/components/PersonalDetail/Information/Document.vue +++ b/src/modules/05_placement/components/PersonalDetail/Information/Document.vue @@ -168,7 +168,7 @@ const emit = defineEmits(["update:statusEdit"]); const $q = useQuasar(); // show dialog const mixin = useCounterMixin(); const route = useRoute(); -const { success, messageError, showLoader, hideLoader } = mixin; +const { success, messageError, showLoader, dialogConfirm } = mixin; const profileId = ref( route.params.personalId ? route.params.personalId.toString() : "" ); @@ -206,20 +206,25 @@ const getData = async () => { }; const deleteData = async (id: string) => { - console.log(id); - - showLoader(); - await http - .delete(config.API.documentDelid(profileId.value, id)) - .then(() => { - success($q, "ลบไฟล์เอกสารสำเร็จ"); - }) - .catch((e) => { - messageError($q, e); - }) - .finally(async () => { - await props.fetch(); - }); + dialogConfirm( + $q, + async () => { + showLoader(); + await http + .delete(config.API.documentDelid(profileId.value, id)) + .then(() => { + success($q, "ลบไฟล์เอกสารสำเร็จ"); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(async () => { + await props.fetch(); + }); + }, + "ยืนยันการลบเอกสารหลักฐาน", + "ต้องการยืนยันการลบเอกสารหลักฐานนี้หรือไม่ ?" + ); }; const uploadData = async () => { @@ -242,11 +247,11 @@ const uploadData = async () => { messageError($q, e); }) .finally(async () => { + await props.fetch(); uploader.value.reset(); name.value = ""; edit.value = false; emit("update:statusEdit", false); - await props.fetch(); }); // } else { // // modalError( diff --git a/src/modules/06_retirement/components/ExitInterview/exitRegistry.vue b/src/modules/06_retirement/components/ExitInterview/exitRegistry.vue index a9ebdb6c5..9cc3efc77 100644 --- a/src/modules/06_retirement/components/ExitInterview/exitRegistry.vue +++ b/src/modules/06_retirement/components/ExitInterview/exitRegistry.vue @@ -4,6 +4,11 @@ import { useQuasar } from "quasar"; import { useRoute, useRouter } from "vue-router"; import { useCounterMixin } from "@/stores/mixin"; +import type { + OptionQuestions, + OptionQuestions2, +} from "@/modules/06_retirement/interface/request/Main"; + import http from "@/plugins/http"; import config from "@/app.config"; import keycloak from "@/plugins/keycloak"; @@ -188,13 +193,13 @@ const questionDesc = reactive([ question10Desc: "", }, ]); -const question1Answer = ref([]); -const question2Answer = ref([]); -const question3Answer = ref([]); -const question4Answer = ref([]); -const question7Answer = ref([]); -const question8Answer = ref([]); -const question9Answer = ref([]); +const question1Answer = ref([]); +const question2Answer = ref([]); +const question3Answer = ref([]); +const question4Answer = ref([]); +const question7Answer = ref([]); +const question8Answer = ref([]); +const question9Answer = ref([]); async function fecthquestion() { await http .get(config.API.questionnaireList()) diff --git a/src/modules/06_retirement/interface/request/Main.ts b/src/modules/06_retirement/interface/request/Main.ts index e4ea7770c..010a13d45 100644 --- a/src/modules/06_retirement/interface/request/Main.ts +++ b/src/modules/06_retirement/interface/request/Main.ts @@ -1 +1,14 @@ -export type {}; +interface OptionQuestions { + label: string; + value: number; +} +interface OptionQuestions2 { + label: string; + value: boolean; +} + + +export type { + OptionQuestions, + OptionQuestions2 +};