diff --git a/api.planx.uk/modules/admin/session/html.ts b/api.planx.uk/modules/admin/session/html.ts index 35d56cea18..fb25bca8bc 100644 --- a/api.planx.uk/modules/admin/session/html.ts +++ b/api.planx.uk/modules/admin/session/html.ts @@ -28,7 +28,7 @@ export const getHTMLExport: HTMLExportHandler = async (req, res, next) => { const responses = await $api.export.csvData(req.params.sessionId); const boundingBox = session.data.passport.data[ - "property.boundary.site.buffered" + "proposal.site.buffered" ] as unknown as GeoJSON.Feature; const userAction = session.data.passport.data?.[ "drawBoundary.action" @@ -75,7 +75,7 @@ export const getRedactedHTMLExport: HTMLExportHandler = async ( req.params.sessionId, ); const boundingBox = session.data.passport.data[ - "property.boundary.site.buffered" + "proposal.site.buffered" ] as unknown as GeoJSON.Feature; const userAction = session.data.passport.data?.[ "drawBoundary.action" diff --git a/api.planx.uk/modules/flows/downloadSchema/service.ts b/api.planx.uk/modules/flows/downloadSchema/service.ts index de83ba112a..47d48b92bd 100644 --- a/api.planx.uk/modules/flows/downloadSchema/service.ts +++ b/api.planx.uk/modules/flows/downloadSchema/service.ts @@ -17,10 +17,7 @@ export const getFlowSchema = async (flowId: string) => { type: nodeData?.type?.toString() || "_root", text: nodeData.data?.text, planx_variable: - nodeData.data?.fn || - nodeData.data?.val || - nodeData.data?.output || - nodeData.data?.dataFieldBoundary, + nodeData.data?.fn || nodeData.data?.val || nodeData.data?.output, }), ); diff --git a/api.planx.uk/modules/send/utils/exportZip.test.ts b/api.planx.uk/modules/send/utils/exportZip.test.ts index 5f9d1840cf..8a7e0f2daf 100644 --- a/api.planx.uk/modules/send/utils/exportZip.test.ts +++ b/api.planx.uk/modules/send/utils/exportZip.test.ts @@ -136,7 +136,7 @@ describe("buildSubmissionExportZip", () => { }); test("geojson and location plan is excluded when not present", async () => { - // set-up mock session passport excluding "property.boundary.site" + // set-up mock session passport excluding "proposal.site" const lowcalSessionWithoutBoundary: Partial = { ...mockLowcalSession, id: "1234", @@ -146,7 +146,7 @@ describe("buildSubmissionExportZip", () => { passport: { data: { ...mockLowcalSession.data!.passport.data, - "property.boundary.site": undefined, + "proposal.site": undefined, }, }, }, diff --git a/api.planx.uk/modules/send/utils/exportZip.ts b/api.planx.uk/modules/send/utils/exportZip.ts index da068d0aef..f518573b02 100644 --- a/api.planx.uk/modules/send/utils/exportZip.ts +++ b/api.planx.uk/modules/send/utils/exportZip.ts @@ -146,7 +146,7 @@ export async function buildSubmissionExportZip({ } } - const boundingBox = passport.data["property.boundary.site.buffered"]; + const boundingBox = passport.data["proposal.site.buffered"]; const userAction = passport.data?.["drawBoundary.action"]; // generate and add an HTML overview document for the submission to zip @@ -173,7 +173,7 @@ export async function buildSubmissionExportZip({ // add an optional GeoJSON file to zip const geojson: GeoJSON.Feature | undefined = - passport?.data?.["property.boundary.site"]; + passport?.data?.["proposal.site"]; if (geojson) { if (userAction) { geojson["properties"] ??= {}; diff --git a/api.planx.uk/tests/mocks/saveAndReturnMocks.ts b/api.planx.uk/tests/mocks/saveAndReturnMocks.ts index 5900d2b9aa..028d9494b7 100644 --- a/api.planx.uk/tests/mocks/saveAndReturnMocks.ts +++ b/api.planx.uk/tests/mocks/saveAndReturnMocks.ts @@ -42,7 +42,7 @@ export const mockLowcalSession: LowCalSession = { }, "drawBoundary.action": "Amended the title boundary", "proposal.projectType": ["new.office"], - "property.boundary.site": { + "proposal.site": { type: "Feature", geometry: { type: "Polygon", diff --git a/e2e/tests/api-driven/src/invite-to-pay/mocks/flow.json b/e2e/tests/api-driven/src/invite-to-pay/mocks/flow.json index 6ad9eb5a31..24d1ced07a 100644 --- a/e2e/tests/api-driven/src/invite-to-pay/mocks/flow.json +++ b/e2e/tests/api-driven/src/invite-to-pay/mocks/flow.json @@ -157048,9 +157048,8 @@ "policyRef": "

The Town and Country Planning (Development Management Procedure) (England) Order 2015,

Planning Practice Guidance (PPG)

", "description": "

The red line shown below should include:

If the red line already includes all these, select continue. If not, select More information for guidance on how to amend or redraw the outline.

", "howMeasured": "

We have pre-populated the map with a red outline that includes the entire property using information from the Land Registry.

In some cases, this outline might not include all the works or the areas that will be closed off. This might be because you're proposing works to a public highway (such as a dropped kerb), doing works that involve multiple properties, or works to a building that is part of a larger estate.

In these cases, you should amend the red outline by dragging the edges, or erase it by clicking the 🗑-icon on the map and draw a new outline.

How to draw and amend the outline

  1. Move the cursor to the corner you want to start with and click or tap once.

  2. Move the cursor to the next corner and click or tap.

  3. Repeat until you have the shape you need.

  4. Click or tap the last corner again to stop drawing.

  5. To amend the outline, click or tap on a line and drag it into a new position.

", - "dataFieldArea": "property.boundary.area", "hideFileUpload": false, - "dataFieldBoundary": "property.boundary.site", + "fn": "proposal.site", "titleForUploading": "Upload a location plan", "descriptionForUploading": "

Your location plan must:

" }, diff --git a/e2e/tests/api-driven/src/invite-to-pay/mocks/session.json b/e2e/tests/api-driven/src/invite-to-pay/mocks/session.json index 80d1506ae1..9f618081c2 100644 --- a/e2e/tests/api-driven/src/invite-to-pay/mocks/session.json +++ b/e2e/tests/api-driven/src/invite-to-pay/mocks/session.json @@ -93,7 +93,7 @@ "uniform.consentRegime": ["Certificate of Lawfulness"], "application.about.form": ["Proposed building works"], "property.EPCKnown.form": ["No"], - "property.boundary.site": { + "proposal.site": { "type": "Feature", "geometry": { "type": "Polygon", @@ -814,7 +814,7 @@ "auto": false, "data": { "proposal.siteArea": 21.6, - "property.boundary.site": { + "proposal.site": { "type": "Feature", "geometry": { "type": "Polygon", diff --git a/editor.planx.uk/src/@planx/components/DrawBoundary/Editor.tsx b/editor.planx.uk/src/@planx/components/DrawBoundary/Editor.tsx index c8b11161ab..44b6599ff1 100644 --- a/editor.planx.uk/src/@planx/components/DrawBoundary/Editor.tsx +++ b/editor.planx.uk/src/@planx/components/DrawBoundary/Editor.tsx @@ -53,25 +53,13 @@ function DrawBoundaryComponent(props: Props) { onChange={formik.handleChange} /> - + - - - - - diff --git a/editor.planx.uk/src/@planx/components/DrawBoundary/Public/Public.test.tsx b/editor.planx.uk/src/@planx/components/DrawBoundary/Public/Public.test.tsx index 208926e51a..6afd73679d 100644 --- a/editor.planx.uk/src/@planx/components/DrawBoundary/Public/Public.test.tsx +++ b/editor.planx.uk/src/@planx/components/DrawBoundary/Public/Public.test.tsx @@ -42,8 +42,7 @@ test("recovers previously submitted files when clicking the back button", async const { user } = setup( { const handleSubmit = vi.fn(); const previouslySubmittedData = { - "property.boundary.site": { + "proposal.site": { type: "Feature", properties: {}, geometry: { @@ -85,8 +84,7 @@ test("recovers previously submitted drawing when clicking the back button", asyn const { user } = setup( { const { container } = setup( { titleForUploading: "Upload a location plan", descriptionForUploading: "", hideFileUpload: false, - dataFieldBoundary: "property.boundary.site", - dataFieldArea: "property.boundary.area", + fn: "proposal.site", }, }, }; @@ -344,8 +337,7 @@ test("appends to existing '_requestedFiles' value", async () => { const { user } = setup( { // Previously submitted data is a good proxy for having previously fetched a title boundary and arriving to Draw with geojson in passport ! const previouslySubmittedData = { - "property.boundary.site": { + "proposal.site": { type: "Feature", properties: {}, geometry: { @@ -427,8 +419,7 @@ test("submits data based on the page you continue onwards from", async () => { const { user } = setup( { // Confirm that file is NOT saved to passport, but geojson is const submitted = handleSubmit.mock.calls[0][0]; expect(submitted.data).not.toHaveProperty(PASSPORT_UPLOAD_KEY); - expect(submitted.data["property.boundary.site"]).toEqual( - previouslySubmittedData["property.boundary.site"], + expect(submitted.data["proposal.site"]).toEqual( + previouslySubmittedData["proposal.site"], ); // DrawBoundary action captured correctly based on page diff --git a/editor.planx.uk/src/@planx/components/DrawBoundary/Public/index.tsx b/editor.planx.uk/src/@planx/components/DrawBoundary/Public/index.tsx index 8c533ae74b..58e5f20c05 100644 --- a/editor.planx.uk/src/@planx/components/DrawBoundary/Public/index.tsx +++ b/editor.planx.uk/src/@planx/components/DrawBoundary/Public/index.tsx @@ -54,11 +54,11 @@ export default function Component(props: Props) { const passport = useStore((state) => state.computePassport()); const previousBoundary = - props.previouslySubmittedData?.data?.[props.dataFieldBoundary] || - passport.data?.["property.boundary.title"]; + props.previouslySubmittedData?.data?.[props.fn] || + passport.data?.["property.boundary"]; const previousArea = - props.previouslySubmittedData?.data?.[props.dataFieldArea] || - passport.data?.["property.boundary.title.area"]; + props.previouslySubmittedData?.data?.[props.fn] || + passport.data?.["proposal.site.area"]; const [boundary, setBoundary] = useState(previousBoundary); const [area, setArea] = useState(previousArea); const [mapValidationError, setMapValidationError] = useState(); @@ -150,24 +150,24 @@ export default function Component(props: Props) { props.handleSubmit?.({ data: { ...newPassportData } }); } - if (boundary && props.dataFieldBoundary) { - newPassportData[props.dataFieldBoundary] = boundary; - newPassportData[`${props.dataFieldBoundary}.buffered`] = buffer( + if (boundary && props.fn) { + newPassportData[props.fn] = boundary; + newPassportData[`${props.fn}.buffered`] = buffer( boundary, bufferInMeters, { units: "meters" }, ); - if (area && props.dataFieldArea) { - newPassportData[props.dataFieldArea] = area; - newPassportData[`${props.dataFieldArea}.hectares`] = + if (area && props.fn) { + newPassportData[`${props.fn}.area`] = area; + newPassportData[`${props.fn}.hectares`] = squareMetresToHectares(area); } // Track the type of map interaction if ( boundary?.geometry === - passport.data?.["property.boundary.title"]?.geometry + passport.data?.["property.boundary"]?.geometry ) { newPassportData[PASSPORT_COMPONENT_ACTION_KEY] = DrawBoundaryUserAction.Accept; diff --git a/editor.planx.uk/src/@planx/components/DrawBoundary/model.ts b/editor.planx.uk/src/@planx/components/DrawBoundary/model.ts index 14e7098779..69875aa276 100644 --- a/editor.planx.uk/src/@planx/components/DrawBoundary/model.ts +++ b/editor.planx.uk/src/@planx/components/DrawBoundary/model.ts @@ -13,8 +13,7 @@ export interface DrawBoundary extends BaseNodeData { titleForUploading: string; descriptionForUploading: string; hideFileUpload?: boolean; - dataFieldBoundary: string; - dataFieldArea: string; + fn: string; } export const parseDrawBoundary = ( @@ -29,9 +28,7 @@ export const parseDrawBoundary = ( data?.descriptionForUploading || defaultContent?.["descriptionForUploading"], hideFileUpload: data?.hideFileUpload || defaultContent?.["hideFileUpload"], - dataFieldBoundary: - data?.dataFieldBoundary || defaultContent?.["dataFieldBoundary"], - dataFieldArea: data?.dataFieldArea || defaultContent?.["dataFieldArea"], + fn: data?.fn || defaultContent?.["fn"], info: data?.info || defaultContent?.["info"], policyRef: data?.policyRef || defaultContent?.["policyRef"], howMeasured: data?.howMeasured || defaultContent?.["howMeasured"], @@ -54,8 +51,7 @@ const defaultContent: DrawBoundary = { howMeasured: '

We have pre-populated the map with a red outline that includes the entire property using information from Land Registry.

In some cases, this outline might not include all the works or the areas that will be closed off. This might be because you're proposing works to a public highway (such as a dropped kerb), doing works that involve multiple properties, or works to a building that is part of a larger estate.

In these cases, you should amend the red outline by dragging the edges, or erase it by clicking the :wastebasket:-icon on the map and draw a new outline.

How to draw and amend the outline

  1. Move the cursor to the corner you want to start with and click or tap once.

  2. Move the cursor to the next corner and click or tap.

  3. Repeat until you have the shape you need.

  4. Click or tap the last corner again to stop drawing.

  5. To amend the outline, click or tap on a line and drag it into a new position.

', hideFileUpload: false, - dataFieldBoundary: "property.boundary.site", - dataFieldArea: "property.boundary.area", + fn: "proposal.site", titleForUploading: "Upload a location plan", descriptionForUploading: "

Your location plan must:

  • be based on an accurate, recognisable map

  • be drawn to a scale, labelled, and/or marked with a scale bar

  • show the site outline in red

  • include a north point

", diff --git a/editor.planx.uk/src/@planx/components/FindProperty/Public/Public.test.tsx b/editor.planx.uk/src/@planx/components/FindProperty/Public/Public.test.tsx index b2bd212e6b..6868a85a4a 100644 --- a/editor.planx.uk/src/@planx/components/FindProperty/Public/Public.test.tsx +++ b/editor.planx.uk/src/@planx/components/FindProperty/Public/Public.test.tsx @@ -36,9 +36,9 @@ const osAddressProps = { "property.type": ["residential.HMO.parent"], "property.localAuthorityDistrict": ["Southwark"], "property.region": ["London"], - "property.boundary.title.area": 1232.22, - "property.boundary.title.area.hectares": 0.123222, - "property.boundary.title": { + "property.boundary.area": 1232.22, + "property.boundary.area.hectares": 0.123222, + "property.boundary": { geometry: { type: "MultiPolygon", coordinates: [ @@ -85,9 +85,9 @@ const proposedAddressProps = { }, "property.localAuthorityDistrict": ["Southwark"], "property.region": ["London"], - "property.boundary.title.area": 1232.22, - "property.boundary.title.area.hectares": 0.123222, - "property.boundary.title": { + "property.boundary.area": 1232.22, + "property.boundary.area.hectares": 0.123222, + "property.boundary": { geometry: { type: "MultiPolygon", coordinates: [ diff --git a/editor.planx.uk/src/@planx/components/FindProperty/Public/index.tsx b/editor.planx.uk/src/@planx/components/FindProperty/Public/index.tsx index c7f3093821..033a925f4c 100644 --- a/editor.planx.uk/src/@planx/components/FindProperty/Public/index.tsx +++ b/editor.planx.uk/src/@planx/components/FindProperty/Public/index.tsx @@ -156,9 +156,9 @@ function Component(props: Props) { if (titleBoundary) { const areaSquareMetres = Math.round(area(titleBoundary as Feature) * 100) / 100; - newPassportData["property.boundary.title"] = titleBoundary; - newPassportData["property.boundary.title.area"] = areaSquareMetres; - newPassportData["property.boundary.title.area.hectares"] = + newPassportData["property.boundary"] = titleBoundary; + newPassportData["property.boundary.area"] = areaSquareMetres; + newPassportData["property.boundary.area.hectares"] = squareMetresToHectares(areaSquareMetres); } diff --git a/editor.planx.uk/src/@planx/components/MapAndLabel/Public/index.tsx b/editor.planx.uk/src/@planx/components/MapAndLabel/Public/index.tsx index 5ffc2d2313..4c087c23af 100644 --- a/editor.planx.uk/src/@planx/components/MapAndLabel/Public/index.tsx +++ b/editor.planx.uk/src/@planx/components/MapAndLabel/Public/index.tsx @@ -261,7 +261,7 @@ const Root = () => { basemap={basemap} ariaLabelOlFixedOverlay={`An interactive map for plotting and describing individual ${schemaName.toLocaleLowerCase()}`} geojsonData={ - passport && JSON.stringify(passport["property.boundary.site"]) + passport && JSON.stringify(passport["proposal.site"]) } geojsonBuffer={30} drawMode diff --git a/editor.planx.uk/src/@planx/components/PlanningConstraints/Public.tsx b/editor.planx.uk/src/@planx/components/PlanningConstraints/Public.tsx index 209cd1e93c..26ab658847 100644 --- a/editor.planx.uk/src/@planx/components/PlanningConstraints/Public.tsx +++ b/editor.planx.uk/src/@planx/components/PlanningConstraints/Public.tsx @@ -53,7 +53,7 @@ function Component(props: Props) { state.cachedBreadcrumbs, state.teamSlug, state.teamIntegrations?.hasPlanningData, - state.computePassport().data?.["property.boundary.site"], + state.computePassport().data?.["proposal.site"], state.computePassport().data?.["_overrides"], (state.computePassport().data?.["_address"] as SiteAddress) || {}, ]); diff --git a/editor.planx.uk/src/@planx/components/PlanningConstraints/mocks/simpleFlow.ts b/editor.planx.uk/src/@planx/components/PlanningConstraints/mocks/simpleFlow.ts index 17ed125da3..72fe5ef1d2 100644 --- a/editor.planx.uk/src/@planx/components/PlanningConstraints/mocks/simpleFlow.ts +++ b/editor.planx.uk/src/@planx/components/PlanningConstraints/mocks/simpleFlow.ts @@ -61,7 +61,7 @@ export const simpleBreadcrumbs: Store.Breadcrumbs = { "property.type": ["commercial.office.workspace.gov.local"], "property.localAuthorityDistrict": ["Birmingham"], "property.region": ["West Midlands"], - "property.boundary.title": { + "property.boundary": { geometry: { type: "MultiPolygon", coordinates: [ @@ -88,8 +88,8 @@ export const simpleBreadcrumbs: Store.Breadcrumbs = { "organisation-entity": "13", }, }, - "property.boundary.title.area": 8242.37, - "property.boundary.title.area.hectares": 0.8242370000000001, + "proposal.site.area": 8242.37, + "proposal.site.area.hectares": 0.8242370000000001, "findProperty.action": "Selected an existing address", }, }, diff --git a/editor.planx.uk/src/@planx/components/PropertyInformation/Public.tsx b/editor.planx.uk/src/@planx/components/PropertyInformation/Public.tsx index 5cc2e29352..60bf2cc8e5 100644 --- a/editor.planx.uk/src/@planx/components/PropertyInformation/Public.tsx +++ b/editor.planx.uk/src/@planx/components/PropertyInformation/Public.tsx @@ -44,7 +44,7 @@ function Component(props: PublicProps) { localAuthorityDistrict={ passport.data?.["property.localAuthorityDistrict"] } - titleBoundary={passport.data?.["property.boundary.title"]} + titleBoundary={passport.data?.["property.boundary"]} blpuCodes={blpuCodes} overrideAnswer={overrideAnswer} handleSubmit={() => { diff --git a/editor.planx.uk/src/@planx/components/Review/Public/mocks/fileUpload.tsx b/editor.planx.uk/src/@planx/components/Review/Public/mocks/fileUpload.tsx index cbbbbd9e15..bf50d77245 100644 --- a/editor.planx.uk/src/@planx/components/Review/Public/mocks/fileUpload.tsx +++ b/editor.planx.uk/src/@planx/components/Review/Public/mocks/fileUpload.tsx @@ -156,9 +156,8 @@ export const drawBoundaryFlow = { EO6DzPso8o: { data: { title: "Draw the boundary of the property", - dataFieldArea: "property.boundary.area", hideFileUpload: false, - dataFieldBoundary: "property.boundary.site", + fn: "proposal.site", titleForUploading: "Upload a location plan", }, type: 10, diff --git a/editor.planx.uk/src/@planx/components/SetValue/utils.ts b/editor.planx.uk/src/@planx/components/SetValue/utils.ts index f4585db917..040257520f 100644 --- a/editor.planx.uk/src/@planx/components/SetValue/utils.ts +++ b/editor.planx.uk/src/@planx/components/SetValue/utils.ts @@ -21,7 +21,7 @@ export const handleSetValue: HandleSetValue = ({ }) => { // We do not amend values set at objects // These are internal exceptions we do not want to allow users to edit - // e.g. property.boundary.title + // e.g. property.boundary const isObject = typeof previousValues === "object" && !Array.isArray(previousValues) && diff --git a/editor.planx.uk/src/@planx/components/shared/Preview/SummaryList.tsx b/editor.planx.uk/src/@planx/components/shared/Preview/SummaryList.tsx index 80d2692bc6..29feafb0ca 100644 --- a/editor.planx.uk/src/@planx/components/shared/Preview/SummaryList.tsx +++ b/editor.planx.uk/src/@planx/components/shared/Preview/SummaryList.tsx @@ -480,7 +480,7 @@ function DateInput(props: ComponentProps) { function DrawBoundary(props: ComponentProps) { // check if the user drew a boundary, uploaded a file, or both (or neither if props.node.data?.hideFileUpload is triggered "on") - const geodata = props.userData?.data?.[props.node.data?.dataFieldBoundary]; + const geodata = props.userData?.data?.[props.node.data?.fn]; const locationPlan = props.userData?.data?.[PASSPORT_UPLOAD_KEY]; const fileName = locationPlan ? locationPlan[0].url.split("/").pop() : ""; diff --git a/editor.planx.uk/src/@planx/components/shared/Schema/InputFields/MapFieldInput.tsx b/editor.planx.uk/src/@planx/components/shared/Schema/InputFields/MapFieldInput.tsx index 1698223214..f87ae239c8 100644 --- a/editor.planx.uk/src/@planx/components/shared/Schema/InputFields/MapFieldInput.tsx +++ b/editor.planx.uk/src/@planx/components/shared/Schema/InputFields/MapFieldInput.tsx @@ -72,7 +72,7 @@ export const MapFieldInput: React.FC> = (props) => { height={400} basemap={mapOptions?.basemap} geojsonData={JSON.stringify( - passport.data?.["property.boundary.site"], + passport.data?.["proposal.site"], )} geojsonBuffer={30} drawMode diff --git a/editor.planx.uk/src/pages/FlowEditor/components/Sidebar/Search/SearchResultCard/getDisplayDetailsForResult.tsx b/editor.planx.uk/src/pages/FlowEditor/components/Sidebar/Search/SearchResultCard/getDisplayDetailsForResult.tsx index c725d96214..806a193fc6 100644 --- a/editor.planx.uk/src/pages/FlowEditor/components/Sidebar/Search/SearchResultCard/getDisplayDetailsForResult.tsx +++ b/editor.planx.uk/src/pages/FlowEditor/components/Sidebar/Search/SearchResultCard/getDisplayDetailsForResult.tsx @@ -44,12 +44,6 @@ const keyFormatters: KeyMap = { "data.fileTypes.fn": { getDisplayKey: () => "File type (data)", }, - "data.dataFieldBoundary": { - getDisplayKey: () => "Boundary", - }, - "data.dataFieldArea": { - getDisplayKey: () => "Area", - }, "data.description": { getDisplayKey: ({ item }) => item.type === ComponentType.Answer diff --git a/editor.planx.uk/src/pages/FlowEditor/components/Sidebar/Search/facets.ts b/editor.planx.uk/src/pages/FlowEditor/components/Sidebar/Search/facets.ts index a85b4329db..58d684601e 100644 --- a/editor.planx.uk/src/pages/FlowEditor/components/Sidebar/Search/facets.ts +++ b/editor.planx.uk/src/pages/FlowEditor/components/Sidebar/Search/facets.ts @@ -21,18 +21,12 @@ const listData: SearchFacets = [ "data.schema.fields.data.options.data.val", ]; -const drawBoundaryData: SearchFacets = [ - "data.dataFieldBoundary", - "data.dataFieldArea", -]; - /** Data fields used across PlanX components */ export const DATA_FACETS: SearchFacets = [ ...generalData, ...fileUploadAndLabelData, ...calculateData, ...listData, - ...drawBoundaryData, ]; const stripHTMLTags = (html = "") => diff --git a/editor.planx.uk/src/pages/FlowEditor/components/Sidebar/Search/mocks/allFacetFlow.ts b/editor.planx.uk/src/pages/FlowEditor/components/Sidebar/Search/mocks/allFacetFlow.ts index 9d3e91b43d..748dc8046a 100644 --- a/editor.planx.uk/src/pages/FlowEditor/components/Sidebar/Search/mocks/allFacetFlow.ts +++ b/editor.planx.uk/src/pages/FlowEditor/components/Sidebar/Search/mocks/allFacetFlow.ts @@ -170,9 +170,8 @@ export const mockFlow: FlowGraph = { data: { title: ".", description: "

.

", - dataFieldArea: "property.boundary.area", hideFileUpload: false, - dataFieldBoundary: "property.boundary.site", + fn: "proposal.site", titleForUploading: "Elephant", descriptionForUploading: "

Panda

", }, @@ -610,9 +609,8 @@ export const mockDrawBoundaryResult: SearchResult = { data: { title: ".", description: "

.

", - dataFieldArea: "property.boundary.area", hideFileUpload: false, - dataFieldBoundary: "property.boundary.site", + fn: "proposal.site", titleForUploading: "Elephant", descriptionForUploading: "

Panda

", }, diff --git a/editor.planx.uk/src/pages/FlowEditor/lib/__tests__/mocks/breadcrumbsDependentOnPassport.json b/editor.planx.uk/src/pages/FlowEditor/lib/__tests__/mocks/breadcrumbsDependentOnPassport.json index 09e770cf6e..99e333c825 100644 --- a/editor.planx.uk/src/pages/FlowEditor/lib/__tests__/mocks/breadcrumbsDependentOnPassport.json +++ b/editor.planx.uk/src/pages/FlowEditor/lib/__tests__/mocks/breadcrumbsDependentOnPassport.json @@ -32,7 +32,7 @@ "drawBoundary": { "auto": false, "data": { - "property.boundary.site": { + "proposal.site": { "type": "Feature", "geometry": { "type": "Polygon", @@ -48,7 +48,7 @@ }, "properties": null }, - "property.boundary.area": 109.43 + "proposal.site.area": 109.43 } }, "planningConstraints": { diff --git a/editor.planx.uk/src/pages/FlowEditor/lib/__tests__/mocks/flowWithPassportComponents.json b/editor.planx.uk/src/pages/FlowEditor/lib/__tests__/mocks/flowWithPassportComponents.json index f621b4065a..289c7b9334 100644 --- a/editor.planx.uk/src/pages/FlowEditor/lib/__tests__/mocks/flowWithPassportComponents.json +++ b/editor.planx.uk/src/pages/FlowEditor/lib/__tests__/mocks/flowWithPassportComponents.json @@ -32,7 +32,7 @@ }, "drawBoundary": { "data": { - "dataFieldBoundary": "property.boundary.site" + "fn": "proposal.site" }, "type": 10 }, diff --git a/editor.planx.uk/src/pages/FlowEditor/lib/__tests__/preview/removeNodesDependentOnPassport.test.ts b/editor.planx.uk/src/pages/FlowEditor/lib/__tests__/preview/removeNodesDependentOnPassport.test.ts index fb0e5d0511..8b3c68d083 100644 --- a/editor.planx.uk/src/pages/FlowEditor/lib/__tests__/preview/removeNodesDependentOnPassport.test.ts +++ b/editor.planx.uk/src/pages/FlowEditor/lib/__tests__/preview/removeNodesDependentOnPassport.test.ts @@ -126,7 +126,7 @@ describe("nodesDependentOnPassport with record", () => { } as Store.CachedBreadcrumbs; const userData = { data: { - "property.boundary.site": { + "proposal.site": { type: "Feature", geometry: { type: "Polygon", @@ -142,7 +142,7 @@ describe("nodesDependentOnPassport with record", () => { }, properties: null, }, - "property.boundary.area": 76.27, + "proposal.site.area": 76.27, }, auto: false, };