ปรับ dialog ทะเบียนประวัติ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-05-01 17:57:14 +07:00
parent 7e4c274bc0
commit 81b6ade3f9

View file

@ -171,11 +171,11 @@ watch(
() => props.modal,
async () => {
modal.value = props.modal ? props.modal : false;
modal.value &&
props.id &&
(await fetchInformation(props.id), await fetchProfileGov(props.id)),
if (modal.value) {
props.id && (fetchInformation(props.id), fetchProfileGov(props.id));
(fileName.value = `profile-${props.id}`),
await fetchProfile(props.id as string);
fetchProfile(props.id as string);
}
}
);
@ -192,9 +192,8 @@ async function fetchProfile(id: string) {
.then(async (res) => {
avatar.avatar = res.data.downloadUrl;
})
.catch(() => {})
.finally(() => {
hideLoader();
statusLoad.value.val = true;
});
}
</script>