diff --git a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/models/UpdatePropertyDetailsFormModel.ts b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/models/UpdatePropertyDetailsFormModel.ts index 401743c7de..e6a5f2d735 100644 --- a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/models/UpdatePropertyDetailsFormModel.ts +++ b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetails/update/models/UpdatePropertyDetailsFormModel.ts @@ -2,6 +2,7 @@ import { GeoJsonProperties } from 'geojson'; import { isEmpty } from 'lodash'; import { ApiGen_CodeTypes_PropertyPPHStatusTypes } from '@/models/api/generated/ApiGen_CodeTypes_PropertyPPHStatusTypes'; +import { ApiGen_CodeTypes_PropertyTypes } from '@/models/api/generated/ApiGen_CodeTypes_PropertyTypes'; import { ApiGen_Concepts_Address } from '@/models/api/generated/ApiGen_Concepts_Address'; import { ApiGen_Concepts_CodeType } from '@/models/api/generated/ApiGen_Concepts_CodeType'; import { ApiGen_Concepts_HistoricalFileNumber } from '@/models/api/generated/ApiGen_Concepts_HistoricalFileNumber'; @@ -228,9 +229,12 @@ export class UpdatePropertyDetailsFormModel { model.volumetricUnitTypeCode = fromTypeCode(base.volumetricUnit) ?? undefined; model.volumetricParcelTypeCode = fromTypeCode(base.volumetricType) ?? undefined; - model.propertyTypeCode = fromTypeCode(base.propertyType) ?? undefined; - model.statusTypeCode = fromTypeCode(base.status) ?? undefined; + model.propertyTypeCode = + exists(base.propertyType) && !base.propertyType.isDisabled + ? fromTypeCode(base.propertyType) + : ApiGen_CodeTypes_PropertyTypes.UNKNOWN.toString(); + model.statusTypeCode = fromTypeCode(base.status) ?? undefined; model.districtTypeCode = fromTypeCode(base.district) ?? undefined; model.districtTypeCodeDescription = base.district?.description ?? undefined;