updated kpi
This commit is contained in:
parent
8fb195cca7
commit
7538d21364
3 changed files with 72 additions and 27 deletions
|
|
@ -15,11 +15,10 @@ const KpiUser = `${env.API_URI}/kpi/user`;
|
||||||
const kpiAchievement = `${env.API_URI}/kpi/user/achievement`;
|
const kpiAchievement = `${env.API_URI}/kpi/user/achievement`;
|
||||||
const kpiReason = `${env.API_URI}/kpi/reason`;
|
const kpiReason = `${env.API_URI}/kpi/reason`;
|
||||||
|
|
||||||
|
|
||||||
// const placementKeycloak = `${env.API_URI}/placement/officer/keycloak`;
|
// const placementKeycloak = `${env.API_URI}/placement/officer/keycloak`;
|
||||||
const placementKeycloak = `${env.API_URI}/placement/officer/profileId`;
|
const placementKeycloak = `${env.API_URI}/placement/officer/profileId`;
|
||||||
// const orgPosition = `${env.API_URI}/org/profile/keycloak/position `;
|
// const orgPosition = `${env.API_URI}/org/profile/keycloak/position `;
|
||||||
const orgPosition = `${env.API_URI}/org/profile/profileid/position`;
|
const orgPosition = `${env.API_URI}/org/profile/profileid/position`;
|
||||||
export default {
|
export default {
|
||||||
kpiPeriod,
|
kpiPeriod,
|
||||||
kpiEvaluation,
|
kpiEvaluation,
|
||||||
|
|
@ -48,9 +47,13 @@ export default {
|
||||||
/**ประเมิน*/
|
/**ประเมิน*/
|
||||||
kpiAchievementDevelop: `${kpiAchievement}/development`,
|
kpiAchievementDevelop: `${kpiAchievement}/development`,
|
||||||
|
|
||||||
kpiCommentP:(typP:string,type:string,role:string,id:string)=>`${kpiReason}/${typP}/${type}/${role}/${id}`,
|
kpiCommentP: (typP: string, type: string, role: string, id: string) =>
|
||||||
|
`${kpiReason}/${typP}/${type}/${role}/${id}`,
|
||||||
|
|
||||||
placementKeycloak,
|
placementKeycloak,
|
||||||
orgPosition,
|
orgPosition,
|
||||||
sendToCommander:`${KpiUser}/evaluation/admin/change-status`
|
sendToCommander: `${KpiUser}/evaluation/admin/change-status`,
|
||||||
|
sendToSummary: (id: string) => `${kpiEvaluation}/summary/${id}`,
|
||||||
|
updatePoint: (id: string) => `${kpiEvaluation}/point/${id}`,
|
||||||
|
openPoint: (id: string) => `${kpiEvaluation}/open/${id}`,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -105,12 +105,7 @@ function onSubmitAdd() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.put(
|
.put(
|
||||||
config.API.kpiCommentP(
|
config.API.kpiCommentP("progress", type.value, "user", idList.value),
|
||||||
"progress",
|
|
||||||
type.value,
|
|
||||||
store.rolePerson.toLocaleLowerCase(),
|
|
||||||
idList.value
|
|
||||||
),
|
|
||||||
{
|
{
|
||||||
reason: formDataAdd.reason,
|
reason: formDataAdd.reason,
|
||||||
topic: formDataAdd.topic,
|
topic: formDataAdd.topic,
|
||||||
|
|
|
||||||
|
|
@ -23,10 +23,10 @@ const route = useRoute();
|
||||||
const id = ref<string>(route.params.id as string);
|
const id = ref<string>(route.params.id as string);
|
||||||
const isReadonly = <boolean>(route.name === "KPIEditEvaluator" ? true : false);
|
const isReadonly = <boolean>(route.name === "KPIEditEvaluator" ? true : false);
|
||||||
|
|
||||||
const plannedPoint = ref<string>("");
|
// const plannedPoint = ref<string>("");
|
||||||
const rolePoint = ref<string>("");
|
// const rolePoint = ref<string>("");
|
||||||
const specialPoint = ref<string>("");
|
// const specialPoint = ref<string>("");
|
||||||
const capacityPoint = ref<string>("");
|
// const capacityPoint = ref<string>("");
|
||||||
|
|
||||||
const store = useKpiDataStore();
|
const store = useKpiDataStore();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
@ -71,11 +71,11 @@ async function fetchEvaluation() {
|
||||||
|
|
||||||
fetchProfile(data.profileId);
|
fetchProfile(data.profileId);
|
||||||
|
|
||||||
plannedPoint.value = data.plannedPoint == null ? "" : data.plannedPoint;
|
// plannedPoint.value = data.plannedPoint == null ? "" : data.plannedPoint;
|
||||||
rolePoint.value = data.rolePoint == null ? "" : data.rolePoint;
|
// rolePoint.value = data.rolePoint == null ? "" : data.rolePoint;
|
||||||
specialPoint.value = data.specialPoint == null ? "" : data.specialPoint;
|
// specialPoint.value = data.specialPoint == null ? "" : data.specialPoint;
|
||||||
capacityPoint.value =
|
// capacityPoint.value =
|
||||||
data.capacityPoint == null ? "" : data.capacityPoint;
|
// data.capacityPoint == null ? "" : data.capacityPoint;
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -317,12 +317,12 @@ function openStatus() {
|
||||||
modalStatus.value = true;
|
modalStatus.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendToCommander() {
|
function sendToEvauator() {
|
||||||
dialogConfirm($q, () => {
|
dialogConfirm($q, () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.post(config.API.sendToCommander, {
|
.post(config.API.sendToCommander, {
|
||||||
status: "EVALUATING",
|
evaluationStatus: "EVALUATING",
|
||||||
id: [store.dataEvaluation.id],
|
id: [store.dataEvaluation.id],
|
||||||
})
|
})
|
||||||
.then(async (res) => {
|
.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 () => {
|
onMounted(async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await getAll();
|
await getAll();
|
||||||
|
|
@ -412,9 +432,11 @@ onMounted(async () => {
|
||||||
<div class="q-gutter-x-sm">
|
<div class="q-gutter-x-sm">
|
||||||
<span
|
<span
|
||||||
v-if="
|
v-if="
|
||||||
(store.dataEvaluation.posExecutiveName == null &&
|
(store.dataEvaluation.posTypeName != 'อำนวยการ' &&
|
||||||
|
store.dataEvaluation.posTypeName != 'บริหาร' &&
|
||||||
store.indicatorWeightTotal != 100) ||
|
store.indicatorWeightTotal != 100) ||
|
||||||
(store.dataEvaluation.posExecutiveName != null &&
|
(store.dataEvaluation.posTypeName == 'อำนวยการ' &&
|
||||||
|
store.dataEvaluation.posTypeName == 'บริหาร' &&
|
||||||
(store.indicatorWeight1Total != 100 ||
|
(store.indicatorWeight1Total != 100 ||
|
||||||
store.indicatorWeight2Total != 20) &&
|
store.indicatorWeight2Total != 20) &&
|
||||||
store.dataEvaluation.evaluationStatus == 'NEW')
|
store.dataEvaluation.evaluationStatus == 'NEW')
|
||||||
|
|
@ -429,9 +451,11 @@ onMounted(async () => {
|
||||||
store.dataEvaluation.evaluationStatus == 'NEW'
|
store.dataEvaluation.evaluationStatus == 'NEW'
|
||||||
"
|
"
|
||||||
:disabled="
|
:disabled="
|
||||||
(store.dataEvaluation.posExecutiveName == null &&
|
(store.dataEvaluation.posTypeName != 'อำนวยการ' &&
|
||||||
|
store.dataEvaluation.posTypeName != 'บริหาร' &&
|
||||||
store.indicatorWeightTotal != 100) ||
|
store.indicatorWeightTotal != 100) ||
|
||||||
(store.dataEvaluation.posExecutiveName != null &&
|
(store.dataEvaluation.posTypeName == 'อำนวยการ' &&
|
||||||
|
store.dataEvaluation.posTypeName == 'บริหาร' &&
|
||||||
(store.indicatorWeight1Total != 100 ||
|
(store.indicatorWeight1Total != 100 ||
|
||||||
store.indicatorWeight2Total != 20))
|
store.indicatorWeight2Total != 20))
|
||||||
"
|
"
|
||||||
|
|
@ -456,7 +480,7 @@ onMounted(async () => {
|
||||||
color="grey-2"
|
color="grey-2"
|
||||||
text-color="blue-6"
|
text-color="blue-6"
|
||||||
size="md"
|
size="md"
|
||||||
@click="sendToCommander"
|
@click="sendToEvauator"
|
||||||
>
|
>
|
||||||
<q-tooltip>ทำการประเมิน</q-tooltip>
|
<q-tooltip>ทำการประเมิน</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
@ -499,6 +523,28 @@ onMounted(async () => {
|
||||||
<q-tooltip>ขอแก้ไขข้อตกลง</q-tooltip>
|
<q-tooltip>ขอแก้ไขข้อตกลง</q-tooltip>
|
||||||
</q-btn>
|
</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
|
<q-btn
|
||||||
unelevated
|
unelevated
|
||||||
round
|
round
|
||||||
|
|
@ -597,7 +643,8 @@ onMounted(async () => {
|
||||||
<span class="text-grey-6 col">คะแนนประเมิน</span>
|
<span class="text-grey-6 col">คะแนนประเมิน</span>
|
||||||
<span class="text-weight-medium text-primary col">
|
<span class="text-weight-medium text-primary col">
|
||||||
{{
|
{{
|
||||||
store.dataEvaluation.posExecutiveName == null
|
store.dataEvaluation.posTypeName != "อำนวยการ" &&
|
||||||
|
store.dataEvaluation.posTypeName != "บริหาร"
|
||||||
? (
|
? (
|
||||||
store.indicatorScoreVal +
|
store.indicatorScoreVal +
|
||||||
store.competencyScoreVal +
|
store.competencyScoreVal +
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue