diff --git a/src/api/02_organizational/api.organization.ts b/src/api/02_organizational/api.organization.ts index c6ec1dc18..1d896ba6d 100644 --- a/src/api/02_organizational/api.organization.ts +++ b/src/api/02_organizational/api.organization.ts @@ -94,7 +94,8 @@ export default { orgProfileEmp: `${orgEmployeePos}/profile`, orgSearchProfileEmp: `${orgProfile}-employee/search`, - orgProfileById: (id: string, type: string) => `${orgProfile}${type}/${id}`, + orgProfileById: (id: string, type: string) => + `${orgProfile}${type}/admin/${id}`, orgDeceasedProfile: `${orgPos}/profile/search`, diff --git a/src/api/registry/api.registry.ts b/src/api/registry/api.registry.ts index 93ce13e62..7d68900c4 100644 --- a/src/api/registry/api.registry.ts +++ b/src/api/registry/api.registry.ts @@ -128,6 +128,8 @@ export default { `${registryNew}${type}/discipline/${disciplineId}`, profileNewDisciplineHisByDisciplineId: (disciplineId: string, type: string) => `${registryNew}${type}/discipline/history/${disciplineId}`, + disciplineListCard: (profileId: string, type: string) => + `${registryNew}${type}/discipline/admin/${profileId}`, // noPermission // ปฏิบัติราชการพิเศษ profileNewDuty: (type: string) => `${registryNew}${type}/duty`, @@ -153,6 +155,8 @@ export default { `${registryNew}${type}/leave/history/${id}`, profileCheckDate: () => `${env.API_URI}/leave/user/check`, profileNewLeaveType: () => `${env.API_URI}/leave/type`, + leaveListCard: (id: string, type: string) => + `${registryNew}${type}/leave/admin/${id}`, //noPermission /** ตำแหน่งเงินเดือน*/ profileSalaryNew: (type: string) => `${registryNew}${type}/salary`, @@ -162,6 +166,8 @@ export default { `${registryNew}${type}/salary/history/${profileId}`, profileSalarySwapNew: (type: string, id: string, type2: string) => `${registryNew}${type2}/salary/swap/${type}/${id}`, + salaryListCard: (id: string, type: string) => + `${registryNew}${type}/salary/admin/${id}`, //noPermission // ประวัติการเปลี่ยนชื่อ-นามสกุล profileNewChangeName: (type: string) => `${registryNew}${type}/changeName`, diff --git a/src/modules/13_salary/components/DialogInfoMain.vue b/src/modules/13_salary/components/DialogInfoMain.vue index 1fbfe57e4..19e78a1c8 100644 --- a/src/modules/13_salary/components/DialogInfoMain.vue +++ b/src/modules/13_salary/components/DialogInfoMain.vue @@ -4,6 +4,7 @@ import { useQuasar } from "quasar"; import { useRouter } from "vue-router"; import http from "@/plugins/http"; import config from "@/app.config"; +import { checkPermissionGet } from "@/utils/permissions"; /** * importCOmponents @@ -48,12 +49,13 @@ function fetchInformation() { showLoader(); http .get(config.API.orgProfileById(profileId.value, props.employeeClass)) - .then((res) => { + .then(async (res) => { const data = res.data.result; fullName.value = `${data.prefix}${data.firstName} ${data.lastName}`; position.value = data.position; + if (data.avatarName) { - fetchProfile(data.id as string, data.avatarName); + await fetchProfile(data.id as string, data.avatarName); } }) .catch((err) => { @@ -133,7 +135,15 @@ watch(
{{ position }}
-
+ +
([ function fetchListDiscipline() { showLoader(); http - .get( - config.API.profileNewDisciplineByProfileId( - profileId.value, - employeeClass.value - ) - ) + .get(config.API.disciplineListCard(profileId.value, employeeClass.value)) .then((res) => { rows.value = res.data.result; }) diff --git a/src/modules/13_salary/components/InfoLeave.vue b/src/modules/13_salary/components/InfoLeave.vue index edcdf1846..022788bad 100644 --- a/src/modules/13_salary/components/InfoLeave.vue +++ b/src/modules/13_salary/components/InfoLeave.vue @@ -105,7 +105,7 @@ const visibleColumns = ref([ function fetchListSalary() { showLoader(); http - .get(config.API.profileNewLeaveById(profileId.value, employeeClass.value)) + .get(config.API.leaveListCard(profileId.value, employeeClass.value)) .then((res) => { rows.value = res.data.result; }) @@ -203,7 +203,7 @@ onMounted(() => {