ปรับ redilect Dialog profile

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-05-24 17:52:20 +07:00
parent 332a35569e
commit bf84ecda8a

View file

@ -20,7 +20,6 @@ const router = useRouter();
const $q = useQuasar();
const retireDate = ref<Date>();
const { showLoader, hideLoader, messageError, date2Thai } = mixin;
const fileName = ref<string>("");
const empType = ref<string>(
route.name !== "appoint-employee-detail" ? "" : "-employee"
);
@ -111,7 +110,7 @@ async function fetchInformation(id: string) {
avatar.position = data.position ? data.position : "-";
if (data.avatarName) {
fetchProfile(data.id as string,data.avatarName);
fetchProfile(data.id as string, data.avatarName);
}
})
.catch((err) => {
@ -156,7 +155,7 @@ async function fetchProfileGov(id: string) {
}
function redirecToRegistry() {
router.push(`/registry-new/${props.id}`);
router.push(`/registry-new${empType.value}/${props.id}`);
modal.value = false;
}
@ -168,8 +167,6 @@ watch(
if (props.id) {
fetchInformation(props.id);
fetchProfileGov(props.id);
fileName.value = `profile-${props.id}`;
// fetchProfile(props.id as string);
}
}
}