สิทธิ์ / rating เปลี่ยนเป็น btn group

This commit is contained in:
STW_TTTY\stwtt 2024-08-01 15:38:46 +07:00
parent c6d4f5f0e3
commit 006a492834
22 changed files with 2248 additions and 2718 deletions

View file

@ -16,6 +16,7 @@ import type { ResAssignment } from "@/modules/01_masterdata/interface/response/M
/** importStore*/
import { useCounterMixin } from "@/stores/mixin";
import { checkPermission } from "@/utils/permissions";
const $q = useQuasar();
const router = useRouter();
@ -256,7 +257,7 @@ onMounted(() => {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width />
<q-th auto-width v-if="checkPermission($route)?.attrIsGet || checkPermission($route)?.attrIsDelete"/>
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
@ -264,8 +265,9 @@ onMounted(() => {
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td auto-width>
<q-td auto-width v-if="checkPermission($route)?.attrIsGet || checkPermission($route)?.attrIsDelete">
<q-btn
v-if="checkPermission($route)?.attrIsGet"
flat
round
color="primary"
@ -276,6 +278,7 @@ onMounted(() => {
<q-tooltip>อม</q-tooltip>
</q-btn>
<q-btn
v-if="checkPermission($route)?.attrIsDelete"
flat
round
color="red"