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>

View file

@ -33,6 +33,13 @@ const profileId = ref<string>(
route.params.id ? route.params.id.toString() : ""
);
/**
* props
*/
const props = defineProps({
isLeave:Boolean
});
/** ข้อมูลลูกจ้างชั่วคราว*/
const modalEdit = ref<boolean>(false);
const dataEmployee = reactive<ResEmployee>({
@ -296,7 +303,7 @@ onMounted(() => {
<div class="row q-gutter-sm items-center">
<div class="toptitle col text-right q-gutter-x-sm">
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="props.isLeave == false && checkPermission($route)?.attrIsUpdate"
flat
round
dense

View file

@ -31,6 +31,13 @@ const {
const profileId = ref<string>(route.params.id.toString());
/**
* props
*/
const props = defineProps({
isLeave:Boolean
});
/** ข้อมูลการจ้าง*/
const rows = ref<Employment[]>([]);
const filter = ref<string>("");
@ -227,7 +234,7 @@ onMounted(() => {
<div class="flex items-center">
<div class="q-gutter-sm">
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="props.isLeave == false && checkPermission($route)?.attrIsUpdate"
size="12px"
flat
round
@ -310,7 +317,7 @@ onMounted(() => {
<q-tooltip>ประวอมลการจาง </q-tooltip>
</q-btn>
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="props.isLeave == false && checkPermission($route)?.attrIsUpdate"
dense
flat
round
@ -321,7 +328,7 @@ onMounted(() => {
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn
v-if="checkPermission($route)?.attrIsDelete"
v-if="props.isLeave == false && checkPermission($route)?.attrIsDelete"
dense
flat
round

View file

@ -1,9 +1,13 @@
<script setup lang="ts">
import { ref } from "vue";
import { useRegistryNewDataStore } from "@/modules/04_registryPerson/store";
import DataEmployee from "@/modules/04_registryPerson/components/detail/Employee/01_DataEmployee.vue";
import Employment from "@/modules/04_registryPerson/components/detail/Employee/02_Employment.vue";
const storeRegistry = useRegistryNewDataStore();
const tab = ref<string>("1");
</script>
<template>
@ -32,10 +36,10 @@ const tab = ref<string>("1");
<q-tab-panels v-model="tab" animated>
<q-tab-panel name="1">
<DataEmployee />
<DataEmployee :is-leave="storeRegistry.isLeave"/>
</q-tab-panel>
<q-tab-panel name="2">
<Employment />
<Employment :is-leave="storeRegistry.isLeave"/>
</q-tab-panel>
</q-tab-panels>
</template>

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>

View file

@ -28,6 +28,13 @@ const {
const id = ref<string>("");
/**
* props
*/
const props = defineProps({
isLeave:Boolean
});
const profileId = ref<string>(
route.params.id ? route.params.id.toString() : ""
);
@ -202,7 +209,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"
@ -320,7 +327,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
@ -353,7 +360,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

@ -23,6 +23,13 @@ const {
dialogRemove,
} = mixin;
/**
* props
*/
const props = defineProps({
isLeave: Boolean,
});
const profileId = ref<string>(
route.params.id ? route.params.id.toString() : ""
);
@ -186,7 +193,7 @@ onMounted(() => {
<div class="row col-12 q-col-gutter-y-sm q-pa-sm">
<div class="col-12 row">
<q-file
v-if="checkPermission($route)?.attrIsUpdate"
v-if="props.isLeave == false && checkPermission($route)?.attrIsUpdate"
for="inputFiles"
class="col-12"
outlined
@ -241,6 +248,7 @@ onMounted(() => {
><q-tooltip>ดาวนโหลดไฟล</q-tooltip></q-btn
>
<q-btn
v-if="props.isLeave == false"
size="12px"
flat
round

View file

@ -1,10 +1,14 @@
<script setup lang="ts">
import { ref } from "vue";
import { useRegistryNewDataStore } from "@/modules/04_registryPerson/store";
/** importComponents*/
import OtherInformation from "@/modules/04_registryPerson/components/detail/Other/01_OtherInformation.vue";
import Documentipline from "@/modules/04_registryPerson/components/detail/Other/02_Document.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">
<OtherInformation />
<OtherInformation :is-leave="storeRegistry.isLeave" />
</q-tab-panel>
<q-tab-panel name="2">
<Documentipline />
<Documentipline :is-leave="storeRegistry.isLeave" />
</q-tab-panel>
</q-tab-panels>
</template>

View file

@ -43,6 +43,7 @@ const {
*/
const props = defineProps({
fetchDataPersonal: { type: Function, require: true },
isLeave:Boolean
});
const profileId = ref<string>(
@ -445,7 +446,7 @@ onMounted(() => {
<div class="row q-gutter-sm items-center">
<div class="toptitle col text-right">
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="!props.isLeave && checkPermission($route)?.attrIsUpdate"
flat
round
dense

View file

@ -46,6 +46,7 @@ const {
*/
const props = defineProps({
fetchDataPersonal: { type: Function, require: true },
isLeave:Boolean
});
const profileId = ref<string>(route.params.id.toString()); //id Profile
@ -450,7 +451,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"
round
flat
color="primary"

View file

@ -37,6 +37,13 @@ const {
pathRegistryEmp,
} = mixin;
/**
* props
*/
const props = defineProps({
isLeave:Boolean
});
const profileId = ref<string>(
route.params.id ? route.params.id.toString() : ""
);
@ -526,7 +533,7 @@ onMounted(async () => {
<div class="row q-gutter-sm items-center">
<div class="toptitle col text-right">
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="!props.isLeave && checkPermission($route)?.attrIsUpdate"
flat
round
dense

View file

@ -32,6 +32,12 @@ const {
pathRegistryEmp,
} = useCounterMixin();
/**
* props
*/
const props = defineProps({
isLeave:Boolean
});
const profileId = ref<string>(
route.params.id ? route.params.id.toString() : ""
);
@ -505,7 +511,7 @@ onMounted(async () => {
</q-toolbar-title>
<div class="row q-col-gutter-sm">
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="!props.isLeave && checkPermission($route)?.attrIsUpdate"
round
flat
color="edit"
@ -579,7 +585,7 @@ onMounted(async () => {
</q-toolbar-title>
<div class="row q-col-gutter-sm">
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="!props.isLeave && checkPermission($route)?.attrIsUpdate"
round
flat
color="edit"
@ -653,7 +659,7 @@ onMounted(async () => {
สมรส
</div>
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="!props.isLeave && checkPermission($route)?.attrIsUpdate"
round
flat
dense
@ -752,7 +758,7 @@ onMounted(async () => {
<div class="row q-col-gutter-sm">
<div class="text-weight-bold text-primary text-subtitle1"> ตร</div>
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="!props.isLeave && checkPermission($route)?.attrIsUpdate"
round
flat
dense
@ -775,7 +781,7 @@ onMounted(async () => {
<q-space />
<div class="row q-col-gutter-sm">
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="!props.isLeave && checkPermission($route)?.attrIsUpdate"
round
flat
color="edit"

View file

@ -39,7 +39,12 @@ const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
const dialog = ref<boolean>(false); // popup
const dialogStatus = ref<string>("create"); //
const mode = ref<string>("table"); // Table card
/**
* props
*/
const props = defineProps({
isLeave: Boolean,
});
//Table
const rows = ref<ResponseObject[]>([]);
const columns = ref<QTableProps["columns"]>([
@ -618,7 +623,7 @@ function closeDialog() {
*/
function closeHistoryDialog() {
historyDialog.value = false;
historyRows.value = []
historyRows.value = [];
}
/**
@ -747,7 +752,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"
round
flat
dense
@ -858,7 +863,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
dense
round
@ -899,6 +904,7 @@ onMounted(async () => {
<q-tooltip>ประวแกไขประวการศกษา</q-tooltip>
</q-btn>
<q-btn
v-if="props.isLeave == false"
dense
flat
round

View file

@ -32,7 +32,12 @@ const id = ref<string>(route.params.id.toString()); //id profile
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
const mode = ref<string>("table"); // Table card
/**
* props
*/
const props = defineProps({
isLeave: Boolean,
});
//Table
const keyword = ref<string>(""); //
const rows = ref<ResponseObject[]>([]); //
@ -347,7 +352,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"
flat
round
color="primary"
@ -451,7 +456,9 @@ 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
@ -491,6 +498,7 @@ onMounted(() => {
<q-tooltip>ประวแกไขความสามารถพเศษ</q-tooltip>
</q-btn>
<q-btn
v-if="props.isLeave == false"
dense
flat
round

View file

@ -1,6 +1,8 @@
<script setup lang="ts">
import { ref } from "vue";
import { useRegistryNewDataStore } from "@/modules/04_registryPerson/store";
/** importComponents*/
import Profile from "@/modules/04_registryPerson/components/detail/PersonalInformation/01_Profile.vue"; //
import NameChangeHistory from "@/modules/04_registryPerson/components/detail/PersonalInformation/02_NameChangeHistory.vue"; //
@ -9,6 +11,8 @@ import FamilyNew from "@/modules/04_registryPerson/components/detail/PersonalInf
import Education from "@/modules/04_registryPerson/components/detail/PersonalInformation/05_Education.vue"; //
import SpecialSkill from "@/modules/04_registryPerson/components/detail/PersonalInformation/06_SpecialSkill.vue"; //
const storeRegistry = useRegistryNewDataStore();
const tab = ref<string>("1");
const props = defineProps({
fetchDataPersonal: { type: Function, require: true },
@ -45,22 +49,28 @@ const props = defineProps({
<q-tab-panels v-model="tab" animated>
<q-tab-panel name="1">
<Profile :fetchDataPersonal="props.fetchDataPersonal" />
<Profile
:fetchDataPersonal="props.fetchDataPersonal"
:is-leave="storeRegistry.isLeave"
/>
</q-tab-panel>
<q-tab-panel name="2">
<NameChangeHistory :fetchDataPersonal="props.fetchDataPersonal" />
<NameChangeHistory
:fetchDataPersonal="props.fetchDataPersonal"
:is-leave="storeRegistry.isLeave"
/>
</q-tab-panel>
<q-tab-panel name="3">
<Address />
<Address :is-leave="storeRegistry.isLeave" />
</q-tab-panel>
<q-tab-panel name="4">
<FamilyNew />
<FamilyNew :is-leave="storeRegistry.isLeave" />
</q-tab-panel>
<q-tab-panel name="5">
<Education />
<Education :is-leave="storeRegistry.isLeave" />
</q-tab-panel>
<q-tab-panel name="6">
<SpecialSkill />
<SpecialSkill :is-leave="storeRegistry.isLeave" />
</q-tab-panel>
</q-tab-panels>
</q-card>

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>

View file

@ -25,6 +25,7 @@ export const useRegistryNewDataStore = defineStore("registryNew", () => {
const posLevelOps = ref<DataOption[]>([]);
const yearOps = ref<DataOption[]>([]);
const mode = ref<string>("table");
const isLeave = ref<boolean>(false)
function fetchType(data: DataType[]) {
posTypeMain.value = data;
@ -87,5 +88,6 @@ export const useRegistryNewDataStore = defineStore("registryNew", () => {
mode,
formFilter,
labelOption,
isLeave
};
});

View file

@ -9,6 +9,7 @@ import {
checkPermissionList,
} from "@/utils/permissions";
import { useCounterMixin } from "@/stores/mixin";
import { useRegistryNewDataStore } from "@/modules/04_registryPerson/store";
import http from "@/plugins/http";
import config from "@/app.config";
import axios from "axios";
@ -37,6 +38,7 @@ import TabMain from "@/modules/04_registryPerson/components/detail/TabMain.vue";
const $q = useQuasar();
const router = useRouter();
const route = useRoute();
const storeRegistry = useRegistryNewDataStore();
const {
dialogRemove,
dialogConfirm,
@ -269,6 +271,7 @@ async function fetchDataPersonal() {
.get(config.API.registryNewByProfileId(profileId.value, empType.value))
.then(async (res) => {
formDetail.value = res.data.result;
storeRegistry.isLeave = res.data.result.isLeave;
if (res.data.result.leaveReason) {
//
@ -686,6 +689,7 @@ onMounted(async () => {
<!-- list menu ของขาราชการฯ -->
<q-btn-dropdown
v-if="
!storeRegistry.isLeave &&
empType === '' &&
checkPermissionList([
'SYS_TEMPDUTY',
@ -733,6 +737,7 @@ onMounted(async () => {
<!-- list menu ของลกจางประจำ -->
<q-btn-dropdown
v-if="
!storeRegistry.isLeave &&
empType === '-employee' &&
checkPermissionList(['SYS_PROMOTION_EMP', 'SYS_PASSAWAY'])
"
@ -828,7 +833,7 @@ onMounted(async () => {
<q-img :src="profilePicture" />
</q-avatar>
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="!storeRegistry.isLeave && checkPermission($route)?.attrIsUpdate"
round
text-color="edit"
icon="mdi-pencil"