ปรับ API ทะเบียนประวัติ (ใหม่)

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-05-13 18:06:06 +07:00
parent e100ac0ec3
commit f91f3d9b40
8 changed files with 645 additions and 598 deletions

View file

@ -37,6 +37,10 @@ const {
} = mixin;
const profileId = ref<string>(route.params.id.toString());
const empType = ref<string>(
route.name === "registryNewByid" ? "" : "-employee"
);
const formDetail = ref<ResponseObject>();
const itemsMenu = ref<DataOption[]>([
{
@ -142,7 +146,7 @@ async function fetchProfile(id: string) {
async function fetchDataPersonal() {
showLoader();
await http
.get(config.API.registryNewByProfileId(profileId.value))
.get(config.API.registryNewByProfileId(profileId.value, empType.value))
.then((res) => {
formDetail.value = res.data.result;
})