fixing เมนูบรรจุ อื่นๆ
This commit is contained in:
parent
45760996be
commit
7a394bce3a
2 changed files with 19 additions and 28 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue