Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m33s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m33s
This commit is contained in:
commit
9f74155308
2 changed files with 38 additions and 1 deletions
|
|
@ -93,4 +93,7 @@ export default {
|
|||
periodExamToPlacement: (examId: string) => `${periodExam}placement/${examId}`,
|
||||
|
||||
checkShowExaminfo: `${candidate}check-showExamInfo`,
|
||||
|
||||
applicationFormPDF: (candidateId: string) =>
|
||||
`${env.API_URI}/placement/candidate/pdf/${candidateId}`,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import { useQuasar } from "quasar";
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import genReport from "@/plugins/genreport";
|
||||
|
||||
import Profile from "@/modules/03_recruiting/components/Profile.vue";
|
||||
import {
|
||||
|
|
@ -44,6 +45,7 @@ const formContact = ref<any>({});
|
|||
const status = ref<string>("");
|
||||
const rejectDetail = ref<string>("");
|
||||
const positionLevelName = ref<string>("");
|
||||
const isShowExamInfo = ref<boolean>(false);
|
||||
|
||||
/** ดึงข้อมูลสถานะ */
|
||||
async function fetchStatus() {
|
||||
|
|
@ -55,6 +57,7 @@ async function fetchStatus() {
|
|||
status.value = data.status;
|
||||
rejectDetail.value = data.rejectDetail;
|
||||
positionLevelName.value = data?.positionExam?.positionLevelName;
|
||||
isShowExamInfo.value = data.isShowExamInfo || false;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -284,6 +287,24 @@ async function clickSave() {
|
|||
});
|
||||
}
|
||||
|
||||
async function downloadApplicationForm() {
|
||||
try {
|
||||
showLoader();
|
||||
const res = await http.get(
|
||||
config.API.applicationFormPDF(candidateId.value)
|
||||
);
|
||||
|
||||
const result = res.data.result;
|
||||
const fileName = `${result.template}ของ ${result.data.fullName}`;
|
||||
|
||||
await genReport(result, fileName, "pdf");
|
||||
} catch (err) {
|
||||
messageError($q, err);
|
||||
} finally {
|
||||
hideLoader();
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await fetchStatus();
|
||||
});
|
||||
|
|
@ -331,18 +352,31 @@ onMounted(async () => {
|
|||
>
|
||||
<q-tooltip>ตรวจสอบข้อมูล</q-tooltip>
|
||||
</q-btn> -->
|
||||
|
||||
<q-btn
|
||||
v-if="status == 'payment'"
|
||||
color="red"
|
||||
flat
|
||||
round
|
||||
icon="refresh"
|
||||
class="bg-red-1"
|
||||
@click="modalReverse"
|
||||
v-if="status == 'payment'"
|
||||
>
|
||||
<q-tooltip>ย้อนกลับให้เจ้าหน้าที่ตรวจสอบ</q-tooltip>
|
||||
</q-btn>
|
||||
<!-- || status == 'checkSeat' -->
|
||||
|
||||
<q-btn
|
||||
color="primary"
|
||||
flat
|
||||
round
|
||||
icon="download"
|
||||
class="bg-green-1"
|
||||
v-if="isShowExamInfo"
|
||||
@click="downloadApplicationForm"
|
||||
>
|
||||
<q-tooltip>ดาวน์โหลดใบสมัคร</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
<q-card class="q-pa-md">
|
||||
<div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue