ประกาศเกษียณอายุราชการ สิทธิ์

This commit is contained in:
STW_TTTY\stwtt 2024-08-09 16:46:01 +07:00
parent 080ac1cbb3
commit dd5c3a42f6
4 changed files with 76 additions and 59 deletions

View file

@ -11,6 +11,8 @@ import type { resMain } from "@/modules/06_retirement/interface/response/Main";
import { storeToRefs } from "pinia";
import popupAdd from "../components/ListRetirement/popupAdd.vue";
import { checkPermission } from "@/utils/permissions";
const useStoreRetire = useDataStoreRetirement();
const { clickTab } = useStoreRetire;
const { tab, type } = storeToRefs(useDataStoreRetirement());
@ -195,6 +197,9 @@ const paginationLabel = (start: string, end: string, total: string) => {
const nextPage = (prop: any) => {
router.push(`/retirement/${prop.id}`);
};
const nextPageDetail = (prop: any) => {
router.push(`/retirement-detail/${prop.id}`);
};
watch(type, () => {
fetchRetirement(type.value, currentYear);
@ -278,7 +283,7 @@ const typeReportChangeName = (val: string) => {
</q-select>
<!-- use-input -->
<div>
<div v-if="checkPermission($route)?.attrIsCreate">
<popupAdd
:type="useStoreRetire.type"
:year="fiscalyear"
@ -345,6 +350,7 @@ const typeReportChangeName = (val: string) => {
>
<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"
@ -355,11 +361,34 @@ const typeReportChangeName = (val: string) => {
</q-tr>
</template>
<template v-slot:body="props">
<q-tr
:props="props"
class="cursor-pointer"
@click="nextPage(props.row)"
>
<q-tr :props="props">
<q-td auto-width>
<q-btn
v-if="checkPermission($route)?.attrIsGet"
flat
round
dense
icon="mdi-eye"
color="info"
@click="nextPageDetail(props.row)"
>
<q-tooltip>รายละเอยด</q-tooltip>
</q-btn>
<q-btn
v-if="
checkPermission($route)?.attrIsGet &&
checkPermission($route)?.attrIsUpdate
"
flat
round
dense
icon="edit"
color="edit"
@click="nextPage(props.row)"
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
</q-td>
<q-td key="no" :props="props">
{{ props.rowIndex + 1 }}
</q-td>