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 ตัวเลือก");
|
dialogMessageNotify($q, "กรุณาเลือกวิธีการพัฒนา อย่างน้อย 1 ตัวเลือก");
|
||||||
} else {
|
} else {
|
||||||
dialogConfirm($q, () => {
|
dialogConfirm($q, async () => {
|
||||||
|
showLoader();
|
||||||
const url = id.value
|
const url = id.value
|
||||||
? config.API.kpiAchievementDevelop + `/${id.value}`
|
? config.API.kpiAchievementDevelop + `/${id.value}`
|
||||||
: config.API.kpiAchievementDevelop;
|
: config.API.kpiAchievementDevelop;
|
||||||
|
|
@ -220,11 +221,11 @@ function onSubmit() {
|
||||||
selectTypeYear: formData.year ? formData.year.toString() : null,
|
selectTypeYear: formData.year ? formData.year.toString() : null,
|
||||||
selectTypeId: projectName.value ? projectName.value.id : null,
|
selectTypeId: projectName.value ? projectName.value.id : null,
|
||||||
};
|
};
|
||||||
isLoadMain.value = true;
|
await http[id.value ? "put" : "post"](url, body)
|
||||||
http[id.value ? "put" : "post"](url, body)
|
.then(async () => {
|
||||||
.then((res) => {
|
await props?.getAll?.();
|
||||||
close();
|
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
|
close();
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue