สิทธิ์ รายการบันทึกเวียนแจ้งการถึงแก่กรรม

This commit is contained in:
STW_TTTY\stwtt 2024-08-13 12:06:33 +07:00
parent c134fcd7db
commit 4e0781b180
3 changed files with 47 additions and 11 deletions

View file

@ -6,6 +6,7 @@ import { useCounterMixin } from "@/stores/mixin";
import { useRouter } from "vue-router";
import http from "@/plugins/http";
import config from "@/app.config";
import { checkPermission } from "@/utils/permissions";
/** Use */
const router = useRouter();
@ -224,22 +225,44 @@ const pagination = ref({
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width></q-th>
<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"
@click="nextPage(props.row.id)"
>
<q-td
v-for="col in props.cols"
:key="col.id"
@click.stop.prevent="nextPage(props.row.id)"
>
<q-tr :props="props">
<q-td auto-width>
<q-btn
v-if="checkPermission($route)?.attrIsGet"
flat
dense
round
color="info"
icon="mdi-eye"
@click="
router.push(`/retirement/deceased-detail/${props.row.id}`)
"
>
<q-tooltip>รายละเอยด</q-tooltip>
</q-btn>
<q-btn
v-if="
checkPermission($route)?.attrIsGet &&
checkPermission($route)?.attrIsUpdate
"
flat
dense
round
color="edit"
icon="edit"
@click.stop.prevent="nextPage(props.row.id)"
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
</q-td>
<q-td v-for="col in props.cols" :key="col.id">
<div v-if="col.name === 'no'">
{{ props.rowIndex + 1 }}
</div>

View file

@ -19,6 +19,7 @@ import { useCounterMixin } from "@/stores/mixin";
const $q = useQuasar();
const router = useRouter();
const route = useRoute();
const checkRoutePermisson = ref<boolean>(route.name == "deceased-detailOnly");
const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError, date2Thai } = mixin;
const fullName = ref<string>("");
@ -190,7 +191,7 @@ const fileDownload = async (type: string) => {
</div>
</div>
<div class="col-12">
<div class="col-12" v-if="!checkRoutePermisson">
<div class="row">
<q-space />
<q-btn

View file

@ -19,6 +19,8 @@ const deceased = () =>
import("@/modules/06_retirement/components/resign/Deceased.vue");
const detaildeceased = () =>
import("@/modules/06_retirement/components/resign/DetailDeceased.vue");
const detaildeceasedOnly = () =>
import("@/modules/06_retirement/components/resign/DetailDeceased.vue");
const dismissOrder = () =>
import("@/modules/06_retirement/components/DismissOrder/DismissOrder.vue");
const outDetail = () =>
@ -186,6 +188,16 @@ export default [
Role: "STAFF",
},
},
{
path: "/retirement/deceased-detail/:id",
name: "deceased-detailOnly",
component: detaildeceasedOnly,
meta: {
Auth: true,
Key: "SYS_PASSAWAY",
Role: "STAFF",
},
},
{
path: "/retirement/deceased/detail/:id",
name: "deceased-detailByid",