diff --git a/src/modules/08_KPI/views/form.vue b/src/modules/08_KPI/views/form.vue
index 987307b..d5ecd5b 100644
--- a/src/modules/08_KPI/views/form.vue
+++ b/src/modules/08_KPI/views/form.vue
@@ -128,21 +128,12 @@ async function fetchProfile(id: string) {
});
}
-/** save */
-function onSave() {}
-
function close() {
modalEdit.value = false;
-}
-
-async function clearDialog() {
- modalEdit.value = false;
evaluatorId.value = null;
commanderId.value = null;
commanderHighId.value = null;
- await fetchEvaluation();
- await getProfile();
- await getOrgOp();
+ getAll();
}
function onSubmit() {
@@ -159,7 +150,7 @@ function onSubmit() {
})
.then((res) => {
success($q, "บันทึกสำเร็จ");
- clearDialog();
+ close();
})
.catch((e) => {
messageError($q, e);
@@ -289,10 +280,23 @@ function onSubmitScore() {
});
}
-onMounted(async () => {
+async function clearScore() {
+ modalScore.value = false;
+ plannedPoint.value = "";
+ rolePoint.value = "";
+ specialPoint.value = "";
+ capacityPoint.value = "";
+ getAll();
+}
+
+async function getAll() {
await fetchEvaluation();
await getProfile();
await getOrgOp();
+}
+
+onMounted(() => {
+ getAll();
});
@@ -320,10 +324,6 @@ onMounted(async () => {
: `เพิ่มแบบประเมิน`
}}