แก้ไขบัค

This commit is contained in:
AnandaTon 2023-10-18 16:07:09 +07:00
parent 3efd2d4943
commit 7c884bc3da
2 changed files with 17 additions and 13 deletions

View file

@ -193,6 +193,10 @@ const checkSave = () => {
// });
// }
};
const deleteData = async (id: string) => {
console.log("delete");
};
//
const SaveData = async () => {
// if (edit.value) {

View file

@ -128,7 +128,7 @@ const clickDelete = (id: string) => {
persistent: true,
})
.onOk(async () => {
await deleteData(id);
// await deleteData(id);
})
.onCancel(() => {})
.onDismiss(() => {});
@ -185,18 +185,18 @@ const clickAdd = () => {
};
const deleteData = async (id: string) => {
showLoader();
await http
.delete(config.API.periodExamId(id))
.then((res) => {
success($q, "ลบข้อมูลสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(async () => {
hideLoader();
});
// showLoader();
// await http
// .delete(config.API.periodExamId(id))
// .then((res) => {
// success($q, "");
// })
// .catch((e) => {
// messageError($q, e);
// })
// .finally(async () => {
// hideLoader();
// });
};
</script>