updated kpi
This commit is contained in:
parent
8fb195cca7
commit
7538d21364
3 changed files with 72 additions and 27 deletions
|
|
@ -105,12 +105,7 @@ function onSubmitAdd() {
|
|||
showLoader();
|
||||
http
|
||||
.put(
|
||||
config.API.kpiCommentP(
|
||||
"progress",
|
||||
type.value,
|
||||
store.rolePerson.toLocaleLowerCase(),
|
||||
idList.value
|
||||
),
|
||||
config.API.kpiCommentP("progress", type.value, "user", idList.value),
|
||||
{
|
||||
reason: formDataAdd.reason,
|
||||
topic: formDataAdd.topic,
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@ const route = useRoute();
|
|||
const id = ref<string>(route.params.id as string);
|
||||
const isReadonly = <boolean>(route.name === "KPIEditEvaluator" ? true : false);
|
||||
|
||||
const plannedPoint = ref<string>("");
|
||||
const rolePoint = ref<string>("");
|
||||
const specialPoint = ref<string>("");
|
||||
const capacityPoint = ref<string>("");
|
||||
// const plannedPoint = ref<string>("");
|
||||
// const rolePoint = ref<string>("");
|
||||
// const specialPoint = ref<string>("");
|
||||
// const capacityPoint = ref<string>("");
|
||||
|
||||
const store = useKpiDataStore();
|
||||
const $q = useQuasar();
|
||||
|
|
@ -71,11 +71,11 @@ async function fetchEvaluation() {
|
|||
|
||||
fetchProfile(data.profileId);
|
||||
|
||||
plannedPoint.value = data.plannedPoint == null ? "" : data.plannedPoint;
|
||||
rolePoint.value = data.rolePoint == null ? "" : data.rolePoint;
|
||||
specialPoint.value = data.specialPoint == null ? "" : data.specialPoint;
|
||||
capacityPoint.value =
|
||||
data.capacityPoint == null ? "" : data.capacityPoint;
|
||||
// plannedPoint.value = data.plannedPoint == null ? "" : data.plannedPoint;
|
||||
// rolePoint.value = data.rolePoint == null ? "" : data.rolePoint;
|
||||
// specialPoint.value = data.specialPoint == null ? "" : data.specialPoint;
|
||||
// capacityPoint.value =
|
||||
// data.capacityPoint == null ? "" : data.capacityPoint;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -317,12 +317,12 @@ function openStatus() {
|
|||
modalStatus.value = true;
|
||||
}
|
||||
|
||||
function sendToCommander() {
|
||||
function sendToEvauator() {
|
||||
dialogConfirm($q, () => {
|
||||
showLoader();
|
||||
http
|
||||
.post(config.API.sendToCommander, {
|
||||
status: "EVALUATING",
|
||||
evaluationStatus: "EVALUATING",
|
||||
id: [store.dataEvaluation.id],
|
||||
})
|
||||
.then(async (res) => {
|
||||
|
|
@ -338,6 +338,26 @@ function sendToCommander() {
|
|||
});
|
||||
}
|
||||
|
||||
function goToSummary() {
|
||||
dialogConfirm($q, () => {
|
||||
showLoader();
|
||||
http
|
||||
.post(config.API.sendToSummary(store.dataEvaluation.id), {
|
||||
status: "SUMMARY",
|
||||
})
|
||||
.then(async (res) => {
|
||||
await getAll();
|
||||
store.tabMain = "4";
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
showLoader();
|
||||
await getAll();
|
||||
|
|
@ -412,9 +432,11 @@ onMounted(async () => {
|
|||
<div class="q-gutter-x-sm">
|
||||
<span
|
||||
v-if="
|
||||
(store.dataEvaluation.posExecutiveName == null &&
|
||||
(store.dataEvaluation.posTypeName != 'อำนวยการ' &&
|
||||
store.dataEvaluation.posTypeName != 'บริหาร' &&
|
||||
store.indicatorWeightTotal != 100) ||
|
||||
(store.dataEvaluation.posExecutiveName != null &&
|
||||
(store.dataEvaluation.posTypeName == 'อำนวยการ' &&
|
||||
store.dataEvaluation.posTypeName == 'บริหาร' &&
|
||||
(store.indicatorWeight1Total != 100 ||
|
||||
store.indicatorWeight2Total != 20) &&
|
||||
store.dataEvaluation.evaluationStatus == 'NEW')
|
||||
|
|
@ -429,9 +451,11 @@ onMounted(async () => {
|
|||
store.dataEvaluation.evaluationStatus == 'NEW'
|
||||
"
|
||||
:disabled="
|
||||
(store.dataEvaluation.posExecutiveName == null &&
|
||||
(store.dataEvaluation.posTypeName != 'อำนวยการ' &&
|
||||
store.dataEvaluation.posTypeName != 'บริหาร' &&
|
||||
store.indicatorWeightTotal != 100) ||
|
||||
(store.dataEvaluation.posExecutiveName != null &&
|
||||
(store.dataEvaluation.posTypeName == 'อำนวยการ' &&
|
||||
store.dataEvaluation.posTypeName == 'บริหาร' &&
|
||||
(store.indicatorWeight1Total != 100 ||
|
||||
store.indicatorWeight2Total != 20))
|
||||
"
|
||||
|
|
@ -456,7 +480,7 @@ onMounted(async () => {
|
|||
color="grey-2"
|
||||
text-color="blue-6"
|
||||
size="md"
|
||||
@click="sendToCommander"
|
||||
@click="sendToEvauator"
|
||||
>
|
||||
<q-tooltip>ทำการประเมิน</q-tooltip>
|
||||
</q-btn>
|
||||
|
|
@ -499,6 +523,28 @@ onMounted(async () => {
|
|||
<q-tooltip>ขอแก้ไขข้อตกลง</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
v-if="
|
||||
store.rolePerson == 'EVALUATOR' &&
|
||||
store.tabMain === '3' &&
|
||||
store.dataEvaluation.evaluationStatus ===
|
||||
'EVALUATING_EVALUATOR'
|
||||
"
|
||||
:disabled="
|
||||
store.dataEvaluation.evaluatorId == null ||
|
||||
store.dataEvaluation.summaryPoint > 0
|
||||
"
|
||||
unelevated
|
||||
round
|
||||
icon="mdi-send"
|
||||
color="grey-2"
|
||||
text-color="blue-6"
|
||||
size="md"
|
||||
@click="goToSummary()"
|
||||
>
|
||||
<q-tooltip>สรุปผลการประเมิน</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
unelevated
|
||||
round
|
||||
|
|
@ -597,7 +643,8 @@ onMounted(async () => {
|
|||
<span class="text-grey-6 col">คะแนนประเมิน</span>
|
||||
<span class="text-weight-medium text-primary col">
|
||||
{{
|
||||
store.dataEvaluation.posExecutiveName == null
|
||||
store.dataEvaluation.posTypeName != "อำนวยการ" &&
|
||||
store.dataEvaluation.posTypeName != "บริหาร"
|
||||
? (
|
||||
store.indicatorScoreVal +
|
||||
store.competencyScoreVal +
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue