diff --git a/src/components/Dialogs/PopupPersonalNew.vue b/src/components/Dialogs/PopupPersonalNew.vue index 857c993ab..e1cce5bf9 100644 --- a/src/components/Dialogs/PopupPersonalNew.vue +++ b/src/components/Dialogs/PopupPersonalNew.vue @@ -22,7 +22,7 @@ const retireDate = ref(); const { showLoader, hideLoader, messageError, date2Thai } = mixin; const isEmployee = defineModel("isEmployee", { type: String }); -const empType = ref(""); +const empType = ref("officer"); /** props*/ const props = defineProps({ id: { @@ -95,7 +95,12 @@ function calculateAge(birthDate: Date | null) { async function fetchInformation(id: string) { showLoader(); await http - .get(config.API.orgProfileById(id, empType.value)) + .get( + config.API.orgProfileById( + id, + `${empType.value == "employee" ? `-${empType.value}` : ""}` + ) + ) .then((res) => { const data = res.data.result; imformation.prefix = data.prefix ? data.prefix : "-"; @@ -128,7 +133,12 @@ async function fetchInformation(id: string) { async function fetchProfileGov(id: string) { showLoader(); await http - .get(config.API.profileNewGovernmentById(id, empType.value)) + .get( + config.API.profileNewGovernmentById( + id, + `${empType.value == "employee" ? `-${empType.value}` : ""}` + ) + ) .then((res) => { const data = res.data.result; goverment.oc = data.org !== "" ? data.org : "-"; @@ -155,7 +165,7 @@ async function fetchProfileGov(id: string) { } function redirecToRegistry() { - router.push(`/registry-officer${empType.value}/${props.id}`); + router.push(`/registry-${empType.value}/${props.id}`); modal.value = false; } @@ -168,8 +178,8 @@ watch( empType.value = route.name === "appoint-employee-detail" || isEmployee.value == "EMPLOYEE" - ? "-employee" - : ""; + ? "employee" + : "officer"; fetchInformation(props.id); fetchProfileGov(props.id); diff --git a/src/modules/03_recruiting/views/03_editor/index.vue b/src/modules/03_recruiting/views/03_editor/index.vue index 4dcee6d83..91fb3a476 100644 --- a/src/modules/03_recruiting/views/03_editor/index.vue +++ b/src/modules/03_recruiting/views/03_editor/index.vue @@ -1,7 +1,7 @@ + diff --git a/src/modules/13_salary/components/salaryEmployeeChart/TabStructure.vue b/src/modules/13_salary/components/salaryEmployeeChart/TabStructure.vue index bc9c8d5e5..c5c5870b3 100644 --- a/src/modules/13_salary/components/salaryEmployeeChart/TabStructure.vue +++ b/src/modules/13_salary/components/salaryEmployeeChart/TabStructure.vue @@ -1,5 +1,6 @@