แก้ รายละเอียดข้อมูล

This commit is contained in:
setthawutttty 2025-04-04 14:52:19 +07:00
parent 9a1ce90e11
commit 39b14d7026
2 changed files with 20 additions and 12 deletions

View file

@ -102,7 +102,11 @@ async function fetchInformation(id: string) {
.get( .get(
config.API.orgProfileById( config.API.orgProfileById(
id, id,
`${props.type.toLocaleLowerCase() == "employee" ? `-${props.type.toLocaleLowerCase()}` : ""}` `${
props.type.toLocaleLowerCase() == "employee"
? `-${props.type.toLocaleLowerCase()}`
: ""
}`
) )
) )
.then(async (res) => { .then(async (res) => {
@ -146,7 +150,11 @@ async function fetchProfileGov(id: string) {
.get( .get(
config.API.profileNewGovernmentCard( config.API.profileNewGovernmentCard(
id, id,
`${props.type.toLocaleLowerCase() == "employee" ? `-${props.type.toLocaleLowerCase()}` : ""}` `${
props.type.toLocaleLowerCase() == "employee"
? `-${props.type.toLocaleLowerCase()}`
: ""
}`
) )
) )
.then(async (res) => { .then(async (res) => {
@ -176,7 +184,7 @@ async function fetchProfileGov(id: string) {
function redirecToRegistry() { function redirecToRegistry() {
router.push( router.push(
`/registry-${props.type == "employee" ? "employee" : "officer"}/${props.id}` `/registry-${props.type.toLocaleLowerCase() == "employee" ? "employee" : "officer"}/${props.id}`
); );
modal.value = false; modal.value = false;
} }
@ -222,7 +230,7 @@ async function fetchProfile(id: string, avatarName: string) {
<q-card style="width: 420px; overflow: visible"> <q-card style="width: 420px; overflow: visible">
<q-toolbar> <q-toolbar>
<q-toolbar-title class="text-subtitle1 text-bold" <q-toolbar-title class="text-subtitle1 text-bold"
>ทะเบยนประว{{ props.type }} >ทะเบยนประว
</q-toolbar-title> </q-toolbar-title>
<q-btn <q-btn
icon="close" icon="close"
@ -268,7 +276,7 @@ async function fetchProfile(id: string, avatarName: string) {
<div class="q-mt-md"> <div class="q-mt-md">
<q-btn <q-btn
v-if=" v-if="
empType === 'employee' props.type.toLocaleLowerCase() === 'employee'
? checkPermissionGet('SYS_REGISTRY_EMP') ? checkPermissionGet('SYS_REGISTRY_EMP')
: checkPermissionGet('SYS_REGISTRY_OFFICER') : checkPermissionGet('SYS_REGISTRY_OFFICER')
" "
@ -385,7 +393,7 @@ async function fetchProfile(id: string, avatarName: string) {
readonly readonly
:model-value="goverment.posNo ? goverment.posNo : '-'" :model-value="goverment.posNo ? goverment.posNo : '-'"
:label=" :label="
props.type == 'employee' props.type.toLocaleLowerCase() == 'employee'
? 'ตำแหน่งเลขที่' ? 'ตำแหน่งเลขที่'
: 'เลขที่ตำแหน่ง' : 'เลขที่ตำแหน่ง'
" "
@ -432,7 +440,7 @@ async function fetchProfile(id: string, avatarName: string) {
goverment.positionType ? goverment.positionType : '-' goverment.positionType ? goverment.positionType : '-'
" "
:label=" :label="
props.type == 'employee' props.type.toLocaleLowerCase() == 'employee'
? 'กลุ่มงาน' ? 'กลุ่มงาน'
: 'ตำแหน่งประเภท' : 'ตำแหน่งประเภท'
" "
@ -448,7 +456,7 @@ async function fetchProfile(id: string, avatarName: string) {
: '-' : '-'
" "
:label=" :label="
props.type == 'employee' props.type.toLocaleLowerCase() == 'employee'
? 'ระดับชั้นงาน' ? 'ระดับชั้นงาน'
: 'ระดับตำแหน่ง' : 'ระดับตำแหน่ง'
" "
@ -456,7 +464,7 @@ async function fetchProfile(id: string, avatarName: string) {
</div> </div>
<div <div
class="col-xs-6 col-md-6" class="col-xs-6 col-md-6"
v-if="props.type !== 'employee'" v-if="props.type.toLocaleLowerCase() !== 'employee'"
> >
<q-input <q-input
borderless borderless
@ -471,7 +479,7 @@ async function fetchProfile(id: string, avatarName: string) {
</div> </div>
<div <div
class="col-xs-6 col-md-6" class="col-xs-6 col-md-6"
v-if="props.type !== 'employee'" v-if="props.type.toLocaleLowerCase() !== 'employee'"
> >
<q-input <q-input
borderless borderless
@ -491,7 +499,7 @@ async function fetchProfile(id: string, avatarName: string) {
<q-card <q-card
bordered bordered
style="border: 1px solid #d6dee1" style="border: 1px solid #d6dee1"
v-if="checkRoute && props.type === 'officer'" v-if="checkRoute && props.type.toLocaleLowerCase() === 'officer'"
> >
<CardPosition :id="props.id" :type="props.type" /> <CardPosition :id="props.id" :type="props.type" />
</q-card> </q-card>

View file

@ -42,7 +42,7 @@ async function fetchDataTenure() {
.get( .get(
config.API.salaryTenurePosition( config.API.salaryTenurePosition(
props?.id, props?.id,
props.type === "officer" ? "" : "-employee" props.type.toLocaleLowerCase() === "officer" ? "" : "-employee"
) )
) )
.then((res) => { .then((res) => {