This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-05-16 10:23:56 +07:00
parent 4e157459fc
commit 11bc7e421d
3 changed files with 8 additions and 1 deletions

View file

@ -26,6 +26,10 @@ const {
dialogMessageNotify,
} = mixin;
const { calculateAge, fetchPerson, filterSelector } = store;
const props = defineProps({
fetchDataPersonal: { type: Function, require: true },
});
const profileId = ref<string>(
route.params.id ? route.params.id.toString() : ""
);
@ -291,6 +295,7 @@ async function editData() {
.then((res) => {
success($q, "บันทึกข้อมูลสำเร็จ");
getData(), (modal.value = false);
props.fetchDataPersonal?.();
})
.catch((e) => {
messageError($q, e);

View file

@ -637,6 +637,8 @@ async function addData() {
startYear: undefined,
endYear: undefined,
isDate: isDate.value === "false" ? false : true,
profileId: empType.value === "" ? id.value : undefined,
profileEmployeeId: empType.value !== "" ? id.value : undefined,
})
.then(() => {
fetchData(id.value);

View file

@ -47,7 +47,7 @@ const props = defineProps({
<q-tab-panels v-model="tab" animated>
<q-tab-panel name="1">
<Profile />
<Profile :fetchDataPersonal="props.fetchDataPersonal"/>
</q-tab-panel>
<q-tab-panel name="2">
<NameChangeHistory :fetchDataPersonal="props.fetchDataPersonal" />