diff --git a/source/backend/apimodels/CodeTypes/PropertyTypes.cs b/source/backend/apimodels/CodeTypes/PropertyTypes.cs new file mode 100644 index 0000000000..e91bcfdffc --- /dev/null +++ b/source/backend/apimodels/CodeTypes/PropertyTypes.cs @@ -0,0 +1,39 @@ +using System.Runtime.Serialization; +using System.Text.Json.Serialization; + +namespace Pims.Api.Models.CodeTypes +{ + [JsonConverter(typeof(JsonStringEnumMemberConverter))] + public enum PropertyTypes + { + [EnumMember(Value = "CROWNFSRVD")] + CROWNFSRVD, + + [EnumMember(Value = "CROWNFUSRVD")] + CROWNFUSRVD, + + [EnumMember(Value = "CROWNPSRVD")] + CROWNPSRVD, + + [EnumMember(Value = "CROWNPUSRVD")] + CROWNPUSRVD, + + [EnumMember(Value = "HWYROAD")] + HWYROAD, + + [EnumMember(Value = "PARKS")] + PARKS, + + [EnumMember(Value = "RESERVE")] + RESERVE, + + [EnumMember(Value = "STRATACP")] + STRATACP, + + [EnumMember(Value = "TITLED")] + TITLED, + + [EnumMember(Value = "UNKNOWN")] + UNKNOWN, + } +} diff --git a/source/frontend/src/assets/scss/_variables.module.scss b/source/frontend/src/assets/scss/_variables.module.scss index cf87286e17..339e97bca1 100644 --- a/source/frontend/src/assets/scss/_variables.module.scss +++ b/source/frontend/src/assets/scss/_variables.module.scss @@ -29,7 +29,6 @@ slideOutBlue: $slide-out-blue; filterBoxColor: $filter-box-color; - filterBoxColor: $filter-box-color; completedColor: $completed-color; diff --git a/source/frontend/src/features/leases/add/LeaseDetailSubForm.test.tsx b/source/frontend/src/features/leases/add/LeaseDetailSubForm.test.tsx index 8c160abbbf..b3f2a534e5 100644 --- a/source/frontend/src/features/leases/add/LeaseDetailSubForm.test.tsx +++ b/source/frontend/src/features/leases/add/LeaseDetailSubForm.test.tsx @@ -126,7 +126,12 @@ describe('LeaseDetailSubForm component', () => { const { container, getTerminationReason } = await setup({}); await act(async () => { - fillInput(container, 'statusTypeCode', ApiGen_CodeTypes_LeaseStatusTypes.TERMINATED, 'select'); + fillInput( + container, + 'statusTypeCode', + ApiGen_CodeTypes_LeaseStatusTypes.TERMINATED, + 'select', + ); }); expect(getTerminationReason()).toBeInTheDocument(); 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; diff --git a/source/frontend/src/models/api/generated/ApiGen_CodeTypes_PropertyTypes.ts b/source/frontend/src/models/api/generated/ApiGen_CodeTypes_PropertyTypes.ts new file mode 100644 index 0000000000..c187497b3a --- /dev/null +++ b/source/frontend/src/models/api/generated/ApiGen_CodeTypes_PropertyTypes.ts @@ -0,0 +1,16 @@ +/** + * File autogenerated by TsGenerator. + * Do not manually modify, changes made to this file will be lost when this file is regenerated. + */ +export enum ApiGen_CodeTypes_PropertyTypes { + CROWNFSRVD = 'CROWNFSRVD', + CROWNFUSRVD = 'CROWNFUSRVD', + CROWNPSRVD = 'CROWNPSRVD', + CROWNPUSRVD = 'CROWNPUSRVD', + HWYROAD = 'HWYROAD', + PARKS = 'PARKS', + RESERVE = 'RESERVE', + STRATACP = 'STRATACP', + TITLED = 'TITLED', + UNKNOWN = 'UNKNOWN', +} diff --git a/source/frontend/src/models/api/generated/ApiGen_Concepts_Insurance.ts b/source/frontend/src/models/api/generated/ApiGen_Concepts_Insurance.ts index 08d6d60733..44de24151d 100644 --- a/source/frontend/src/models/api/generated/ApiGen_Concepts_Insurance.ts +++ b/source/frontend/src/models/api/generated/ApiGen_Concepts_Insurance.ts @@ -16,5 +16,5 @@ export interface ApiGen_Concepts_Insurance extends ApiGen_Base_BaseAudit { coverageDescription: string | null; coverageLimit: number | null; expiryDate: UtcIsoDate | null; - isInsuranceInPlace: boolean; + isInsuranceInPlace: boolean | null; } diff --git a/source/frontend/src/models/api/generated/ApiGen_Mayan_FilePage.ts b/source/frontend/src/models/api/generated/ApiGen_Mayan_FilePage.ts index eb2a12fb4c..57211b138d 100644 --- a/source/frontend/src/models/api/generated/ApiGen_Mayan_FilePage.ts +++ b/source/frontend/src/models/api/generated/ApiGen_Mayan_FilePage.ts @@ -9,6 +9,6 @@ export interface ApiGen_Mayan_FilePage { document_file_id: number; document_file_url: string | null; image_url: string | null; - page_number: string | null; + page_number: number; url: string | null; }