diff --git a/src/api/12_evaluatePersonal/api.evaluate.ts b/src/api/12_evaluatePersonal/api.evaluate.ts index 2311451a8..934fe3195 100644 --- a/src/api/12_evaluatePersonal/api.evaluate.ts +++ b/src/api/12_evaluatePersonal/api.evaluate.ts @@ -46,5 +46,7 @@ export default { `${evaluation}/choose-meetings/${id}`, evaluationListData: (id: string) => `${evaluation}/director-meeting/${id}`, - evaluationReport:`${evaluation}/report` + evaluationReport:`${evaluation}/report`, + + updateEvaluationResult:(id:string) =>`${evaluation}/updateEvaluationResult/${id}` }; diff --git a/src/modules/12_evaluatePersonal/components/Detail/step/step8.vue b/src/modules/12_evaluatePersonal/components/Detail/step/step8.vue index 72cbfaab4..abc75000a 100644 --- a/src/modules/12_evaluatePersonal/components/Detail/step/step8.vue +++ b/src/modules/12_evaluatePersonal/components/Detail/step/step8.vue @@ -22,6 +22,8 @@ const route = useRoute(); const { showLoader, hideLoader, messageError, success, dialogConfirm } = mixin; +const checkBox = ref(""); +const evaluationResult = ref(""); const id = ref(route.params.id as string); const modalConfirm = ref(false); const nameOfWork = ref(""); @@ -191,6 +193,7 @@ async function confirmApprove() { data ) .then(async () => { + updateEvaluationResult(); await nextStep(); modalConfirm.value = false; }) @@ -312,6 +315,7 @@ async function fetchDataSigner() { nameOfWork.value = data.subjectDoc2; nameOfOwner.value = data.authorDoc2; position.value = data.assignedPosition; + evaluationResult.value = data.evaluationResult } }) .catch((e) => { @@ -324,6 +328,20 @@ async function fetchDataSigner() { }); } +function updateEvaluationResult() { + http + .put(config.API.updateEvaluationResult(id.value), { + result: checkBox.value, + }) + .then((res) => { + hideLoader(); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => {}); +} + onMounted(async () => { await Promise.all([ fetchDataSigner(), @@ -968,6 +986,7 @@ onMounted(async () => { /> +
ผลการพิจารณา : {{ evaluationResult == 'PASS' ? 'ผ่าน':'ไม่ผ่าน' }}
@@ -1016,11 +1035,32 @@ onMounted(async () => { /> +
+ + +