สิทธิ์ / 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

@ -13,6 +13,8 @@ import type {
import http from "@/plugins/http";
import config from "@/app.config";
import { checkPermission } from "@/utils/permissions";
const total = ref<number>();
const modal = ref<boolean>(false);
const rows = ref<any[]>([]);
@ -204,7 +206,14 @@ onMounted(async () => {
<template>
<q-toolbar style="padding: 0">
<q-btn flat round color="primary" icon="add" @click="onAdd()">
<q-btn
v-if="checkPermission($route)?.attrIsCreate"
flat
round
color="primary"
icon="add"
@click="onAdd()"
>
<q-tooltip> เพมขอม </q-tooltip>
</q-btn>
<q-space />
@ -268,6 +277,7 @@ onMounted(async () => {
<q-tr :props="props" class="cursor-pointer">
<q-td auto-width>
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
color="edit"
flat
dense
@ -281,6 +291,7 @@ onMounted(async () => {
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn
v-if="checkPermission($route)?.attrIsDelete"
color="red"
flat
dense
@ -299,7 +310,6 @@ onMounted(async () => {
<q-td v-for="col in props.cols" :key="col.id">
{{ col.value }}
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">