From 862cad07be1fc9367e2738c00101defc316be2a0 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 29 Apr 2025 10:44:44 +0700 Subject: [PATCH] fix Bug registry-temp --- src/components/Dialogs/PopupPersonalNew.vue | 8 ++++- .../08_registryEmployee/views/Main.vue | 35 ++++++++++--------- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/src/components/Dialogs/PopupPersonalNew.vue b/src/components/Dialogs/PopupPersonalNew.vue index 35003b4b6..c83c16196 100644 --- a/src/components/Dialogs/PopupPersonalNew.vue +++ b/src/components/Dialogs/PopupPersonalNew.vue @@ -45,6 +45,7 @@ const emit = defineEmits(["update:modal"]); /** ตัวแปร*/ const modal = ref(false); +const employeeClass = ref(""); const avatar = reactive({ avatar: "", fullname: "", @@ -124,6 +125,7 @@ async function fetchInformation(id: string) { imformation.birthDate = data.birthDate ? date2Thai(data.birthDate) : "-"; imformation.age = data.birthDate ? calculateAge(data.birthDate) : "-"; imformation.gender = data.gender ?? "-"; + employeeClass.value = data.employeeClass ?? "officer"; avatar.fullname = `${data.prefix}${data.firstName} ${data.lastName}`; @@ -191,7 +193,11 @@ async function fetchProfileGov(id: string) { function redirecToRegistry() { router.push( `/registry-${ - props.type.toLocaleLowerCase() == "employee" ? "employee" : "officer" + employeeClass.value.toLocaleLowerCase() === "perm" + ? "employee" + : employeeClass.value.toLocaleLowerCase() === "temp" + ? "temp" + : "officer" }/${props.id}` ); modal.value = false; diff --git a/src/modules/08_registryEmployee/views/Main.vue b/src/modules/08_registryEmployee/views/Main.vue index 959ec554e..ac14797ae 100644 --- a/src/modules/08_registryEmployee/views/Main.vue +++ b/src/modules/08_registryEmployee/views/Main.vue @@ -30,6 +30,7 @@ const { hideLoader, date2Thai, dialogRemove, + findOrgNameHtml, } = useCounterMixin(); const { statusText } = useRegistryEmp(); @@ -93,7 +94,7 @@ const columns = ref([ { name: "draftOrganizationOrganization", align: "left", - label: "ตำแหน่ง/หน่วยงานที่รับการบรรจุ", + label: "ตำแหน่ง/สังกัดที่รับการบรรจุ", sortable: false, field: "draftOrganizationOrganization", headerStyle: "font-size: 14px", @@ -303,6 +304,7 @@ onMounted(async () => {
รายชื่อลูกจ้างชั่วคราว
+
{