fix fetch ช้อมูลรายการออกคำสั่ง
This commit is contained in:
parent
5fb8c24263
commit
f1c056fc8d
31 changed files with 69 additions and 32 deletions
|
|
@ -35,6 +35,10 @@ const props = defineProps({
|
|||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
fetchData: {
|
||||
type: Function,
|
||||
default: () => {},
|
||||
},
|
||||
});
|
||||
|
||||
const commandOp = ref<ListCommand[]>([]); // ประเภทคำสั่ง
|
||||
|
|
@ -208,6 +212,7 @@ function createCommand(isRedirect: boolean) {
|
|||
router.push(`/command/edit/${id}`);
|
||||
} else {
|
||||
clearValue();
|
||||
await props.fetchData(); // เรียกฟังก์ชัน fetchData ที่ส่งมาจาก props เพื่อรีเฟรชข้อมูล
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -253,7 +258,7 @@ function addPersonalToCommand(isRedirect: boolean) {
|
|||
router.push(`/command/edit/${id}`);
|
||||
} else {
|
||||
modal.value = false;
|
||||
clearValue();
|
||||
await props.fetchData(); // เรียกฟังก์ชัน fetchData ที่ส่งมาจาก props เพื่อรีเฟรชข้อมูล
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue