check tab position in registry

This commit is contained in:
Warunee Tamkoo 2025-02-24 15:55:47 +07:00
parent 975113fe3f
commit 2acd9622ce

View file

@ -1,5 +1,10 @@
<script setup lang="ts">
import { ref } from "vue";
import { useCounterMixin } from "@/stores/mixin";
import { useRoute } from "vue-router";
const { pathRegistryEmp } = useCounterMixin();
const route = useRoute();
/** importComponents*/
import Info from "@/modules/04_registryPerson/components/detail/GovernmentInformation/01_Info.vue"; //
@ -11,9 +16,12 @@ import HelpGovernmentDetail from "@/modules/04_registryPerson/components/detail/
import Postion from "@/modules/04_registryPerson/components/detail/GovernmentInformation/07_Position.vue";
import { useRegistryNewDataStore } from "@/modules/04_registryPerson/store";
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
const tab = ref<string>("1");
const storeRegistry = useRegistryNewDataStore();
</script>
<template>
<div class="row items-center q-my-md">
<div class="text-dark row items-center q-px-md">
@ -35,11 +43,11 @@ const storeRegistry = useRegistryNewDataStore();
>
<q-tab name="1" label="ข้อมูลราชการ" />
<q-tab name="7" label="ตำแหน่ง" />
<q-tab name="5" label="รักษาการในตำแหน่ง" />
<q-tab v-if="empType != '-employee'" name="5" label="รักษาการในตำแหน่ง" />
<q-tab v-if="empType != '-employee'" name="6" label="ช่วยราชการ" />
<q-tab name="2" label="วินัย" />
<q-tab name="3" label="การลา" />
<q-tab name="4" label="ปฏิบัติราชการพิเศษ" />
<q-tab name="6" label="ช่วยราชการ" />
</q-tabs>
<q-separator />
@ -56,10 +64,10 @@ const storeRegistry = useRegistryNewDataStore();
<q-tab-panel name="4">
<PerformSpecialWork :is-leave="storeRegistry.isLeave" />
</q-tab-panel>
<q-tab-panel name="5">
<q-tab-panel v-if="empType != '-employee'" name="5">
<ActingPos :is-leave="storeRegistry.isLeave" />
</q-tab-panel>
<q-tab-panel name="6">
<q-tab-panel v-if="empType != '-employee'" name="6">
<HelpGovernmentDetail :is-leave="storeRegistry.isLeave" />
</q-tab-panel>
<q-tab-panel name="7">