สอบคัดเลือกตรวจสอบหลายคน
This commit is contained in:
parent
178a6ac8c7
commit
a74ab974b4
4 changed files with 121 additions and 3 deletions
|
|
@ -69,6 +69,19 @@
|
|||
>
|
||||
<q-tooltip>บรรจุผู้ผ่านการคัดเลือก</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
size="md"
|
||||
icon="mdi-email-check-outline"
|
||||
round
|
||||
flat
|
||||
color="green-6"
|
||||
@click="candidateCheckProfileDialog"
|
||||
:disabled="
|
||||
attrs.rows.filter((r) => r.status == 'checkRegister').length == 0
|
||||
"
|
||||
>
|
||||
<q-tooltip>ตรวจสอบข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
<q-space />
|
||||
<div class="items-center" style="display: flex">
|
||||
<!-- ค้นหาข้อความใน table -->
|
||||
|
|
@ -166,6 +179,7 @@ const table = ref<any>(null);
|
|||
const files = ref<File[]>([]);
|
||||
const filterRef = ref<any>(null);
|
||||
const examId = ref<string>(route.params.examId.toString());
|
||||
const candidateId = ref<string[]>([]);
|
||||
const { messageError, showLoader, hideLoader } = mixin;
|
||||
const props = defineProps({
|
||||
inputfilter: String,
|
||||
|
|
@ -391,6 +405,24 @@ const downloadFileDetail = async () => {
|
|||
});
|
||||
};
|
||||
|
||||
const checkCandidates = async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.candidateCheckRegisters, {
|
||||
candidateId: candidateId.value,
|
||||
})
|
||||
.then((res) => {
|
||||
success($q, "ตรวจสอบข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
props.fetchData();
|
||||
});
|
||||
};
|
||||
|
||||
const downloadFilePDF = async (res: string, fileName: string) => {
|
||||
const link = document.createElement("a");
|
||||
link.href = window.URL.createObjectURL(
|
||||
|
|
@ -426,6 +458,27 @@ const publishModal = () => {
|
|||
}
|
||||
};
|
||||
|
||||
const candidateCheckProfileDialog = async () => {
|
||||
dialogMessage(
|
||||
$q,
|
||||
"ยืนยันการตรวจสอบข้อมูลนี้หรือไม่?",
|
||||
"ยืนยันการตรวจสอบข้อมูล",
|
||||
"mdi-email-check-outline",
|
||||
"ยืนยัน",
|
||||
"public",
|
||||
candidateCheckProfile,
|
||||
undefined
|
||||
);
|
||||
};
|
||||
|
||||
const candidateCheckProfile = async () => {
|
||||
const filter = attrs.value.rows.filter((r: any) => r.check == true);
|
||||
filter.map((r: any) => {
|
||||
candidateId.value.push(r.id.toString());
|
||||
});
|
||||
await checkCandidates();
|
||||
};
|
||||
|
||||
const resetFilter = () => {
|
||||
// reset ค่าที่ค้นหาเมื่อกดปุ่ม X ในกล่องค้นหา
|
||||
emit("update:inputfilter", "");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue