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 29e5c4558..b0a40d157 100644 --- a/src/modules/04_registryNew/components/detail/PersonalInformation/01_Profile.vue +++ b/src/modules/04_registryNew/components/detail/PersonalInformation/01_Profile.vue @@ -25,8 +25,16 @@ const { messageError, dialogConfirm, } = mixin; -const { calculateAge, getGender, getRelationship, getReligion, getBloodGroup } = - store; +const { + calculateAge, + fetchPerson, + filterSelector, + // getGender, + // getRelationship, + // getReligion, + // getBloodGroup, + // getPersonOp, +} = store; const profileId = ref( route.params.id ? route.params.id.toString() : "" ); @@ -354,10 +362,19 @@ watch( onMounted(async () => { await getData(); - store.genderOp.length === 0 ? await getGender() : ""; - store.relationshipOp.length === 0 ? await getRelationship() : ""; - store.religionOp.length === 0 ? await getReligion() : ""; - store.bloodGroupOp.length === 0 ? await getBloodGroup() : ""; + if ( + store.Ops.prefixOps.length === 0 || + store.Ops.genderOps.length === 0 || + store.Ops.bloodOps.length === 0 || + store.Ops.statusOps.length === 0 || + store.Ops.religionOps.length === 0 + ) { + await fetchPerson(); + } + // store.genderOp.length === 0 ? await getGender() : ""; + // store.relationshipOp.length === 0 ? await getRelationship() : ""; + // store.religionOp.length === 0 ? await getReligion() : ""; + // store.bloodGroupOp.length === 0 ? await getBloodGroup() : ""; });