This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-11-04 15:21:23 +07:00
parent aa9b04772b
commit 3b6c22027c
26 changed files with 155 additions and 134 deletions

View file

@ -35,8 +35,8 @@ const profileId = ref<string>(
/**
* props
*/
const props = defineProps({
isLeave: Boolean,
const isLeave = defineModel<boolean>("isLeave", {
required: true,
});
const store = useSalaryDataStore();
@ -628,7 +628,7 @@ onMounted(() => {
<template>
<div class="row items-center q-gutter-x-sm q-pb-sm">
<q-btn
v-if="!props.isLeave && checkPermission($route)?.attrIsUpdate"
v-if="!isLeave && checkPermission($route)?.attrIsUpdate"
flat
color="primary"
round
@ -703,9 +703,7 @@ onMounted(() => {
</q-btn>
<q-btn
v-if="
props.isLeave == false && checkPermission($route)?.attrIsUpdate
"
v-if="isLeave == false && checkPermission($route)?.attrIsUpdate"
flat
dense
round
@ -717,9 +715,7 @@ onMounted(() => {
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn
v-if="
props.isLeave == false && checkPermission($route)?.attrIsUpdate
"
v-if="isLeave == false && checkPermission($route)?.attrIsUpdate"
dense
flat
round
@ -731,9 +727,7 @@ onMounted(() => {
</q-btn>
<q-btn
v-if="
props.isLeave == false && checkPermission($route)?.attrIsUpdate
"
v-if="isLeave == false && checkPermission($route)?.attrIsUpdate"
dense
flat
round

View file

@ -36,8 +36,8 @@ const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
/**
* props
*/
const props = defineProps({
isLeave:Boolean
const isLeave = defineModel<boolean>("isLeave", {
required: true,
});
const modelView = ref<string>("table"); // Table,Card
@ -244,7 +244,7 @@ onMounted(() => {
<template>
<div class="row items-center q-gutter-x-sm q-pb-sm">
<q-btn
v-if="props.isLeave == false && checkPermission($route)?.attrIsUpdate"
v-if="isLeave == false && checkPermission($route)?.attrIsUpdate"
dense
color="primary"
icon="add"
@ -363,7 +363,9 @@ onMounted(() => {
<q-tooltip>ประวนทกวนทไมไดบเงนเดอนฯ</q-tooltip>
</q-btn>
<q-btn
v-if="props.isLeave == false && checkPermission($route)?.attrIsUpdate"
v-if="
isLeave == false && checkPermission($route)?.attrIsUpdate
"
flat
dense
round
@ -395,7 +397,9 @@ onMounted(() => {
<q-tooltip>ประวนทกวนทไมไดบเงนเดอนฯ</q-tooltip>
</q-btn>
<q-btn
v-if="props.isLeave == false && checkPermission($route)?.attrIsUpdate"
v-if="
isLeave == false && checkPermission($route)?.attrIsUpdate
"
flat
round
color="edit"

View file

@ -1,13 +1,13 @@
<script setup lang="ts">
import { ref } from "vue";
import { useRegistryNewDataStore } from '@/modules/04_registryPerson/store'
import { useRegistryNewDataStore } from "@/modules/04_registryPerson/store";
/** importComponents*/
import PositionSalary from "@/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue"; //
import NotReceiveSalary from "@/modules/04_registryPerson/components/detail/Salary/02_NotReceiveSalary.vue"; //
const storeRegistry = useRegistryNewDataStore()
const storeRegistry = useRegistryNewDataStore();
const tab = ref<string>("1");
</script>
@ -37,10 +37,10 @@ const tab = ref<string>("1");
<q-tab-panels v-model="tab" animated>
<q-tab-panel name="1">
<PositionSalary :is-leave="storeRegistry.isLeave"/>
<PositionSalary :is-leave="storeRegistry.isLeave" />
</q-tab-panel>
<q-tab-panel name="2">
<NotReceiveSalary :is-leave="storeRegistry.isLeave"/>
<NotReceiveSalary :is-leave="storeRegistry.isLeave" />
</q-tab-panel>
</q-tab-panels>
</template>