salary ==> ปรับ API
This commit is contained in:
parent
376a613b80
commit
ac53080cec
7 changed files with 26 additions and 14 deletions
|
|
@ -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(
|
|||
<div class="q-mb-xs text-center text-grey" v-if="position">
|
||||
{{ position }}
|
||||
</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
|
||||
class="bg-white"
|
||||
outline
|
||||
|
|
|
|||
|
|
@ -103,12 +103,7 @@ const visibleColumns = ref<string[]>([
|
|||
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;
|
||||
})
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ const visibleColumns = ref<string[]>([
|
|||
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(() => {
|
|||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" >
|
||||
<q-tr :props="props">
|
||||
<q-td v-for="col in props.cols" :key="col.id">
|
||||
<div class="table_ellipsis">
|
||||
{{ col.value ? col.value : "-" }}
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ const visibleColumns = ref<string[]>([
|
|||
function fetchListSalary() {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.profileListSalaryNew(profileId.value, employeeClass.value))
|
||||
.get(config.API.salaryListCard(profileId.value, employeeClass.value))
|
||||
.then((res) => {
|
||||
rows.value = res.data.result;
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue