diff --git a/src/api/14_KPI/api.KPI.ts b/src/api/14_KPI/api.KPI.ts index c2a3ea2c2..5149ddd7c 100644 --- a/src/api/14_KPI/api.KPI.ts +++ b/src/api/14_KPI/api.KPI.ts @@ -2,22 +2,23 @@ import env from "../index"; const KPI = `${env.API_URI}/kpi`; const kpiPeriod = `${env.API_URI}/kpi/period`; const kpiEvaluation = `${env.API_URI}/kpi/evaluation`; +const kpiUserEvaluation = `${env.API_URI}/kpi/user/evaluation`; +const kpiAchievement = `${env.API_URI}/kpi/user/achievement`; const kpiGroup = `${env.API_URI}/kpi/group`; const kpiPlan = `${env.API_URI}/kpi/plan`; const kpiCapacity = `${env.API_URI}/kpi/capacity`; const kpiLink = `${env.API_URI}/kpi/link`; +const KpiUser = `${env.API_URI}/kpi/user`; export default { KPI, /** รอบการประเมินผล*/ - kpiPeriod: `${kpiPeriod}`, + kpiPeriod, kpiPeriodById: (id: string) => `${kpiPeriod}/${id}`, kpiEvaluation, - /** role */ - kpiRoleMainList:`${KPI}/role`, + kpiRoleMainList: `${KPI}/role`, - kpiGroup, kpiGroupById: (id: string) => `${kpiGroup}/${id}`, kpiPlan, @@ -27,4 +28,10 @@ export default { kpiCapacity, kpiLink, + + kpiUserEvaluation, + profilePosition: () => `${env.API_URI}/org/profile/keycloak/position`, + kpiAchievement: (type: string) => `${kpiAchievement}/${type}`, + kpiAchievementPoint: (type: string) => `${kpiAchievement}/${type}/point`, + kpiUserCapacity: `${KpiUser}/capacity`, }; diff --git a/src/interface/request/main/main.ts b/src/interface/request/main/main.ts index 3f5609d8c..d8424ad5a 100644 --- a/src/interface/request/main/main.ts +++ b/src/interface/request/main/main.ts @@ -614,6 +614,11 @@ const menuList = readonly([ path: "KPIRound", role: "evaluateKPI", }, + { + label: "รายการการประเมินผล", + path: "KPI​List", + role: "evaluateKPI", + }, ], }, { diff --git a/src/modules/09_leave/components/2_Leave/Tab1.vue b/src/modules/09_leave/components/2_Leave/Tab1.vue index 5a42d3f3d..9723b991e 100644 --- a/src/modules/09_leave/components/2_Leave/Tab1.vue +++ b/src/modules/09_leave/components/2_Leave/Tab1.vue @@ -33,6 +33,7 @@ const querySting = reactive({ keyword: leaveStore.filter.keyword, //keyword ค้นหา }); const maxPage = ref(1); +const totalList = ref(0); //** เรียกข้อมูลจาก API*/ async function fecthLeaveList() { @@ -50,6 +51,7 @@ async function fecthLeaveList() { .then((res) => { const data = res.data.result; maxPage.value = Math.ceil(data.total / querySting.pageSize); + totalList.value = data.total; leaveStore.fetchListLeave(data.data); /** ส่งข้อมูลไป stores*/ }) .catch((err) => { @@ -143,6 +145,7 @@ watch( :page="querySting.page" :rowsPerPage="querySting.pageSize" :maxPage="maxPage" + :totalList="totalList" @update:querySting="updatePaging" /> diff --git a/src/modules/09_leave/components/2_Leave/Tab2.vue b/src/modules/09_leave/components/2_Leave/Tab2.vue index 4ac1621ac..722afc7b2 100644 --- a/src/modules/09_leave/components/2_Leave/Tab2.vue +++ b/src/modules/09_leave/components/2_Leave/Tab2.vue @@ -33,6 +33,7 @@ const querySting = reactive({ keyword: leaveStore.filter.keyword, //keyword ค้นหา }); const maxPage = ref(1); +const totalList = ref(0); //** เรียกข้อมูลจาก API*/ async function fecthLeaveList() { @@ -50,6 +51,7 @@ async function fecthLeaveList() { .then((res) => { const data = res.data.result; maxPage.value = Math.ceil(data.total / querySting.pageSize); + totalList.value = data.tatol; fetchListLeaveReject(data.data); /** ส่งข้อมูลไป stores*/ }) .catch((err) => { @@ -96,6 +98,7 @@ onMounted(async () => { :page="querySting.page" :rowsPerPage="querySting.pageSize" :maxPage="maxPage" + :totalList="totalList" @update:querySting="updatePaging" /> diff --git a/src/modules/09_leave/components/2_Leave/TableList.vue b/src/modules/09_leave/components/2_Leave/TableList.vue index caf17aea7..7a20ae936 100644 --- a/src/modules/09_leave/components/2_Leave/TableList.vue +++ b/src/modules/09_leave/components/2_Leave/TableList.vue @@ -202,6 +202,10 @@ const props = defineProps({ type: Number, require: true, }, + totalList: { + type: Number, + require: true, + }, }); const emit = defineEmits(["update:querySting"]); @@ -291,6 +295,7 @@ onMounted(() => { diff --git a/src/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue b/src/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue index 6e32a2f55..106b26497 100644 --- a/src/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue +++ b/src/modules/11_discipline/components/2_InvestigateFacts/MainPage.vue @@ -30,6 +30,7 @@ const currentPage = ref(1); const maxPage = ref(1); const page = ref(1); const rowsPerPage = ref(10); +const toptitle = ref(0); /** *pagination ของตาราง @@ -70,6 +71,8 @@ async function getList() { ) .then((res) => { maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value); + toptitle.value = res.data.result.total; + const data = res.data.result.data; dataInvestigate.fecthList(data); }) @@ -181,17 +184,6 @@ onMounted(async () => { v-model:pagination="pagination" :rows-per-page-options="[10, 25, 50, 100]" > - + diff --git a/src/modules/11_discipline/components/3_InvestigateDisciplinary/MainPage.vue b/src/modules/11_discipline/components/3_InvestigateDisciplinary/MainPage.vue index 5756dd897..83a53d4f2 100644 --- a/src/modules/11_discipline/components/3_InvestigateDisciplinary/MainPage.vue +++ b/src/modules/11_discipline/components/3_InvestigateDisciplinary/MainPage.vue @@ -22,6 +22,8 @@ const router = useRouter(); const filter = ref(""); //search data table const page = ref(1); const maxPage = ref(1); +const totalList = ref(); + const status = ref("NEW"); async function fetchListDisciplinary() { showLoader(); @@ -33,6 +35,7 @@ async function fetchListDisciplinary() { .then((res) => { const data = res.data.result.data; maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value); + totalList.value = res.data.result.total; fetchList(data); }) .catch((err) => {}) @@ -57,7 +60,7 @@ async function updatePagingProp(rowPerpage: number, pageCurrent: number) { function filterStatus(statusReturn: string) { status.value = statusReturn; - fetchListDisciplinary() + fetchListDisciplinary(); } /**เมื่อเริ่มโหลดหน้า @@ -88,6 +91,7 @@ onMounted(async () => { :rowsPerPage="rowsPerPage" :page="page" :maxPage="maxPage" + :totalList="totalList" :fetchListDisciplinary="fetchListDisciplinary" @update:pagination="updatePagingProp" v-model:open-edit="openEdit" diff --git a/src/modules/11_discipline/components/3_InvestigateDisciplinary/Table.vue b/src/modules/11_discipline/components/3_InvestigateDisciplinary/Table.vue index 0029abe53..32f31e61a 100644 --- a/src/modules/11_discipline/components/3_InvestigateDisciplinary/Table.vue +++ b/src/modules/11_discipline/components/3_InvestigateDisciplinary/Table.vue @@ -61,6 +61,10 @@ const props = defineProps({ type: Number, require: true, }, + totalList: { + type: Number, + require: true, + }, }); const emit = defineEmits([ @@ -195,6 +199,7 @@ function filterFn() { :rows-per-page-options="[10, 25, 50, 100]" >