set permission menu master data of evaluation
This commit is contained in:
parent
a0ebb23f1f
commit
d1be4b077b
17 changed files with 322 additions and 508 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive, watch } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { useQuasar, type QTableProps } from "quasar";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
|
@ -20,6 +20,7 @@ import { checkPermission } from "@/utils/permissions";
|
|||
|
||||
const $q = useQuasar();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const { showLoader, hideLoader, dialogRemove, success, messageError } =
|
||||
useCounterMixin();
|
||||
|
||||
|
|
@ -122,7 +123,7 @@ watch(
|
|||
);
|
||||
|
||||
onMounted(() => {
|
||||
fetchList();
|
||||
if (checkPermission(route)?.attrIsList) fetchList();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
@ -257,32 +258,32 @@ onMounted(() => {
|
|||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th auto-width v-if="checkPermission($route)?.attrIsGet || checkPermission($route)?.attrIsDelete"/>
|
||||
<q-th auto-width />
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td auto-width v-if="checkPermission($route)?.attrIsGet || checkPermission($route)?.attrIsDelete">
|
||||
<q-tr :props="props">
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsGet"
|
||||
flat
|
||||
round
|
||||
color="primary"
|
||||
size="14px"
|
||||
dense
|
||||
color="info"
|
||||
icon="mdi-eye"
|
||||
@click.pervent="onClickView(props.row.id)"
|
||||
>
|
||||
<q-tooltip>ดูข้อมูล</q-tooltip>
|
||||
<q-tooltip>รายละเอียด</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsDelete"
|
||||
flat
|
||||
dense
|
||||
round
|
||||
color="red"
|
||||
size="14px"
|
||||
icon="mdi-delete "
|
||||
@click.pervent="onClickDelete(props.row.id)"
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue