fix: async await

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-12-15 15:18:03 +07:00
parent 512f9840de
commit 792a2aa619

View file

@ -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 {