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);
|
||||
success($q, "บันทึกข้อมูลาสำเร็จ");
|
||||
if (isNext.value) {
|
||||
router.push(`/command/edit/${props.commandId}`);
|
||||
} else {
|
||||
await props.fetchData(); // เรียกฟังก์ชัน fetchData ที่ส่งมาจาก props เพื่อรีเฟรชข้อมูล
|
||||
closeModal();
|
||||
props.fetchData(); // เรียกฟังก์ชัน fetchData ที่ส่งมาจาก props เพื่อรีเฟรชข้อมูล
|
||||
}
|
||||
success($q, "บันทึกข้อมูลาสำเร็จ");
|
||||
} catch (error) {
|
||||
messageError($q, error);
|
||||
} finally {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue