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

@ -29,6 +29,12 @@ const {
const id = ref<string>(route.params.id.toString());
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
/**
* props
*/
const props = defineProps({
isLeave: Boolean,
});
const mode = ref<string>("table"); // Table,Card
const dialog = ref<boolean>(false); // popup
@ -371,7 +377,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 && checkPermission($route)?.attrIsUpdate"
round
flat
color="primary"
@ -480,7 +486,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
@ -521,7 +527,7 @@ onMounted(() => {
<q-tooltip>ประวแกไขใบอนญาตประกอบวชาช</q-tooltip>
</q-btn>
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="props.isLeave == false && checkPermission($route)?.attrIsUpdate"
flat
round
color="edit"

View file

@ -13,6 +13,12 @@ import type { RequestItemsObject } from "@/modules/04_registryPerson/interface/r
import type { ResponseObject } from "@/modules/04_registryPerson/interface/response/Training";
import dialogHeader from "@/components/DialogHeader.vue";
/**
* props
*/
const props = defineProps({
isLeave:Boolean
});
const route = useRoute();
const $q = useQuasar();
@ -525,7 +531,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"
round
dense
flat
@ -636,7 +642,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
@ -676,7 +682,7 @@ onMounted(() => {
<q-tooltip>ประวแกไขการฝกอบรม/งาน</q-tooltip>
</q-btn>
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="props.isLeave == false && checkPermission($route)?.attrIsUpdate"
flat
round
color="edit"

View file

@ -35,6 +35,13 @@ const {
pathRegistryEmp,
} = mixin;
/**
* props
*/
const props = defineProps({
isLeave:Boolean
});
const profileId = ref<string>(
route.params.id ? route.params.id.toString() : ""
);
@ -649,7 +656,7 @@ onMounted(async () => {
<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"
@ -769,7 +776,7 @@ onMounted(async () => {
</q-btn>
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="props.isLeave == false && checkPermission($route)?.attrIsUpdate"
flat
dense
round
@ -802,7 +809,7 @@ onMounted(async () => {
<q-tooltip>ประวแกไขเครองราชอสรยาภรณ</q-tooltip>
</q-btn>
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="props.isLeave == false && checkPermission($route)?.attrIsUpdate"
flat
round
color="edit"

View file

@ -32,6 +32,13 @@ const profileId = ref<string>(
);
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
/**
* props
*/
const props = defineProps({
isLeave:Boolean
});
const id = ref<string>(""); //id
const issueDateYear = ref<number>(0); //
const declHonorForm = reactive<RequestItemsObject>({
@ -365,7 +372,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"
@ -484,7 +491,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
@ -517,7 +524,7 @@ onMounted(() => {
<q-tooltip>ประวแกไขประกาศเกยรต</q-tooltip>
</q-btn>
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="props.isLeave == false && checkPermission($route)?.attrIsUpdate"
flat
round
color="edit"

View file

@ -46,6 +46,13 @@ const modeViewPlan = ref<string>("table"); //การแสดงผล Table,C
const modalHistory = ref<boolean>(false); // popup
const kpiDevelopmentId = ref<string>(""); // id
/**
* props
*/
const props = defineProps({
isLeave:Boolean
});
const totalIdp = ref<number>(0);
const totalListIdp = ref<number>(1);
const paginationIdp = ref({
@ -580,7 +587,7 @@ onMounted(async () => {
<div class="col-12">
<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"
@ -703,7 +710,7 @@ onMounted(async () => {
>
</q-btn>
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="props.isLeave == false && checkPermission($route)?.attrIsUpdate"
flat
dense
round
@ -738,7 +745,7 @@ onMounted(async () => {
>
</q-btn>
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="props.isLeave == false && checkPermission($route)?.attrIsUpdate"
flat
round
color="edit"

View file

@ -1,6 +1,8 @@
<script setup lang="ts">
import { ref } from "vue";
import { useRegistryNewDataStore } from "@/modules/04_registryPerson/store";
/** importComponents*/
import ProfessionalLicense from "@/modules/04_registryPerson/components/detail/Achievement/01_ProfessionalLicense.vue";
import Train from "@/modules/04_registryPerson/components/detail/Achievement/02_Train.vue";
@ -8,6 +10,8 @@ import Insignia from "@/modules/04_registryPerson/components/detail/Achievement/
import DeclarationHonor from "@/modules/04_registryPerson/components/detail/Achievement/04_DeclarationHonor.vue";
import ResultsPerformance from "@/modules/04_registryPerson/components/detail/Achievement/05_ResultsPerformance.vue";
const storeRegistry = useRegistryNewDataStore();
const tab = ref<string>("1");
</script>
<template>
@ -41,22 +45,22 @@ const tab = ref<string>("1");
<q-tab-panels v-model="tab" animated>
<q-tab-panel name="1">
<ProfessionalLicense />
<ProfessionalLicense :is-leave="storeRegistry.isLeave"/>
</q-tab-panel>
<q-tab-panel name="2">
<Train />
<Train :is-leave="storeRegistry.isLeave"/>
</q-tab-panel>
<q-tab-panel name="3">
<Insignia />
<Insignia :is-leave="storeRegistry.isLeave"/>
</q-tab-panel>
<q-tab-panel name="4">
<DeclarationHonor />
<DeclarationHonor :is-leave="storeRegistry.isLeave"/>
</q-tab-panel>
<q-tab-panel name="4">
<PerformSpecialWork />
</q-tab-panel>
<q-tab-panel name="5">
<ResultsPerformance />
<ResultsPerformance :is-leave="storeRegistry.isLeave"/>
</q-tab-panel>
</q-tab-panels>
</template>