updated kpi

This commit is contained in:
Warunee Tamkoo 2024-06-26 20:24:39 +07:00
parent f7f0198613
commit c7cda1c7ba
11 changed files with 185 additions and 78 deletions

View file

@ -32,6 +32,11 @@ const {
success,
} = mixin;
const isUpdate = defineModel("isUpdate", {
type: Boolean,
default: false,
});
const formData = reactive({
isDevelopment70: false,
isDevelopment20: false,
@ -121,6 +126,24 @@ function getDevelop() {
(sum: number, e: any) => sum + e.summary,
0
);
if (
store.isUpdate &&
store.tabMain === "3" &&
(store.dataEvaluation.evaluationStatus === "EVALUATOR" ||
store.dataEvaluation.evaluationStatus === "EVALUATING_EVALUATOR")
) {
http
.put(config.API.updatePoint(store.dataEvaluation.id), {
totalPoint2_2: store.devScoreVal.toFixed(2),
summaryPoint: (
store.indicatorScoreVal +
store.competencyScoreVal +
store.devScoreVal
).toFixed(2),
})
.then((res) => {});
}
});
}
@ -181,7 +204,7 @@ const isEditStep3 = computed(() => {
store.tabMain === "3") ||
(store.dataEvaluation.evaluationStatus === "EVALUATING_EVALUATOR" &&
store.rolePerson === "EVALUATOR" &&
store.tabMain === "3")||
store.tabMain === "3") ||
(store.dataEvaluation.evaluationStatus === "EVALUATING" &&
store.rolePerson === "EVALUATOR" &&
store.tabMain === "3")