fixing เมนูบรรจุ อื่นๆ

This commit is contained in:
Warunee Tamkoo 2024-05-15 14:59:57 +07:00
parent 45760996be
commit 7a394bce3a
2 changed files with 19 additions and 28 deletions

View file

@ -186,22 +186,6 @@ const fecthTypeOption = async () => {
});
};
//----()------//
const deleteOther = async (id: string) => {
showLoader();
await http
.delete(config.API.otherByid(id))
.then(() => {
success($q, "ลบข้อมูลสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
fecthlistOthet();
});
};
//----( input)------//
const resetFilter = () => {
filterKeyword.value = "";
@ -224,10 +208,23 @@ const clickClose = () => {
//----( Dialog )------//
const clickDelete = (id: string) => {
dialogRemove($q, () => deleteOther(id));
dialogRemove($q, async () => {
showLoader();
await http
.delete(config.API.otherByid(id))
.then(() => {
success($q, "ลบข้อมูลสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
fecthlistOthet();
});
});
};
//----()------//
//----()------//
const nextPage = (id: string) => {
router.push({
path: `/other/detail/${id}`,
@ -351,7 +348,7 @@ onMounted(() => {
class="text-red-14"
icon="mdi-delete"
dense
@click.stop="clickDelete(props.row.personalId)"
@click.stop="clickDelete(props.row.id)"
><q-tooltip>ลบขอม</q-tooltip></q-btn
>
</q-td>