diff --git a/frontend/src/pages/bceidform/BusinessInformationWizardStep.vue b/frontend/src/pages/bceidform/BusinessInformationWizardStep.vue index 5206d96bcc..1f489638af 100644 --- a/frontend/src/pages/bceidform/BusinessInformationWizardStep.vue +++ b/frontend/src/pages/bceidform/BusinessInformationWizardStep.vue @@ -53,7 +53,7 @@ watch( const validation = reactive>({ businessType: !!formData.value.businessInformation.businessType, business: !!formData.value.businessInformation.businessName, - birthdate: !!formData.value.businessInformation.birthdate, + birthdate: true, // temporary value }); const checkValid = () => @@ -78,6 +78,16 @@ const selectedOption = computed(() => { } }); +const showBirthDate = computed( + () => + validation.business && + (selectedOption.value === BusinessTypeEnum.U || + formData.value.businessInformation.clientType === ClientTypeEnum[ClientTypeEnum.RSP]), +); + +// validation.birthdate initialization +validation.birthdate = !showBirthDate.value || !!formData.value.businessInformation.businessName; + const autoCompleteUrl = computed( () => `/api/clients/name/${formData.value.businessInformation.businessName || ""}` ); @@ -202,13 +212,6 @@ watch([selectedOption], () => { } }); -const showBirthDate = computed( - () => - validation.business && - (selectedOption.value === BusinessTypeEnum.U || - formData.value.businessInformation.clientType === ClientTypeEnum[ClientTypeEnum.RSP]), -); - watch(showBirthDate, (value) => { if (value) { validation.birthdate = !!formData.value.businessInformation.birthdate;