salary ==> ปรับ API
This commit is contained in:
parent
376a613b80
commit
ac53080cec
7 changed files with 26 additions and 14 deletions
|
|
@ -94,7 +94,8 @@ export default {
|
||||||
orgProfileEmp: `${orgEmployeePos}/profile`,
|
orgProfileEmp: `${orgEmployeePos}/profile`,
|
||||||
orgSearchProfileEmp: `${orgProfile}-employee/search`,
|
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`,
|
orgDeceasedProfile: `${orgPos}/profile/search`,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -128,6 +128,8 @@ export default {
|
||||||
`${registryNew}${type}/discipline/${disciplineId}`,
|
`${registryNew}${type}/discipline/${disciplineId}`,
|
||||||
profileNewDisciplineHisByDisciplineId: (disciplineId: string, type: string) =>
|
profileNewDisciplineHisByDisciplineId: (disciplineId: string, type: string) =>
|
||||||
`${registryNew}${type}/discipline/history/${disciplineId}`,
|
`${registryNew}${type}/discipline/history/${disciplineId}`,
|
||||||
|
disciplineListCard: (profileId: string, type: string) =>
|
||||||
|
`${registryNew}${type}/discipline/admin/${profileId}`, // noPermission
|
||||||
|
|
||||||
// ปฏิบัติราชการพิเศษ
|
// ปฏิบัติราชการพิเศษ
|
||||||
profileNewDuty: (type: string) => `${registryNew}${type}/duty`,
|
profileNewDuty: (type: string) => `${registryNew}${type}/duty`,
|
||||||
|
|
@ -153,6 +155,8 @@ export default {
|
||||||
`${registryNew}${type}/leave/history/${id}`,
|
`${registryNew}${type}/leave/history/${id}`,
|
||||||
profileCheckDate: () => `${env.API_URI}/leave/user/check`,
|
profileCheckDate: () => `${env.API_URI}/leave/user/check`,
|
||||||
profileNewLeaveType: () => `${env.API_URI}/leave/type`,
|
profileNewLeaveType: () => `${env.API_URI}/leave/type`,
|
||||||
|
leaveListCard: (id: string, type: string) =>
|
||||||
|
`${registryNew}${type}/leave/admin/${id}`, //noPermission
|
||||||
|
|
||||||
/** ตำแหน่งเงินเดือน*/
|
/** ตำแหน่งเงินเดือน*/
|
||||||
profileSalaryNew: (type: string) => `${registryNew}${type}/salary`,
|
profileSalaryNew: (type: string) => `${registryNew}${type}/salary`,
|
||||||
|
|
@ -162,6 +166,8 @@ export default {
|
||||||
`${registryNew}${type}/salary/history/${profileId}`,
|
`${registryNew}${type}/salary/history/${profileId}`,
|
||||||
profileSalarySwapNew: (type: string, id: string, type2: string) =>
|
profileSalarySwapNew: (type: string, id: string, type2: string) =>
|
||||||
`${registryNew}${type2}/salary/swap/${type}/${id}`,
|
`${registryNew}${type2}/salary/swap/${type}/${id}`,
|
||||||
|
salaryListCard: (id: string, type: string) =>
|
||||||
|
`${registryNew}${type}/salary/admin/${id}`, //noPermission
|
||||||
|
|
||||||
// ประวัติการเปลี่ยนชื่อ-นามสกุล
|
// ประวัติการเปลี่ยนชื่อ-นามสกุล
|
||||||
profileNewChangeName: (type: string) => `${registryNew}${type}/changeName`,
|
profileNewChangeName: (type: string) => `${registryNew}${type}/changeName`,
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import { useQuasar } from "quasar";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
import { checkPermissionGet } from "@/utils/permissions";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* importCOmponents
|
* importCOmponents
|
||||||
|
|
@ -48,12 +49,13 @@ function fetchInformation() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.orgProfileById(profileId.value, props.employeeClass))
|
.get(config.API.orgProfileById(profileId.value, props.employeeClass))
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
fullName.value = `${data.prefix}${data.firstName} ${data.lastName}`;
|
fullName.value = `${data.prefix}${data.firstName} ${data.lastName}`;
|
||||||
position.value = data.position;
|
position.value = data.position;
|
||||||
|
|
||||||
if (data.avatarName) {
|
if (data.avatarName) {
|
||||||
fetchProfile(data.id as string, data.avatarName);
|
await fetchProfile(data.id as string, data.avatarName);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|
@ -133,7 +135,15 @@ watch(
|
||||||
<div class="q-mb-xs text-center text-grey" v-if="position">
|
<div class="q-mb-xs text-center text-grey" v-if="position">
|
||||||
{{ position }}
|
{{ position }}
|
||||||
</div>
|
</div>
|
||||||
<div class="q-mt-md">
|
|
||||||
|
<div
|
||||||
|
class="q-mt-md"
|
||||||
|
v-if="
|
||||||
|
props.employeeClass === '-employee'
|
||||||
|
? checkPermissionGet('SYS_REGISTRY_EMP')
|
||||||
|
: checkPermissionGet('SYS_REGISTRY_OFFICER')
|
||||||
|
"
|
||||||
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
class="bg-white"
|
class="bg-white"
|
||||||
outline
|
outline
|
||||||
|
|
|
||||||
|
|
@ -103,12 +103,7 @@ const visibleColumns = ref<string[]>([
|
||||||
function fetchListDiscipline() {
|
function fetchListDiscipline() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(
|
.get(config.API.disciplineListCard(profileId.value, employeeClass.value))
|
||||||
config.API.profileNewDisciplineByProfileId(
|
|
||||||
profileId.value,
|
|
||||||
employeeClass.value
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
rows.value = res.data.result;
|
rows.value = res.data.result;
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ const visibleColumns = ref<string[]>([
|
||||||
function fetchListSalary() {
|
function fetchListSalary() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.profileNewLeaveById(profileId.value, employeeClass.value))
|
.get(config.API.leaveListCard(profileId.value, employeeClass.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
rows.value = res.data.result;
|
rows.value = res.data.result;
|
||||||
})
|
})
|
||||||
|
|
@ -203,7 +203,7 @@ onMounted(() => {
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props" >
|
<q-tr :props="props">
|
||||||
<q-td v-for="col in props.cols" :key="col.id">
|
<q-td v-for="col in props.cols" :key="col.id">
|
||||||
<div class="table_ellipsis">
|
<div class="table_ellipsis">
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@ const visibleColumns = ref<string[]>([
|
||||||
function fetchListSalary() {
|
function fetchListSalary() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.profileListSalaryNew(profileId.value, employeeClass.value))
|
.get(config.API.salaryListCard(profileId.value, employeeClass.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
rows.value = res.data.result;
|
rows.value = res.data.result;
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ export function checkPermissionList(sys: string[]) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function checkPermissionGet(sys: string[]) {
|
export function checkPermissionGet(sys: string ) {
|
||||||
if (storeMenu.permissions && sys) {
|
if (storeMenu.permissions && sys) {
|
||||||
return (
|
return (
|
||||||
storeMenu.permissions.roles.some(
|
storeMenu.permissions.roles.some(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue