Skip to content

Commit

Permalink
fix: [611] add checks for addresses of create/edit organization general
Browse files Browse the repository at this point in the history
  • Loading branch information
dragos1195 committed Aug 22, 2024
1 parent bcabb10 commit d9dd7a8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ const CreateOrganizationGeneral = () => {
setValue('organizationAddress', address);
setValue('organizationCity', city);
setValue('organizationCounty', county);

setOrganizationCounty(county);
}
}, [watchHasSameAddress]);

Expand Down Expand Up @@ -432,6 +434,7 @@ const CreateOrganizationGeneral = () => {
selected={value}
onChange={onChange}
readonly={readonly}
disabled={!county}
/>
);
}}
Expand Down Expand Up @@ -644,6 +647,7 @@ const CreateOrganizationGeneral = () => {
onChange: onChange,
id: 'create-organization-general__org-organization-address',
}}
disabled={watchHasSameAddress}
readonly={readonly}
/>
);
Expand Down Expand Up @@ -671,6 +675,7 @@ const CreateOrganizationGeneral = () => {
handleSetOrganizationCounty(e)
}}
readonly={readonly}
disabled={watchHasSameAddress}
/>
);
}}
Expand All @@ -693,6 +698,7 @@ const CreateOrganizationGeneral = () => {
selected={value}
onChange={onChange}
readonly={readonly}
disabled={watchHasSameAddress || !organizationCounty}
/>
);
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ const OrganizationGeneral = () => {
selected={value}
onChange={onChange}
readonly={readonly}
disabled={!county}
/>
);
}}
Expand Down Expand Up @@ -703,6 +704,7 @@ const OrganizationGeneral = () => {
placeholder={OrganizationGeneralConfig.organizationAddress.config.placeholder}
onChange={onChange}
id="create-organization-general__org-organization-address"
disabled={watchHasSameAddress}
/>
);
}}
Expand All @@ -729,6 +731,7 @@ const OrganizationGeneral = () => {
handleSetOrganizationCounty(e)
}}
readonly={readonly}
disabled={watchHasSameAddress}
/>
);
}}
Expand All @@ -751,6 +754,7 @@ const OrganizationGeneral = () => {
selected={value}
onChange={onChange}
readonly={readonly}
disabled={watchHasSameAddress || !organizationCounty}
/>
);
}}
Expand Down

0 comments on commit d9dd7a8

Please sign in to comment.