updated kpi

This commit is contained in:
Warunee Tamkoo 2024-05-09 17:14:21 +07:00
parent a121569433
commit a69d9e331d
8 changed files with 97 additions and 107 deletions

View file

@ -293,25 +293,21 @@ function sendToEvaluatore() {
$q,
() => {
if (id.value) {
// showLoader();
// http
// .put(config.API.kpiEvaluationCheck + `/${id.value}`, {
// evaluatorId: evaluatorId.value ? evaluatorId.value.id : null,
// commanderId: commanderId.value ? commanderId.value.id : null,
// commanderHighId: commanderHighId.value
// ? commanderHighId.value.id
// : null,
// })
// .then((res) => {
// success($q, "");
// close();
// })
// .catch((e) => {
// messageError($q, e);
// })
// .finally(() => {
// hideLoader();
// });
showLoader();
http
.put(config.API.kpiSendToStatus(id.value), {
status: "NEW_EVALUATOR",
})
.then((res) => {
success($q, "ส่งข้อตกลงให้ผู้ประเมินอนุมัติสำเร็จ");
close();
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
}
},
"ยืนยันการส่งข้อตกลงให้ผู้ประเมินอนุมัติ",
@ -350,6 +346,7 @@ function requireEdit() {
);
}
const indicatorWeightTotal = ref<number>(0);
onMounted(async () => {
showLoader();
await getAll();
@ -402,12 +399,23 @@ onMounted(async () => {
}}</span>
<q-space />
<div class="q-gutter-x-sm">
<span
v-if="
indicatorWeightTotal > 0 && indicatorWeightTotal != 100
"
class="text-red"
>*ำหน(อยละ) ผลสมฤทธของงานไมกตอง</span
>
<q-btn
v-if="
store.rolePerson == 'USER' &&
store.dataEvaluation.evaluationStatus == 'NEW'
"
:disabled="store.dataEvaluation.evaluatorId == null"
:disabled="
store.dataEvaluation.evaluatorId == null ||
(indicatorWeightTotal > 0 &&
indicatorWeightTotal != 100)
"
unelevated
round
icon="mdi-send"
@ -548,6 +556,7 @@ onMounted(async () => {
<TabMain
v-model:indicatorScore="indicatorScore"
v-model:competencyScore="competencyScore"
v-model:indicatorWeightTotal="indicatorWeightTotal"
/>
</q-card>
</div>