แก้ไขบัค

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 () => { const SaveData = async () => {
// if (edit.value) { // if (edit.value) {

View file

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