Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

psp-9033 ensure legal description is populated correctly from FA parc… #4335

Merged
merged 2 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ export const PropertyMapSelectorSubForm: React.FunctionComponent<
const pid = selectedMapProperty?.pid;
const pin = selectedMapProperty?.pin;
const planNumber = selectedMapProperty?.planNumber;
const legalDescription =
selectedProperty?.pimsFeature?.properties?.LAND_LEGAL_DESCRIPTION ??
selectedProperty?.parcelFeature?.properties?.LEGAL_DESCRIPTION;
const legalDescription = selectedMapProperty?.legalDescription;
const address = selectedMapProperty?.address;
const region = selectedMapProperty?.region;
const regionName = selectedMapProperty?.regionName;
Expand Down
5 changes: 4 additions & 1 deletion source/frontend/src/features/mapSideBar/shared/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,10 @@ export class PropertyForm {
? enumFromValue(model?.pimsFeature?.properties?.PROPERTY_AREA_UNIT_TYPE_CODE, AreaUnitTypes)
: AreaUnitTypes.SquareMeters,
isRetired: model?.pimsFeature?.properties?.IS_RETIRED ?? false,
legalDescription: model?.pimsFeature?.properties?.LAND_LEGAL_DESCRIPTION ?? '',
legalDescription:
model?.pimsFeature?.properties?.LAND_LEGAL_DESCRIPTION ??
model?.parcelFeature?.properties?.LEGAL_DESCRIPTION ??
'',
});
}

Expand Down
5 changes: 4 additions & 1 deletion source/frontend/src/utils/mapPropertyUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,10 @@ export function featuresetToMapProperty(
parcelFeature?.properties?.PLAN_NUMBER ??
undefined,
address: address ?? formattedAddress ?? undefined,
legalDescription: parcelFeature?.properties?.LEGAL_DESCRIPTION ?? undefined,
legalDescription:
pimsFeature?.properties?.LAND_LEGAL_DESCRIPTION ??
parcelFeature?.properties?.LEGAL_DESCRIPTION ??
undefined,
region: isNumber(regionFeature?.properties?.REGION_NUMBER)
? regionFeature?.properties?.REGION_NUMBER
: RegionCodes.Unknown,
Expand Down
Loading