เพิ่ม function ลบ รอ api
This commit is contained in:
parent
8e3f6a99ca
commit
282c424786
2 changed files with 23 additions and 5 deletions
|
|
@ -302,10 +302,7 @@ const clickAdd = async () => {
|
|||
};
|
||||
|
||||
const clickDelete = (id: string) => {
|
||||
dialogRemove(
|
||||
$q,
|
||||
() => deleteData(id),
|
||||
);
|
||||
dialogRemove($q, () => deleteData(id));
|
||||
};
|
||||
|
||||
const nodeTree = async () => {
|
||||
|
|
|
|||
|
|
@ -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" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue