This commit is contained in:
setthawutttty 2024-10-21 17:56:47 +07:00
parent 979ecb381f
commit 9d3601f23f
32 changed files with 262 additions and 79 deletions

View file

@ -30,6 +30,12 @@ const {
pathRegistryEmp,
} = mixin;
/**
* props
*/
const props = defineProps({
isLeave:Boolean
});
const profileId = ref<string>(route.params.id.toString());
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
/** ตัวแปรข้อมูลหลัก */
@ -292,7 +298,7 @@ onMounted(() => {
<q-space />
<div class="q-gutter-x-sm">
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="!props.isLeave && checkPermission($route)?.attrIsUpdate"
flat
dense
round

View file

@ -36,6 +36,13 @@ const profileId = ref<string>(
);
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
/**
* props
*/
const props = defineProps({
isLeave:Boolean
});
//
const disciplineData = reactive<RequestItemsObject>({
date: null, ////
@ -344,7 +351,7 @@ onMounted(() => {
<template>
<div class="row items-center q-gutter-x-sm q-pb-sm">
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="props.isLeave == false && checkPermission($route)?.attrIsUpdate"
dense
color="primary"
icon="add"
@ -465,7 +472,7 @@ onMounted(() => {
<q-tooltip>ประวแกไขว</q-tooltip>
</q-btn>
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="props.isLeave == false && checkPermission($route)?.attrIsUpdate"
flat
dense
round
@ -499,7 +506,7 @@ onMounted(() => {
><q-tooltip>ประวแกไขว</q-tooltip></q-btn
>
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="props.isLeave == false && checkPermission($route)?.attrIsUpdate"
color="edit"
icon="edit"
flat

View file

@ -24,7 +24,12 @@ const modal = defineModel<boolean>("modal", { required: true }); //แสดง
const id = defineModel<string>("id", { required: true }); //id
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
/**
* props
*/
const props = defineProps({
isLeave:Boolean
});
const filterKeyword = ref<string>(""); //
const rows = ref<RequestItemsObject[]>([]); //
const columns = ref<QTableProps["columns"]>([

View file

@ -22,6 +22,12 @@ import type {
import DialogHeader from "@/components/DialogHeader.vue";
import DialogHistory from "@/modules/04_registryPerson/components/detail/GovernmentInformation/03_LeaveHistory.vue";
/**
* props
*/
const props = defineProps({
isLeave:Boolean
});
const route = useRoute();
const $q = useQuasar();
@ -443,7 +449,7 @@ onMounted(() => {
<template>
<div class="row items-center q-gutter-x-sm q-pb-sm">
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="props.isLeave == false && checkPermission($route)?.attrIsUpdate"
dense
color="primary"
icon="add"
@ -562,7 +568,7 @@ onMounted(() => {
<q-tooltip>ประวแกไขการลา</q-tooltip>
</q-btn>
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="props.isLeave == false && checkPermission($route)?.attrIsUpdate"
flat
dense
round
@ -607,7 +613,7 @@ onMounted(() => {
><q-tooltip>ประวแกไขการลา</q-tooltip></q-btn
>
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="props.isLeave == false && checkPermission($route)?.attrIsUpdate"
color="edit"
icon="edit"
flat

View file

@ -26,6 +26,12 @@ const { showLoader, hideLoader, messageError, date2Thai, pathRegistryEmp } =
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
/**
* props
*/
const props = defineProps({
isLeave:Boolean
});
const filterKeyword = ref<string>("");
const rows = ref<DetailData[]>([]); //data history
const formFilter = reactive<FormFilter>({

View file

@ -32,6 +32,12 @@ const profileId = ref<string>(
);
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
/**
* props
*/
const props = defineProps({
isLeave:Boolean
});
const id = ref<string>(""); //id
const modal = ref<boolean>(false); // popup
const modalHistory = ref<boolean>(false); // popup
@ -268,7 +274,7 @@ onMounted(() => {
<template>
<div class="row items-center q-gutter-x-sm q-pb-sm">
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="props.isLeave == false && checkPermission($route)?.attrIsUpdate"
dense
color="primary"
icon="add"
@ -388,7 +394,7 @@ onMounted(() => {
<q-tooltip>ประวแกไขปฏราชการพเศษ</q-tooltip>
</q-btn>
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="props.isLeave == false && checkPermission($route)?.attrIsUpdate"
flat
dense
round
@ -422,7 +428,7 @@ onMounted(() => {
><q-tooltip>ประวแกไขปฏราชการพเศษ</q-tooltip>
</q-btn>
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="props.isLeave == false && checkPermission($route)?.attrIsUpdate"
color="edit"
icon="edit"
flat

View file

@ -21,6 +21,12 @@ const { showLoader, hideLoader, messageError, date2Thai, pathRegistryEmp } =
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
/**
* props
*/
const props = defineProps({
isLeave:Boolean
});
const filterKeyword = ref<string>(""); //
const rows = ref<ResponseObject[]>([]); //data history
const columns = ref<QTableProps["columns"]>([

View file

@ -7,7 +7,10 @@ import Discipline from "@/modules/04_registryPerson/components/detail/Government
import Leave from "@/modules/04_registryPerson/components/detail/GovernmentInformation/03_Leave.vue"; //
import PerformSpecialWork from "@/modules/04_registryPerson/components/detail/GovernmentInformation/04_PerformSpecialWork.vue"; //
import { useRegistryNewDataStore } from "@/modules/04_registryPerson/store";
const tab = ref<string>("1");
const storeRegistry = useRegistryNewDataStore();
</script>
<template>
<div class="row items-center q-my-md">
@ -37,16 +40,16 @@ const tab = ref<string>("1");
<q-tab-panels v-model="tab" animated>
<q-tab-panel name="1">
<Info />
<Info :is-leave="storeRegistry.isLeave"/>
</q-tab-panel>
<q-tab-panel name="2">
<Discipline />
<Discipline :is-leave="storeRegistry.isLeave"/>
</q-tab-panel>
<q-tab-panel name="3">
<Leave />
<Leave :is-leave="storeRegistry.isLeave"/>
</q-tab-panel>
<q-tab-panel name="4">
<PerformSpecialWork />
<PerformSpecialWork :is-leave="storeRegistry.isLeave"/>
</q-tab-panel>
</q-tab-panels>
</template>