Merge branch 'develop' into devTee

This commit is contained in:
setthawutttty 2025-04-04 10:20:36 +07:00
commit 633aeb5e06
5 changed files with 29 additions and 30 deletions

View file

@ -2,7 +2,7 @@
import { ref, watch, computed, onMounted } from "vue";
import { checkPermission } from "@/utils/permissions";
import { useRouter } from "vue-router";
import { useRoute, useRouter } from "vue-router";
import { useRegistryNewDataStore } from "@/modules/04_registryPerson/store";
import { useCounterMixin } from "@/stores/mixin";
@ -18,6 +18,7 @@ import DialogHistory from "@/modules/04_registryPerson/components/DialogHistory.
/* use*/
const $q = useQuasar();
const route = useRoute();
const router = useRouter();
const mixin = useCounterMixin();
const { date2Thai } = mixin;
@ -220,14 +221,21 @@ watch(
}
);
const isPageRetired = ref<boolean>(false); //
onMounted(() => {
checkFilterDateAppoint();
if (
route.name === "registryRetireOfficer" ||
route.name === "registryRetireEmployee"
) {
isPageRetired.value = true;
}
});
</script>
<template>
<div class="col-12 row q-pb-sm q-col-gutter-sm items-center">
<div class="row q-gutter-sm">
<div v-if="!isPageRetired" class="row q-gutter-sm">
<q-btn
v-if="
empType === 'officer' ||

View file

@ -60,7 +60,7 @@ const baseColumns = ref<QTableProps["columns"]>([
name: "posNo",
align: "left",
label: "เลขที่ตำแหน่ง",
sortable: false,
sortable: false,
field: "posNo",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
@ -70,7 +70,7 @@ const baseColumns = ref<QTableProps["columns"]>([
align: "left",
label: "ชื่อ-นามสกุล",
field: "fullName",
sortable: false,
sortable: false,
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
@ -78,7 +78,7 @@ const baseColumns = ref<QTableProps["columns"]>([
name: "position",
align: "left",
label: "ตำแหน่งในสายงาน",
sortable: false,
sortable: false,
field: "position",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
@ -296,12 +296,9 @@ watch(
</script>
<template>
<q-toolbar class="text-primary" style="padding: 0px">
<!-- && snapShot === 'SNAP1' -->
<q-btn
v-if="
!store.isClosedRound &&
checkPermission($route)?.attrIsCreate &&
snapShot === 'SNAP1'
"
v-if="!store.isClosedRound && checkPermission($route)?.attrIsCreate"
flat
round
dense
@ -376,10 +373,10 @@ watch(
<template v-slot:body="props">
<q-tr :props="props">
<q-td>
<!-- snapShot === 'SNAP1' && -->
<q-btn
v-if="
!store.isClosedRound &&
snapShot === 'SNAP1' &&
(checkPermission($route)?.attrIsUpdate ||
checkPermission($route)?.attrIsDelete)
"

View file

@ -327,12 +327,10 @@ function onClickViewInfo(type: string, id: string) {
<template>
<q-toolbar class="text-primary" style="padding: 0px">
<!-- &&
snapShot === 'SNAP1' -->
<q-btn
v-if="
!store.isClosedRound &&
checkPermission($route)?.attrIsCreate &&
snapShot === 'SNAP1'
"
v-if="!store.isClosedRound && checkPermission($route)?.attrIsCreate"
flat
round
dense
@ -394,10 +392,10 @@ function onClickViewInfo(type: string, id: string) {
<template v-slot:body="props">
<q-tr :props="props">
<q-td>
<!-- snapShot === 'SNAP1' && -->
<q-btn
v-if="
!store.isClosedRound &&
snapShot === 'SNAP1' &&
(checkPermission($route)?.attrIsUpdate ||
checkPermission($route)?.attrIsDelete)
"

View file

@ -307,12 +307,10 @@ watch(
</script>
<template>
<q-toolbar class="text-primary" style="padding: 0px">
<!-- &&
snapShot === 'SNAP1' -->
<q-btn
v-if="
!store.isClosedRound &&
checkPermission($route)?.attrIsCreate &&
snapShot === 'SNAP1'
"
v-if="!store.isClosedRound && checkPermission($route)?.attrIsCreate"
flat
round
dense
@ -387,10 +385,10 @@ watch(
<template v-slot:body="props">
<q-tr :props="props">
<q-td>
<!-- snapShot === 'SNAP1' && -->
<q-btn
v-if="
!store.isClosedRound &&
snapShot === 'SNAP1' &&
(checkPermission($route)?.attrIsUpdate ||
checkPermission($route)?.attrIsDelete)
"

View file

@ -342,12 +342,10 @@ watch(
<template>
<q-toolbar class="text-primary" style="padding: 0px">
<!-- &&
snapShot === 'SNAP1' -->
<q-btn
v-if="
!store.isClosedRound &&
checkPermission($route)?.attrIsCreate &&
snapShot === 'SNAP1'
"
v-if="!store.isClosedRound && checkPermission($route)?.attrIsCreate"
flat
round
dense
@ -384,7 +382,7 @@ watch(
: columns"
option-value="name"
style="min-width: 140px"
class=" q-ml-sm"
class="q-ml-sm"
/>
</q-toolbar>
<d-table
@ -413,10 +411,10 @@ watch(
<template v-slot:body="props">
<q-tr :props="props">
<q-td>
<!-- snapShot === 'SNAP1' && -->
<q-btn
v-if="
!store.isClosedRound &&
snapShot === 'SNAP1' &&
(checkPermission($route)?.attrIsUpdate ||
checkPermission($route)?.attrIsDelete)
"