fix bug KPI ไม่ fetch ข้อมูล การพัฒนาตนเองเมื่อเพิ่ม
This commit is contained in:
parent
af74caf64e
commit
ca8fa3b420
1 changed files with 6 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue