This commit is contained in:
Warunee Tamkoo 2023-12-23 18:51:23 +07:00
parent 63a65cda86
commit 14ccbcfe62
3 changed files with 40 additions and 25 deletions

View file

@ -124,7 +124,6 @@ function getPDF(url: string, type: string, fileName: string) {
}, },
}) })
.then(async (res) => { .then(async (res) => {
console.log(res);
const a = document.createElement("a"); const a = document.createElement("a");
a.href = window.URL.createObjectURL(res.data); a.href = window.URL.createObjectURL(res.data);
a.download = fileName; a.download = fileName;
@ -137,15 +136,22 @@ function getPDF(url: string, type: string, fileName: string) {
/** ส่งไปประกาศบนเว็บไซต์ */ /** ส่งไปประกาศบนเว็บไซต์ */
function onWebSite() { function onWebSite() {
showLoader(); dialogConfirm(
http $q,
.put(config.API.evaluationApproveDoc1(id.value)) () => {
.then((res) => {}) showLoader();
.catch((e) => {}) http
.finally(() => { .put(config.API.evaluationApproveDoc1(id.value))
success($q, "ส่งไปประกาศบนเว็บไซต์ สำเร็จ"); .then((res) => {})
getStep(); .catch((e) => {})
}); .finally(() => {
success($q, "ส่งไปประกาศบนเว็บไซต์สำเร็จ");
getStep();
});
},
"ยืนยันการส่งไปประกาศบนเว็บไซต์",
"ยืนยันการส่งไปประกาศบนเว็บไซต์ใช่หรือไม่?"
);
} }
function getStep() { function getStep() {

View file

@ -24,7 +24,14 @@ const numOfPages = ref<number>(0);
const page = ref<number>(1); const page = ref<number>(1);
const $q = useQuasar(); const $q = useQuasar();
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { date2Thai, showLoader, hideLoader, messageError, success } = mixin; const {
dialogConfirm,
date2Thai,
showLoader,
hideLoader,
messageError,
success,
} = mixin;
const AnnouncementStartDate = ref<string | null>(); const AnnouncementStartDate = ref<string | null>();
const AnnouncementEndDate = ref<string | null>(); const AnnouncementEndDate = ref<string | null>();
const id = ref<string>(route.params.id as string); const id = ref<string>(route.params.id as string);
@ -73,19 +80,21 @@ function deleteFile(name: string) {
} }
function save() { function save() {
showLoader(); dialogConfirm($q, () => {
http showLoader();
.put(config.API.evaluationNext5To6(id.value)) http
// .then((res) => {}) .put(config.API.evaluationNext5To6(id.value))
.catch((e) => { // .then((res) => {})
messageError($q, e); .catch((e) => {
}) messageError($q, e);
.finally(() => { })
success($q, "บันทึกแจ้งผลการประกาศคัดเลือกสำเร็จ"); .finally(() => {
store.step = 6; success($q, "บันทึกแจ้งผลการประกาศคัดเลือกสำเร็จ");
store.currentStep = 6; store.step = 6;
hideLoader(); store.currentStep = 6;
}); hideLoader();
});
});
} }
function upLoadFile() { function upLoadFile() {

View file

@ -227,7 +227,7 @@ onMounted(() => {
<span class="q-ml-lg q-my-sm">ประวการศกษา </span> <span class="q-ml-lg q-my-sm">ประวการศกษา </span>
</div> </div>
<q-separator /> <q-separator />
<div v-if="formDetail.educations.length > 0"> <div v-if="formDetail.educations && formDetail.educations.length > 0">
<div <div
class="row q-pa-sm" class="row q-pa-sm"
v-for="(education, index) in formDetail.educations" v-for="(education, index) in formDetail.educations"