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

@ -31,6 +31,13 @@ const profileId = ref<string>(
route.params.id ? route.params.id.toString() : ""
);
/**
* props
*/
const props = defineProps({
isLeave: Boolean,
});
const store = useSalaryDataStore();
const {
date2Thai,
@ -611,7 +618,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"
flat
color="primary"
round
@ -666,7 +673,6 @@ onMounted(() => {
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width />
<q-th v-if="checkPermission($route)?.attrIsUpdate" auto-width />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
@ -687,7 +693,7 @@ onMounted(() => {
</q-btn>
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="props.isLeave == false && checkPermission($route)?.attrIsUpdate"
flat
dense
round
@ -698,9 +704,8 @@ onMounted(() => {
>
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
</q-td>
<q-td v-if="checkPermission($route)?.attrIsUpdate">
<q-btn
v-if="props.isLeave == false && checkPermission($route)?.attrIsUpdate"
dense
flat
round
@ -712,6 +717,7 @@ onMounted(() => {
</q-btn>
<q-btn
v-if="props.isLeave == false && checkPermission($route)?.attrIsUpdate"
dense
flat
round
@ -722,6 +728,7 @@ onMounted(() => {
>
</q-btn>
</q-td>
<q-td v-for="col in props.cols" :key="col.id">
<div class="table_ellipsis">
{{ col.value ? col.value : "-" }}

View file

@ -33,6 +33,13 @@ const profileId = ref<string>(
);
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
/**
* props
*/
const props = defineProps({
isLeave:Boolean
});
const modelView = ref<string>("table"); // Table,Card
const modalDialog = ref<boolean>(false); // popup
const modalHistory = ref<boolean>(false); // popup
@ -237,7 +244,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"
@ -356,7 +363,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
@ -388,7 +395,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

@ -1,10 +1,14 @@
<script setup lang="ts">
import { ref } from "vue";
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 tab = ref<string>("1");
</script>
<template>
@ -33,10 +37,10 @@ const tab = ref<string>("1");
<q-tab-panels v-model="tab" animated>
<q-tab-panel name="1">
<PositionSalary />
<PositionSalary :is-leave="storeRegistry.isLeave"/>
</q-tab-panel>
<q-tab-panel name="2">
<NotReceiveSalary />
<NotReceiveSalary :is-leave="storeRegistry.isLeave"/>
</q-tab-panel>
</q-tab-panels>
</template>