salary ==> ปรับ API

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-08-29 10:25:35 +07:00
parent 376a613b80
commit ac53080cec
7 changed files with 26 additions and 14 deletions

View file

@ -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