diff --git a/src/modules/04_registryNew/components/detail/PersonalInformation/01_Profile.vue b/src/modules/04_registryNew/components/detail/PersonalInformation/01_Profile.vue index 377681861..1e2ba6767 100644 --- a/src/modules/04_registryNew/components/detail/PersonalInformation/01_Profile.vue +++ b/src/modules/04_registryNew/components/detail/PersonalInformation/01_Profile.vue @@ -10,14 +10,17 @@ import HistoryTable from "@/components/TableHistory.vue"; import DialogHeader from "@/components/DialogHeader.vue"; import type { InformationOps, + Information, DataOption, } from "@/modules/04_registryNew/interface/index/Main"; +import { defaultInformation } from "@/modules/04_registryNew/interface/index/Main"; import type { RequestItemsHistoryObject } from "@/modules/04_registryNew/interface/request/Information"; const $q = useQuasar(); const mixin = useCounterMixin(); const { showLoader, hideLoader, date2Thai, messageError } = mixin; +const informaData = ref(defaultInformation); const modal = ref(false); const myForm = ref(); const rowsHistory = ref([]); @@ -300,6 +303,26 @@ const visibleColumnsHistory = ref([ "createdAt", ]); +async function fetchData() { + informaData.value.cardid = resultData.value.citizenId; + informaData.value.prefixId = resultData.value.prefixId; + informaData.value.prefix = resultData.value.prefix; + informaData.value.firstname = resultData.value.firstName; + informaData.value.lastname = resultData.value.lastName; + informaData.value.birthDate = resultData.value.birthDate; + informaData.value.age = resultData.value.age; + informaData.value.genderId = resultData.value.genderId; + informaData.value.bloodId = resultData.value.bloodGroupId; + informaData.value.nationality = resultData.value.nationality; + informaData.value.ethnicity = resultData.value.race; + informaData.value.statusId = resultData.value.relationshipId; + informaData.value.religionId = resultData.value.religionId; + informaData.value.tel = resultData.value.telephoneNumber; + informaData.value.employeeType = resultData.value.employeeType; + informaData.value.employeeClass = resultData.value.employeeClass; + informaData.value.profileType = resultData.value.profileType; +} + // get person detail list async function fetchPerson() { // showLoader(); @@ -478,6 +501,7 @@ function onSubmit() { onMounted(async () => { await fetchPerson(); + await fetchData(); });