Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m20s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m20s
* develop: ปิด/เปิด ให้ดาวน์โหลดใบสมัครสรรหา
This commit is contained in:
commit
6063f21e25
2 changed files with 26 additions and 10 deletions
|
|
@ -11,13 +11,11 @@ import config from "@/app.config";
|
|||
import { useQuasar } from "quasar";
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const { dateToISO, success, modalError, dialogMessage } = mixin;
|
||||
|
||||
const detailReport = ref<any>();
|
||||
const attrs = ref<any>(useAttrs());
|
||||
const table = ref<any>(null);
|
||||
const files = ref<File[]>([]);
|
||||
|
|
@ -104,6 +102,10 @@ const props = defineProps({
|
|||
type: Boolean,
|
||||
defualt: false,
|
||||
},
|
||||
isShowExaminfo: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
},
|
||||
save: {
|
||||
type: Function,
|
||||
default: () => console.log("not function"),
|
||||
|
|
@ -395,23 +397,30 @@ async function clickCandidateList() {
|
|||
}
|
||||
|
||||
async function onCheckShowExaminfo() {
|
||||
console.log(props.isShowExaminfo);
|
||||
|
||||
dialogMessage(
|
||||
$q,
|
||||
"ยืนยันการเปิดให้ดาวน์โหลดใบสมัคร แสดงสถานที่สอบ และเลขประจำตัวสอบนี้หรือไม่?",
|
||||
"ยืนยันการเปิดให้ดาวน์โหลดใบสมัคร แสดงสถานที่สอบ และเลขประจำตัวสอบ",
|
||||
"mdi-email-check-outline",
|
||||
`ยืนยันการ${props.isShowExaminfo ? "ปิด" : "เปิด"}`,
|
||||
`${
|
||||
props.isShowExaminfo ? "ปิดไม่" : "เปิด"
|
||||
}ให้ดาวน์โหลดใบสมัคร แสดงสถานที่สอบ และเลขประจำตัวสอบหรือไม่?`,
|
||||
props.isShowExaminfo ? "mdi-eye-off" : "mdi-eye-check",
|
||||
"ยืนยัน",
|
||||
"public",
|
||||
props.isShowExaminfo ? "red" : "public",
|
||||
async () => {
|
||||
try {
|
||||
showLoader();
|
||||
await http.post(config.API.checkShowExaminfo, {
|
||||
examId: examId.value,
|
||||
status: !props.isShowExaminfo,
|
||||
});
|
||||
await props.fetchData();
|
||||
success(
|
||||
$q,
|
||||
"เปิดให้ดาวน์โหลดใบสมัคร แสดงสถานที่สอบ และเลขประจำตัวสอบสำเร็จ"
|
||||
`${
|
||||
props.isShowExaminfo ? "เปิด" : "ปิดไม่"
|
||||
}ให้ดาวน์โหลดใบสมัคร แสดงสถานที่สอบ และเลขประจำตัวสอบสำเร็จ`
|
||||
);
|
||||
} catch (error) {
|
||||
messageError($q, error);
|
||||
|
|
@ -529,14 +538,15 @@ watch(
|
|||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
size="md"
|
||||
icon="mdi-eye-check"
|
||||
:icon="isShowExaminfo ? 'mdi-eye-off' : 'mdi-eye-check'"
|
||||
round
|
||||
flat
|
||||
color="info"
|
||||
:color="isShowExaminfo ? 'red' : 'info'"
|
||||
@click="onCheckShowExaminfo"
|
||||
>
|
||||
<q-tooltip
|
||||
>เปิดให้ดาวน์โหลดใบสมัคร แสดงสถานที่สอบ และเลขประจำตัวสอบ</q-tooltip
|
||||
>{{ isShowExaminfo ? "ปิดไม่" : "เปิด" }}ให้ดาวน์โหลดใบสมัคร
|
||||
แสดงสถานที่สอบ และเลขประจำตัวสอบ</q-tooltip
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ const examId = ref<string>(route.params.examId.toString());
|
|||
const visible = ref<boolean>(false); //เปิดปิด card สรุปข้อมูล
|
||||
const dataNum = ref<DataNumObject[]>([]); //จำนวนสรุปจำนวนข้อมูลหลัก
|
||||
const isFee = ref<boolean>(false);
|
||||
const isShowExaminfo = ref<boolean>(false);
|
||||
const rows = ref<any[]>([]);
|
||||
const visibleColumns = ref<String[]>([
|
||||
"no",
|
||||
|
|
@ -283,6 +284,10 @@ async function fetchData(loading: boolean = true) {
|
|||
isShowExamInfo: r.isShowExamInfo,
|
||||
});
|
||||
});
|
||||
|
||||
isShowExaminfo.value = data.data.some(
|
||||
(item: any) => item.isShowExamInfo === true
|
||||
);
|
||||
}
|
||||
loading ?? hideLoader();
|
||||
})
|
||||
|
|
@ -493,6 +498,7 @@ onMounted(async () => {
|
|||
@update:change-page="changePage"
|
||||
:max-page="maxPage"
|
||||
:is-fee="isFee"
|
||||
:is-show-examinfo="isShowExaminfo"
|
||||
>
|
||||
<template #columns="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue