diff --git a/src/modules/08_KPI/components/Tab/Dialog/DialogDevelop.vue b/src/modules/08_KPI/components/Tab/Dialog/DialogDevelop.vue index 7ec9cbc..5d81430 100644 --- a/src/modules/08_KPI/components/Tab/Dialog/DialogDevelop.vue +++ b/src/modules/08_KPI/components/Tab/Dialog/DialogDevelop.vue @@ -198,7 +198,8 @@ function onSubmit() { ) { dialogMessageNotify($q, "กรุณาเลือกวิธีการพัฒนา อย่างน้อย 1 ตัวเลือก"); } else { - dialogConfirm($q, () => { + dialogConfirm($q, async () => { + showLoader(); const url = id.value ? config.API.kpiAchievementDevelop + `/${id.value}` : config.API.kpiAchievementDevelop; @@ -220,11 +221,11 @@ function onSubmit() { selectTypeYear: formData.year ? formData.year.toString() : null, selectTypeId: projectName.value ? projectName.value.id : null, }; - isLoadMain.value = true; - http[id.value ? "put" : "post"](url, body) - .then((res) => { - close(); + await http[id.value ? "put" : "post"](url, body) + .then(async () => { + await props?.getAll?.(); success($q, "บันทึกข้อมูลสำเร็จ"); + close(); }) .catch((e) => { messageError($q, e);