เพิ่ม function ลบ รอ api

This commit is contained in:
AnandaTon 2023-09-11 10:22:45 +07:00
parent 8e3f6a99ca
commit 282c424786
2 changed files with 23 additions and 5 deletions

View file

@ -302,10 +302,7 @@ const clickAdd = async () => {
};
const clickDelete = (id: string) => {
dialogRemove(
$q,
() => deleteData(id),
);
dialogRemove($q, () => deleteData(id));
};
const nodeTree = async () => {

View file

@ -31,7 +31,7 @@ const mixin = useCounterMixin(); //เรียกฟังก์ชันกล
const {
showLoader,
hideLoader,
dialogMessage,
dialogRemove,
success,
messageError,
date2Thai,
@ -403,6 +403,26 @@ if (keycloak.tokenParsed != null) {
fullname.value = keycloak.tokenParsed.name;
role.value = keycloak.tokenParsed.role;
}
const deleteData = async (id: string) => {
await http;
// .delete(config.API.copyOrderId(id))
// .then((res) => {
// // const data = res.data.result;
// // console.log(res);
// success($q, "");
// })
// .catch((e) => {
// messageError($q, e);
// })
// .finally(async () => {
// // hideLoader();
// });
};
const clickDelete = (id: string) => {
dialogRemove($q, () => deleteData(id));
};
</script>
<!-- โครงเว -->
@ -489,6 +509,7 @@ if (keycloak.tokenParsed != null) {
dense
icon="mdi-close"
class="mybtn q-mx-xs"
@click="clickDelete"
></q-btn>
</q-item>
<q-separator color="grey-2" />