updated step kpi
This commit is contained in:
parent
141dc8f61f
commit
96a8c84600
3 changed files with 200 additions and 85 deletions
|
|
@ -97,6 +97,7 @@ function getProfile() {
|
|||
store.dataProfile = data;
|
||||
store.checkCompetency();
|
||||
store.checkCompetencyDefaultCompetencyLevel();
|
||||
store.checkStep();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -285,6 +286,68 @@ async function getAll() {
|
|||
await getOrgOp();
|
||||
}
|
||||
|
||||
function sendToEvaluatore() {
|
||||
dialogConfirm(
|
||||
$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();
|
||||
// });
|
||||
}
|
||||
},
|
||||
"ยืนยันการส่งข้อตกลงให้ผู้ประเมินอนุมัติ",
|
||||
"ต้องการยืนยันส่งข้อตกลงนี้ให้ผู้ประเมินอนุมัติใช่หรือไม่?"
|
||||
);
|
||||
}
|
||||
|
||||
function requireEdit() {
|
||||
dialogConfirm(
|
||||
$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();
|
||||
// });
|
||||
}
|
||||
},
|
||||
"ยืนยันการขอแก้ไขข้อตกลง",
|
||||
"ต้องการยืนยันการขอแก้ไขข้อตกลงนี้ใช่หรือไม่?"
|
||||
);
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
showLoader();
|
||||
await getAll();
|
||||
|
|
@ -292,6 +355,8 @@ onMounted(async () => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<!-- evaluationStatus={{ store.dataEvaluation.evaluationStatus }} | tabOpen =
|
||||
{{ store.tabOpen }} | rolePerson = {{ store.rolePerson }} | -->
|
||||
<div class="col-12 row justify-center">
|
||||
<div class="col-xs-12 col-sm-12 col-md-11">
|
||||
<div class="toptitle text-white col-12 row items-center">
|
||||
|
|
@ -335,6 +400,42 @@ onMounted(async () => {
|
|||
}}</span>
|
||||
<q-space />
|
||||
<div class="q-gutter-x-sm">
|
||||
<q-btn
|
||||
v-if="
|
||||
store.rolePerson == 'USER' &&
|
||||
store.dataEvaluation.evaluationStatus == 'NEW'
|
||||
"
|
||||
:disabled="store.dataEvaluation.evaluatorId == null"
|
||||
unelevated
|
||||
round
|
||||
icon="mdi-send"
|
||||
color="grey-2"
|
||||
text-color="blue-6"
|
||||
size="md"
|
||||
@click="sendToEvaluatore()"
|
||||
>
|
||||
<q-tooltip>ส่งให้ผู้ประเมินอนุมัติ</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
v-if="
|
||||
store.rolePerson == 'USER' &&
|
||||
store.tabOpen < 3 &&
|
||||
store.dataEvaluation.evaluationStatus != 'NEW' &&
|
||||
(store.dataEvaluation.evaluationReqEdit == null ||
|
||||
store.dataEvaluation.evaluationReqEdit == 'DONE')
|
||||
"
|
||||
:disabled="store.dataEvaluation.evaluatorId == null"
|
||||
unelevated
|
||||
round
|
||||
icon="mdi-file-edit"
|
||||
color="grey-2"
|
||||
text-color="red-6"
|
||||
size="md"
|
||||
@click="requireEdit()"
|
||||
>
|
||||
<q-tooltip>ขอแก้ไขข้อตกลง</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<!-- <q-btn
|
||||
v-if="!isReadonly"
|
||||
unelevated
|
||||
|
|
@ -537,7 +638,7 @@ onMounted(async () => {
|
|||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
<q-dialog v-model="modalScore" persistent>
|
||||
<!-- <q-dialog v-model="modalScore" persistent>
|
||||
<q-card bordered style="width: 50vh">
|
||||
<q-form greedy @submit.prevent @validation-success="onSubmitScore">
|
||||
<DialogHeader tittle="แก้ไขคะแนนเต็ม" :close="clearScore" />
|
||||
|
|
@ -612,7 +713,7 @@ onMounted(async () => {
|
|||
</q-card-actions>
|
||||
</q-form>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</q-dialog> -->
|
||||
</template>
|
||||
<style>
|
||||
.bg-toolbar {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue