ทดลองงาน fix bug

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-06-04 18:16:03 +07:00
parent c83df20a60
commit f565dafb0a
2 changed files with 28 additions and 27 deletions

View file

@ -258,26 +258,23 @@ const openModalTree = (data: any, type: string) => {
posLevel.value = data.positionLevelOld;
position.value = data.positionOld;
};
//
//
const clickDelete = (id: string) => {
dialogRemove($q, () => deleteAppoint(id));
};
//
const deleteAppoint = async (id: string) => {
showLoader();
await http
.delete(config.API.appointmentDelete(id))
.then(() => {
success($q, "ลบข้อมูลสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
fecthlistappointment();
hideLoader();
});
dialogRemove($q, () => {
showLoader();
http
.delete(config.API.appointmentDelete(id))
.then(() => {
success($q, "ลบข้อมูลสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
fecthlistappointment();
hideLoader();
});
});
};
//
@ -546,7 +543,7 @@ onMounted(() => {
<q-item
clickable
v-close-popup
@click="clickDelete(props.row.personalId)"
@click="clickDelete(props.row.id)"
>
<q-item-section
style="min-width: 0px"