diff --git a/src/modules/12_evaluatePersonal/components/Detail/step/step8.vue b/src/modules/12_evaluatePersonal/components/Detail/step/step8.vue index 7c745d7b9..b26a04655 100644 --- a/src/modules/12_evaluatePersonal/components/Detail/step/step8.vue +++ b/src/modules/12_evaluatePersonal/components/Detail/step/step8.vue @@ -209,8 +209,8 @@ async function confirmApprove() { ), data ) - .then(() => { - nextStep(); + .then(async () => { + await nextStep(); modalConfirm.value = false; }) .catch((e) => { @@ -337,6 +337,10 @@ async function fetchDataSigner() { author.value = data.authorDoc2; subject.value = data.subjectDoc2; assignedPosition.value = data.assignedPosition; + + nameOfWork.value = data.authorDoc2; + nameOfOwner.value = data.subjectDoc2; + position.value = data.assignedPosition; } }) .catch((e) => { @@ -983,7 +987,7 @@ onMounted(async () => { unelevated label="ยืนยันผลการพิจารณา" color="public" - @click="confirmApprove" + @click="modalConfirm = true" /> diff --git a/src/modules/14_KPI/views/round.vue b/src/modules/14_KPI/views/round.vue index ca597053d..d2ea33607 100644 --- a/src/modules/14_KPI/views/round.vue +++ b/src/modules/14_KPI/views/round.vue @@ -126,27 +126,8 @@ const formData = reactive({ year: null, startDate: null, endDate: null, -}); // form เพิ่มรอบการประเมินผลการปฏิบัติหน้าที่ราชการ -const itemMenu = ref([ - // { - // label: "เปิดรอบ", - // value: "open", - // icon: "mdi-check", - // color: "primary", - // }, - { - label: "ปิดรอบ", - value: "close", - icon: "mdi-close", - color: "orange", - }, - { - label: "ลบรอบ", - value: "delete", - icon: "delete", - color: "red", - }, -]); // itemMenu +}); + const roundOp = ref([ { id: "APR", name: "รอบที่ 1 เมษายน" }, { @@ -224,19 +205,20 @@ function clearFormData() { */ function onSubmit() { dialogConfirm($q, async () => { + showLoader(); try { const url = isStatusEdit.value ? config.API.kpiPeriodById("12") : config.API.kpiPeriod; const method = isStatusEdit.value ? "put" : "post"; await http[method](url, formData); - fetchList(); - success($q, "บันทึกข้อมูลสำเร็จ"); + await fetchList(); + await success($q, "บันทึกข้อมูลสำเร็จ"); + closeDialog(); } catch (e) { messageError($q, e); } finally { hideLoader(); - closeDialog(); } }); } @@ -272,9 +254,9 @@ function onOpenRounde(id: string) { () => { http .get(config.API.kpiPeriod + `/open/${id}`) - .then(() => { - fetchList(); - success($q, "เปิดรอบสำเร็จ"); + .then(async () => { + await fetchList(); + await success($q, "เปิดรอบสำเร็จ"); }) .catch((err) => { messageError($q, err); @@ -299,9 +281,9 @@ function onCloseRounde(id: string) { showLoader(); http .get(config.API.kpiPeriod + `/close/${id}`) - .then(() => { - success($q, "ปิดรอบสำเร็จ"); - fetchList(); + .then(async () => { + await fetchList(); + await success($q, "ปิดรอบสำเร็จ"); }) .catch((err) => { messageError($q, err); @@ -324,9 +306,9 @@ function onDeleteRound(id: string) { showLoader(); http .delete(config.API.kpiPeriodById(id)) - .then(() => { - success($q, "ลบข้อมูลสำเร็จ"); - fetchList(); + .then(async () => { + await fetchList(); + await success($q, "ลบข้อมูลสำเร็จ"); }) .catch((err) => { messageError($q, err); @@ -532,7 +514,6 @@ onMounted(() => { > ลบรอบ -