fix: async await
This commit is contained in:
parent
512f9840de
commit
792a2aa619
1 changed files with 2 additions and 2 deletions
|
|
@ -279,13 +279,13 @@ function onSubmit() {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
await http.post(config.API.commandEditSalary, payload);
|
await http.post(config.API.commandEditSalary, payload);
|
||||||
success($q, "บันทึกข้อมูลาสำเร็จ");
|
|
||||||
if (isNext.value) {
|
if (isNext.value) {
|
||||||
router.push(`/command/edit/${props.commandId}`);
|
router.push(`/command/edit/${props.commandId}`);
|
||||||
} else {
|
} else {
|
||||||
|
await props.fetchData(); // เรียกฟังก์ชัน fetchData ที่ส่งมาจาก props เพื่อรีเฟรชข้อมูล
|
||||||
closeModal();
|
closeModal();
|
||||||
props.fetchData(); // เรียกฟังก์ชัน fetchData ที่ส่งมาจาก props เพื่อรีเฟรชข้อมูล
|
|
||||||
}
|
}
|
||||||
|
success($q, "บันทึกข้อมูลาสำเร็จ");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
messageError($q, error);
|
messageError($q, error);
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue