diff --git a/src/modules/08_KPI/components/Evaluator/02_TabOther.vue b/src/modules/08_KPI/components/Evaluator/02_TabOther.vue
index b081981..4c89395 100644
--- a/src/modules/08_KPI/components/Evaluator/02_TabOther.vue
+++ b/src/modules/08_KPI/components/Evaluator/02_TabOther.vue
@@ -119,7 +119,11 @@ function onClickApprove(type: string = "") {
:visible-columns="visibleColumns"
v-model:pagination="pagination"
@update:pagination="props.updatePagination"
- selection="multiple"
+ :selection="
+ store.tabMainevaluator === '5' || store.tabMainevaluator === '6'
+ ? 'none'
+ : 'multiple'
+ "
v-model:selected="store.selected"
>
@@ -218,17 +222,7 @@ function onClickApprove(type: string = "") {
-
-
+
diff --git a/src/modules/08_KPI/components/Tab/04_Result.vue b/src/modules/08_KPI/components/Tab/04_Result.vue
new file mode 100644
index 0000000..b719c25
--- /dev/null
+++ b/src/modules/08_KPI/components/Tab/04_Result.vue
@@ -0,0 +1,3 @@
+
+ สรุปผลการประเมิน
+
diff --git a/src/modules/08_KPI/components/Tab/TabMain.vue b/src/modules/08_KPI/components/Tab/TabMain.vue
index d613417..dc898cd 100644
--- a/src/modules/08_KPI/components/Tab/TabMain.vue
+++ b/src/modules/08_KPI/components/Tab/TabMain.vue
@@ -4,7 +4,7 @@ import { useKpiDataStore } from "@/modules/08_KPI/store";
import { useRoute } from "vue-router";
import Assessment from "@/modules/08_KPI/components/Tab/01_Assessment.vue";
-import Evaluator from "@/modules/08_KPI/components/Tab/02_Evaluator.vue";
+import Result from "@/modules/08_KPI/components/Tab/04_Result.vue";
import CommanderAbove from "@/modules/08_KPI/components/Tab/03_CommanderAbove.vue";
import CommanderAboveOneStep from "@/modules/08_KPI/components/Tab/04_CommanderAboveOneStep.vue";
import File from "@/modules/08_KPI/components/Tab/05_File.vue";
@@ -25,6 +25,10 @@ const itemsTab = ref([
name: "3",
label: "รายงานผลสำเร็จของงาน",
},
+ {
+ name: "4",
+ label: "สรุปผลการประเมิน",
+ },
{
name: "5",
label: "ไฟล์เอกสาร",
@@ -59,6 +63,7 @@ const splitterModel = ref(12);
label="รายงานผลสำเร็จของงาน"
:disable="store.tabOpen < 3"
/>
+
@@ -81,7 +86,7 @@ const splitterModel = ref(12);
-
+
diff --git a/src/modules/08_KPI/components/Tab/Topic/01_Indicator.vue b/src/modules/08_KPI/components/Tab/Topic/01_Indicator.vue
index c399fef..ff6ad24 100644
--- a/src/modules/08_KPI/components/Tab/Topic/01_Indicator.vue
+++ b/src/modules/08_KPI/components/Tab/Topic/01_Indicator.vue
@@ -47,7 +47,7 @@ const visibleColumns = ref(
"achievement",
"evaluationResults",
]
- : ["includingName", "target", "weight"]
+ : ["includingName", "target", "point", "weight"]
);
const columns = ref([
{
diff --git a/src/modules/08_KPI/components/Tab/Topic/02_Competency.vue b/src/modules/08_KPI/components/Tab/Topic/02_Competency.vue
index 1d91d35..6959244 100644
--- a/src/modules/08_KPI/components/Tab/Topic/02_Competency.vue
+++ b/src/modules/08_KPI/components/Tab/Topic/02_Competency.vue
@@ -108,7 +108,7 @@ const columns = ref([
const visibleColumns = ref(
store.tabOpen === 3 && store.tabMain === "3"
? ["name", "level", "point", "weight", "summary"]
- : ["name", "level", "weight"]
+ : ["name", "level", "point", "weight"]
);
const typeCompetency = ref("");
diff --git a/src/modules/08_KPI/store.ts b/src/modules/08_KPI/store.ts
index 01fc798..f599450 100644
--- a/src/modules/08_KPI/store.ts
+++ b/src/modules/08_KPI/store.ts
@@ -130,31 +130,37 @@ export const useKpiDataStore = defineStore("KPIDate", () => {
}
async function checkCompetency() {
- const position = await dataEvaluation.value.position;
- const executiveName = await dataEvaluation.value.posExecutiveName;
+ // const position = await dataEvaluation.value.position;
+ // const executiveName = await dataEvaluation.value.posExecutiveName;
+ const posTypeName = dataEvaluation.value.posTypeName;
+ const posLevelName = dataEvaluation.value.posLevelName;
- if (
- position == "ผู้ตรวจราชการกรุงเทพมหานคร" ||
- position == "ผู้ตรวจราชการ"
- ) {
+ // if (
+ // position == "ผู้ตรวจราชการกรุงเทพมหานคร" ||
+ // position == "ผู้ตรวจราชการ"
+ // ) {
+ // competencyType.value = competencyType.value.filter(
+ // (x: DataOptions) => x.id == "HEAD" || x.id == "INSPECTOR"
+ // );
+ // } else if (position == "ผู้อำนวยการเขต") {
+ // competencyType.value = competencyType.value.filter(
+ // (x: DataOptions) => x.id == "HEAD" || x.id == "DIRECTOR"
+ // );
+ // } else {
+ if (posTypeName == "อำนวยการ" || posTypeName == "บริหาร") {
competencyType.value = competencyType.value.filter(
- (x: DataOptions) => x.id == "HEAD" || x.id == "INSPECTOR"
- );
- } else if (position == "ผู้อำนวยการเขต") {
- competencyType.value = competencyType.value.filter(
- (x: DataOptions) => x.id == "HEAD" || x.id == "DIRECTOR"
+ (x: DataOptions) =>
+ x.id == "HEAD" ||
+ x.id == "EXECUTIVE" ||
+ x.id == "INSPECTOR" ||
+ x.id == "DIRECTOR"
);
} else {
- if (executiveName == null) {
- competencyType.value = competencyType.value.filter(
- (x: DataOptions) => x.id == "HEAD" || x.id == "GROUP"
- );
- } else {
- competencyType.value = competencyType.value.filter(
- (x: DataOptions) => x.id == "HEAD" || x.id == "EXECUTIVE"
- );
- }
+ competencyType.value = competencyType.value.filter(
+ (x: DataOptions) => x.id == "HEAD" || x.id == "GROUP"
+ );
}
+ // }
}
const defaultCompetencyCoreLevel = ref();
@@ -231,18 +237,18 @@ export const useKpiDataStore = defineStore("KPIDate", () => {
const rolePerson = ref("USER"); //"USER" | "EVALUATOR" | "COMMANDER", "COMMANDERHIGH"
const tabOpen = ref(1);
async function checkStep() {
- const role =
-
- dataEvaluation.value.profileId == await dataProfile.value.profileId
- ? "USER"
- : dataEvaluation.value.evaluatorId == await dataProfile.value.profileId
- ? "EVALUATOR"
- : dataEvaluation.value.commanderId == await dataProfile.value.profileId
- ? "COMMANDER"
- : dataEvaluation.value.commanderHighId == await dataProfile.value.profileId
- ? "COMMANDERHIGH"
- : "";
- console.log("🚀 ~ checkStep ~ role:", role)
+ const role = await (dataEvaluation.value.profileId ==
+ dataProfile.value.profileId
+ ? "USER"
+ : dataEvaluation.value.evaluatorId == (await dataProfile.value.profileId)
+ ? "EVALUATOR"
+ : dataEvaluation.value.commanderId == (await dataProfile.value.profileId)
+ ? "COMMANDER"
+ : dataEvaluation.value.commanderHighId ==
+ (await dataProfile.value.profileId)
+ ? "COMMANDERHIGH"
+ : "");
+ // console.log("🚀 ~ checkStep ~ role:", role);
rolePerson.value = role;
switch (dataEvaluation.value.evaluationStatus) {