รักษาการในตำแหน่ง => permission

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-08-08 15:24:51 +07:00
parent 350c76d965
commit 428613f4f4

View file

@ -261,6 +261,7 @@ onMounted(() => {
</div>
<q-card style="height: 100%">
<q-card-section :horizontal="$q.screen.gt.sm">
<!-- โครงสราง -->
<q-card-section class="col-lg-3 col-md-4 col-xs-12 q-gutter-sm">
<div>
<q-input dense outlined v-model="filter" label="ค้นหา">
@ -311,11 +312,8 @@ onMounted(() => {
<template v-slot:default-body="prop">
<div v-if="prop.node.posMaster">
<q-list dense v-for="col in prop.node.posMaster">
{{ checkPermission($route)?.attrIsGet }}
<q-item
:clickable="
checkPermission($route)?.attrIsGet ? false : true
"
:clickable="checkPermission($route)?.attrIsGet"
:active="posmasterId == col.posmasterId"
:class="posmasterId !== col.posmasterId ? 'text-info' : ''"
active-class="my-list-link text-primary text-weight-medium"
@ -335,6 +333,7 @@ onMounted(() => {
<q-separator :vertical="$q.screen.gt.xs" />
<!-- รายช -->
<q-card-section
v-if="posmasterId"
class="col-lg-9 col-md-8 col-xs-12 scroll"
@ -400,12 +399,21 @@ onMounted(() => {
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-tr
:props="props"
:class="
checkPermission($route)?.attrIsUpdate &&
'cursor-pointer'
"
>
<q-td
v-for="col in props.cols"
:key="col.name"
:props="props"
@click="selectPosition(props.row)"
@click="
checkPermission($route)?.attrIsUpdate &&
selectPosition(props.row)
"
>
<div v-if="col.name === 'no'">
{{ props.rowIndex + 1 }}
@ -474,8 +482,20 @@ onMounted(() => {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width v-if="rowListPerson.length !== 1" />
<q-th auto-width v-if="rowListPerson.length !== 1" />
<q-th
auto-width
v-if="
rowListPerson.length !== 1 &&
checkPermission($route)?.attrIsUpdate
"
/>
<q-th
auto-width
v-if="
rowListPerson.length !== 1 &&
checkPermission($route)?.attrIsUpdate
"
/>
<q-th auto-width />
<q-th
v-for="col in props.cols"
@ -490,10 +510,15 @@ onMounted(() => {
</template>
<template v-slot:body="props">
<q-tr :props="props">
<q-td auto-width v-if="rowListPerson.length !== 1">
<q-td
auto-width
v-if="
rowListPerson.length !== 1 &&
checkPermission($route)?.attrIsUpdate
"
>
<q-btn
dense
size="12px"
flat
round
:color="props.rowIndex + 1 == 1 ? 'grey' : 'green'"
@ -504,10 +529,15 @@ onMounted(() => {
<!-- <q-tooltip>เลอนลำดบข</q-tooltip> -->
</q-btn>
</q-td>
<q-td auto-width v-if="rowListPerson.length !== 1">
<q-td
auto-width
v-if="
rowListPerson.length !== 1 &&
checkPermission($route)?.attrIsUpdate
"
>
<q-btn
dense
size="12px"
flat
round
:color="
@ -524,10 +554,10 @@ onMounted(() => {
<!-- <q-tooltip>เลอนลำดบลง</q-tooltip> -->
</q-btn>
</q-td>
<q-td>
<q-td auto-width>
<q-btn
v-if="checkPermission($route)?.attrIsDelete"
dense
size="12px"
flat
round
color="red"