ปรับหน้ารายละเอียดของผู้สอบผ่าน ให้เป็นข้อมูลหลักจากระบบใหม่

This commit is contained in:
STW_TTTY\stwtt 2024-05-20 10:49:45 +07:00
parent 30befa38c2
commit 7afafb68e5
7 changed files with 204 additions and 173 deletions

View file

@ -349,7 +349,7 @@ const saveData = async () => {
messageError($q, e);
})
.finally(async () => {
await props.fetch();
await props.fetch("Certificate");
rows.value = props.data;
});
};
@ -376,7 +376,7 @@ const editData = async () => {
messageError($q, e);
})
.finally(async () => {
await props.fetch();
await props.fetch("Certificate");
rows.value = props.data;
});
};
@ -385,38 +385,27 @@ const editData = async () => {
* ลบลบขอม
*/
const clickDelete = async () => {
$q.dialog({
title: `ลบข้อมูล`,
message: `ต้องการทำการลบข้อมูลนี้ใช่หรือไม่?`,
cancel: "ยกเลิก",
ok: "ยืนยัน",
persistent: true,
})
.onOk(async () => {
showLoader();
await http
.delete(
config.API.placementCertDetailId(
route.params.personalId.toString(),
id.value
)
dialogConfirm($q, async () => {
showLoader();
await http
.delete(
config.API.placementCertDetailId(
route.params.personalId.toString(),
id.value
)
.then((res) => {
success($q, "ลบข้อมูลสำเร็จ");
modal.value = false;
})
.catch((e) => {
messageError($q, e);
})
.finally(async () => {
await props.fetch();
rows.value = props.data;
});
})
.onCancel(async () => {
await props.fetch();
rows.value = props.data;
});
)
.then((res) => {
success($q, "ลบข้อมูลสำเร็จ");
modal.value = false;
})
.catch((e) => {
messageError($q, e);
})
.finally(async () => {
await props.fetch("Certificate");
rows.value = props.data;
});
});
};
/**
@ -424,17 +413,16 @@ const clickDelete = async () => {
*/
const clickClose = async () => {
if (editRow.value == true) {
$q.dialog({
title: `ข้อมูลมีการแก้ไข`,
message: `ยืนยันที่จะปิดโดยไม่บันทึกใช่หรือไม่?`,
cancel: "ยกเลิก",
ok: "ยืนยัน",
persistent: true,
}).onOk(async () => {
modal.value = false;
next.value = false;
previous.value = false;
});
dialogConfirm(
$q,
() => {
modal.value = false;
next.value = false;
previous.value = false;
},
"ข้อมูลมีการแก้ไข",
"ยืนยันที่จะปิดโดยไม่บันทึกใช่หรือไม่"
);
} else {
modal.value = false;
next.value = false;
@ -479,19 +467,18 @@ const addData = () => {
* งกนปมยกเลกการแกไขขอม
*/
const clickCancel = async () => {
myForm.value.resetValidation()
myForm.value.resetValidation();
if (editRow.value == true) {
$q.dialog({
title: `ข้อมูลมีการแก้ไข`,
message: `ยืนยันยกเลิกการแก้ไขใช่หรือไม่?`,
cancel: "ยกเลิก",
ok: "ยืนยัน",
persistent: true,
}).onOk(async () => {
edit.value = false;
await checkRowPage();
await getData();
});
dialogConfirm(
$q,
async () => {
edit.value = false;
await checkRowPage();
await getData();
},
"ข้อมูลมีการแก้ไข",
"ยืนยันยกเลิกการแก้ไขใช่หรือไม่"
);
} else {
edit.value = false;
await checkRowPage();
@ -638,9 +625,7 @@ const getClass = (val: boolean) => {
/>
<q-separator />
<q-card-section class="q-p-sm">
<div
class="row col-12 items-top q-col-gutter-x-xs q-col-gutter-y-xs"
>
<div class="row col-12 items-top q-col-gutter-x-xs q-col-gutter-y-xs">
<div class="col-xs-6 col-sm-6 col-md-6">
<q-input
:class="getClass(edit)"