Merge branch 'nice' into develop

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-05-16 09:42:11 +07:00
commit 2ff7c5eb91
4 changed files with 17 additions and 3 deletions

View file

@ -33,6 +33,9 @@ const profileId = ref<string>(route.params.id.toString());
const empType = ref<string>( const empType = ref<string>(
route.name === "registryNewByid" ? "" : "-employee" route.name === "registryNewByid" ? "" : "-employee"
); );
const props = defineProps({
fetchDataPersonal: { type: Function, require: true },
});
const editId = ref<string>(""); const editId = ref<string>("");
const dialog = ref<boolean>(false); const dialog = ref<boolean>(false);
@ -371,6 +374,7 @@ async function addData() {
subId.value = res.data.result; subId.value = res.data.result;
fetchData(profileId.value); fetchData(profileId.value);
props.fetchDataPersonal();
success($q, "บันทึกข้อมูลสำเร็จ"); success($q, "บันทึกข้อมูลสำเร็จ");
}) })
.catch((err) => { .catch((err) => {
@ -392,6 +396,7 @@ function editData(idData: string) {
) )
.then(() => { .then(() => {
fetchData(profileId.value); fetchData(profileId.value);
props.fetchDataPersonal();
success($q, "บันทึกข้อมูลสำเร็จ"); success($q, "บันทึกข้อมูลสำเร็จ");
}) })
.catch((err) => { .catch((err) => {

View file

@ -12,6 +12,9 @@ import SpecialSkill from "@/modules/04_registryNew/components/detail/PersonalInf
import FamilyNew from "@/modules/04_registryNew/components/detail/PersonalInformation/04_FamilyNew.vue"; import FamilyNew from "@/modules/04_registryNew/components/detail/PersonalInformation/04_FamilyNew.vue";
const tab = ref<string>("1"); const tab = ref<string>("1");
const props = defineProps({
fetchDataPersonal: { type: Function, require: true },
});
</script> </script>
<template> <template>
<div class="row items-center q-my-md"> <div class="row items-center q-my-md">
@ -47,7 +50,7 @@ const tab = ref<string>("1");
<Profile /> <Profile />
</q-tab-panel> </q-tab-panel>
<q-tab-panel name="2"> <q-tab-panel name="2">
<NameChangeHistory /> <NameChangeHistory :fetchDataPersonal="props.fetchDataPersonal" />
</q-tab-panel> </q-tab-panel>
<q-tab-panel name="3"> <q-tab-panel name="3">
<Address /> <Address />

View file

@ -10,6 +10,9 @@ import AchievementMain from "@/modules/04_registryNew/components/detail/Achievem
import OtherMaim from "@/modules/04_registryNew/components/detail/Other/Main.vue"; import OtherMaim from "@/modules/04_registryNew/components/detail/Other/Main.vue";
const store = useRegistryDetailNewDataStore(); const store = useRegistryDetailNewDataStore();
const props = defineProps({
fetchDataPersonal: { type: Function, require: true },
});
const itemsTab = ref<any>([ const itemsTab = ref<any>([
{ {
@ -81,7 +84,10 @@ const splitterModel = ref<number>(12);
:name="tab.name" :name="tab.name"
class="q-pa-none" class="q-pa-none"
> >
<PersonalInformationMain v-if="store.tabMain === '1'" /> <PersonalInformationMain
v-if="store.tabMain === '1'"
:fetchDataPersonal="props.fetchDataPersonal"
/>
<GovernmentInformationMain v-if="store.tabMain === '2'" /> <GovernmentInformationMain v-if="store.tabMain === '2'" />
<salaryMain v-if="store.tabMain === '3'" /> <salaryMain v-if="store.tabMain === '3'" />
<AchievementMain v-if="store.tabMain === '4'" /> <AchievementMain v-if="store.tabMain === '4'" />

View file

@ -560,7 +560,7 @@ onMounted(async () => {
</q-card> </q-card>
<q-card bordered class="q-mt-md rounded"> <q-card bordered class="q-mt-md rounded">
<TabMain /> <TabMain :fetchDataPersonal="fetchDataPersonal"/>
</q-card> </q-card>
<!-- Dialog แนบใบมรณบตร --> <!-- Dialog แนบใบมรณบตร -->