Skip to content

Commit

Permalink
passport values too
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak committed Dec 17, 2024
1 parent 5af6fbf commit 7666205
Show file tree
Hide file tree
Showing 16 changed files with 73 additions and 75 deletions.
2 changes: 1 addition & 1 deletion src/export/bops/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ export function computeBOPSParams({
}

// 1b. property boundary
const geojson = passport.any(["property.boundary.site"]);
const geojson = passport.any(["proposal.site"]);
if (geojson) data.boundary_geojson = geojson;

// 2. files
Expand Down
2 changes: 1 addition & 1 deletion src/export/bops/mocks/flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143196,7 +143196,7 @@ export const mockPublishedLDCFlow: FlowGraph = {
definitionImg:
"https://user-data-8038f15.s3.eu-west-2.amazonaws.com/yrjahw3c/siteplan2.png",
hideFileUpload: false,
fn: "property.boundary.site",
fn: "proposal.site",
titleForUploading: "Upload a location plan",
descriptionForUploading:
"<p>Your location plan must:</p><ul><li><p>be based on an accurate, recognisable map</p></li><li><p>be drawn to a scale, labelled, and/or marked with a scale bar</p></li><li><p>show the site outline in red</p></li><li><p>include a<strong> </strong>north point</p></li></ul>",
Expand Down
4 changes: 2 additions & 2 deletions src/export/bops/mocks/payload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export const mockExpectedBOPSPayload = {
"uniform.consentRegime": ["Certificate of Lawfulness"],
"application.about.form": ["Proposed building works"],
"property.EPCKnown.form": ["The property does not have one"],
"property.boundary.site": {
"proposal.site": {
type: "Feature",
geometry: {
type: "Polygon",
Expand Down Expand Up @@ -1049,7 +1049,7 @@ export const mockExpectedBOPSPayload = {
auto: false,
data: {
"proposal.siteArea": 201.43,
"property.boundary.site": {
"proposal.site": {
type: "Feature",
geometry: {
type: "Polygon",
Expand Down
4 changes: 2 additions & 2 deletions src/export/bops/mocks/sessionData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export const mockSessionData = {
"uniform.consentRegime": ["Certificate of Lawfulness"],
"application.about.form": ["Proposed building works"],
"property.EPCKnown.form": ["The property does not have one"],
"property.boundary.site": {
"proposal.site": {
type: "Feature",
geometry: {
type: "Polygon",
Expand Down Expand Up @@ -954,7 +954,7 @@ export const mockSessionData = {
auto: false,
data: {
"proposal.siteArea": 201.43,
"property.boundary.site": {
"proposal.site": {
type: "Feature",
geometry: {
type: "Polygon",
Expand Down
6 changes: 3 additions & 3 deletions src/export/bops/tests/proposalDetails.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1409,7 +1409,7 @@ describe("Components which use an internal schema", () => {
"property.type": ["residential.dwelling.house.terrace"],
"property.localAuthorityDistrict": ["Lambeth"],
"property.region": ["London"],
"property.boundary.title": {
"property.boundary": {
geometry: {
type: "MultiPolygon",
coordinates: [
Expand Down Expand Up @@ -1441,8 +1441,8 @@ describe("Components which use an internal schema", () => {
"organisation-entity": "13",
},
},
"property.boundary.title.area": 161.15,
"property.boundary.title.area.hectares": 0.016115,
"property.boundary.area": 161.15,
"property.boundary.area.hectares": 0.016115,
"findProperty.action": "Selected an existing address",
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6077,7 +6077,7 @@ export const mockPublishedPlanningPermissionFlow = {
description:
"<p>This is not just the outline of your new project. It&apos;s called a red line drawing or location plan. </p><p>It needs to be accurate so we can spot things that might impact your project. If it&apos;s wrong, your application may be invalid.</p><h1>You need to draw:</h1><ul><li><p>the outline of your property boundary - this should be your whole building and land, not just the new project</p></li></ul><h1>You must also include:</h1><ul><li><p>any work outside the property boundary (like a dropped kerb)</p></li><li><p>areas that will be closed off or you&apos;ll need access to during the work (like part of a road)</p></li></ul>",
hideFileUpload: true,
fn: "property.boundary.site",
fn: "proposal.site",
titleForUploading: "Upload a location plan",
descriptionForUploading:
"<p>Your location plan must:</p><ul><li><p>be based on an accurate, recognisable map</p></li><li><p>be drawn to a scale, labelled, and/or marked with a scale bar</p></li><li><p>show the site outline in red</p></li><li><p>include a<strong> </strong>north point</p></li></ul>",
Expand Down
8 changes: 4 additions & 4 deletions src/export/digitalPlanning/mocks/flows/priorApproval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19205,7 +19205,7 @@ export const mockPublishedPriorApprovalFlow = {
howMeasured:
'<p>We have pre-populated the map with a red outline that includes the entire property using information from the Land Registry.</p><p>In some cases, this outline might not include all the works or the areas that will be closed off. This might be because you&apos;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.</p><p>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.</p><p></p><h1>How to draw and amend the outline</h1><ol><li><p>Move the cursor to the corner you want to start with and click or tap once.</p></li><li><p>Move the cursor to the next corner and click or tap.</p></li><li><p>Repeat until you have the shape you need.</p></li><li><p>Click or tap the last corner again to stop drawing.</p></li><li><p>To amend the outline, click or tap on a line and drag it into a new position.</p></li></ol><img src="https://api.editor.planx.uk/file/public/dni98ojg/Draw_Outline_2.gif">',
hideFileUpload: false,
fn: "property.boundary.site",
fn: "proposal.site",
titleForUploading: "Upload a location plan",
descriptionForUploading:
"<p>Your location plan must:</p><ul><li><p>be based on an accurate, recognisable map</p></li><li><p>be drawn to a scale, labelled, and/or marked with a scale bar</p></li><li><p>show the site outline in red</p></li><li><p>include a<strong> </strong>north point</p></li></ul>",
Expand Down Expand Up @@ -43505,11 +43505,11 @@ export const mockPublishedPriorApprovalFlow = {
},
ShPkwTNiCM: {
data: {
title: "Set proposal.siteArea to property.boundary.area",
title: "Set proposal.siteArea to proposal.site.area",
output: "proposal.siteArea",
formula: "property.boundary.area",
formula: "proposal.site.area",
defaults: {
"property.boundary.area": "0",
"proposal.site.area": "0",
},
formatOutputForAutomations: false,
},
Expand Down
44 changes: 22 additions & 22 deletions src/export/digitalPlanning/mocks/lawfulDevelopmentCertificate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1532,7 +1532,7 @@ export const mockLDCESession = {
"uniform.applicationTo": ["X0415"],
"uniform.consentRegime": ["Certificate of Lawfulness"],
"application.about.form": ["Existing building works"],
"property.boundary.site": {
"proposal.site": {
type: "Feature",
geometry: {
type: "Polygon",
Expand Down Expand Up @@ -1676,7 +1676,7 @@ export const mockLDCESession = {
"applicant.ownership.noticeGiven": ["true"],
"applicant.ownership.owner3.name": "Matilda Wormwood",
"applicant.siteContact.telephone": "01098 765 432",
"property.boundary.site.buffered": {
"proposal.site.buffered": {
type: "Feature",
geometry: {
type: "Polygon",
Expand Down Expand Up @@ -4321,7 +4321,7 @@ export const mockLDCESession = {
auto: false,
data: {
"proposal.siteArea": 2993.67,
"property.boundary.site": {
"proposal.site": {
type: "Feature",
geometry: {
type: "Polygon",
Expand Down Expand Up @@ -4364,7 +4364,7 @@ export const mockLDCESession = {
properties: null,
},
"proposal.siteArea.hectares": 0.299367,
"property.boundary.site.buffered": {
"proposal.site.buffered": {
type: "Feature",
geometry: {
type: "Polygon",
Expand Down Expand Up @@ -5220,7 +5220,7 @@ export const mockLDCPSession = {
"uniform.applicationTo": ["N410"],
"uniform.consentRegime": ["Certificate of Lawfulness"],
"application.about.form": ["Proposed building works"],
"property.boundary.site": {
"proposal.site": {
type: "Feature",
geometry: {
type: "Polygon",
Expand Down Expand Up @@ -5403,7 +5403,7 @@ export const mockLDCPSession = {
"application.basisOfLawfulness": ["permittedDevelopment"],
"application.preAppAdvice.form": ["No"],
"applicant.ownership.certificate": ["a"],
"property.boundary.site.buffered": {
"proposal.site.buffered": {
type: "Feature",
geometry: {
type: "Polygon",
Expand Down Expand Up @@ -6826,7 +6826,7 @@ export const mockLDCPSession = {
auto: false,
data: {
"proposal.siteArea": 1418.26,
"property.boundary.site": {
"proposal.site": {
type: "Feature",
geometry: {
type: "Polygon",
Expand All @@ -6849,7 +6849,7 @@ export const mockLDCPSession = {
properties: null,
},
"proposal.siteArea.hectares": 0.141826,
"property.boundary.site.buffered": {
"proposal.site.buffered": {
type: "Feature",
geometry: {
type: "Polygon",
Expand Down Expand Up @@ -7989,8 +7989,8 @@ export const mockLDCPSession2 = {
"uniform.consentRegime": ["Certificate of Lawfulness"],
"application.about.form": ["Proposed building works"],
"property.EPCKnown.form": ["The property does not have one"],
"property.boundary.area": 114.19,
"property.boundary.site": {
"proposal.site.area": 114.19,
"proposal.site": {
type: "Feature",
geometry: {
type: "MultiPolygon",
Expand Down Expand Up @@ -8026,7 +8026,7 @@ export const mockLDCPSession2 = {
"applicant.interest.form": ["Occupier"],
"applicant.phone.primary": "0309393939",
"application.fee.payable": 0,
"property.boundary.title": {
"property.boundary": {
type: "Feature",
geometry: {
type: "MultiPolygon",
Expand Down Expand Up @@ -8068,15 +8068,15 @@ export const mockLDCPSession2 = {
"proposal.visibility.public": ["false"],
"proposal.newFloorArea.other": 0,
"applicant.ownership.interest": ["occupier"],
"property.boundary.title.area": 114.19,
"property.boundary.area": 114.19,
"application.basisOfLawfulness": ["permittedDevelopment"],
"application.preAppAdvice.form": ["No"],
"application.sitePlan.required": ["true"],
"property.constraints.planning": ["road.classified"],
"property.titleNumberKnown.form": ["No"],
"application.elevations.required": ["true"],
"property.boundary.area.hectares": 0.011419,
"property.boundary.site.buffered": {
"proposal.site.area.hectares": 0.011419,
"proposal.site.buffered": {
type: "Feature",
geometry: {
type: "Polygon",
Expand Down Expand Up @@ -8161,7 +8161,7 @@ export const mockLDCPSession2 = {
"property.ownership.ownerOne.interest": ["owner"],
"application.declaration.accurate.form": ["Yes"],
"application.sitePlanProposed.required": ["true"],
"property.boundary.title.area.hectares": 0.011419,
"property.boundary.area.hectares": 0.011419,
"application.fee.category.oneToThirteen": ["true"],
"application.fee.exemption.resubmission": ["false"],
"application.declaration.connection.form": ["No connections"],
Expand Down Expand Up @@ -9171,7 +9171,7 @@ export const mockLDCPSession2 = {
},
"property.region": ["London"],
"findProperty.action": "Selected an existing address",
"property.boundary.title": {
"property.boundary": {
type: "Feature",
geometry: {
type: "MultiPolygon",
Expand Down Expand Up @@ -9201,9 +9201,9 @@ export const mockLDCPSession2 = {
"organisation-entity": "13",
},
},
"property.boundary.title.area": 114.19,
"property.boundary.area": 114.19,
"property.localAuthorityDistrict": ["Lambeth"],
"property.boundary.title.area.hectares": 0.011419,
"property.boundary.area.hectares": 0.011419,
},
},
HM4ffx9N7u: {
Expand Down Expand Up @@ -9833,8 +9833,8 @@ export const mockLDCPSession2 = {
auto: false,
data: {
"drawBoundary.action": "Accepted the title boundary",
"property.boundary.area": 114.19,
"property.boundary.site": {
"proposal.site.area": 114.19,
"proposal.site": {
type: "Feature",
geometry: {
type: "MultiPolygon",
Expand Down Expand Up @@ -9864,8 +9864,8 @@ export const mockLDCPSession2 = {
"organisation-entity": "13",
},
},
"property.boundary.area.hectares": 0.011419,
"property.boundary.site.buffered": {
"proposal.site.area.hectares": 0.011419,
"proposal.site.buffered": {
type: "Feature",
geometry: {
type: "Polygon",
Expand Down
16 changes: 8 additions & 8 deletions src/export/digitalPlanning/mocks/planningPermission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -659,8 +659,8 @@ export const mockPlanningPermissionSession = {
"applicant.agent.title": "Mx",
"applicant.siteContact.role": ["proxy"],
"property.EPCKnown.form": ["The property does not have one"],
"property.boundary.area": 125.92,
"property.boundary.site": {
"proposal.site.area": 125.92,
"proposal.site": {
type: "Feature",
geometry: {
type: "Polygon",
Expand Down Expand Up @@ -901,8 +901,8 @@ export const mockPlanningPermissionSession = {
"proposal.cars.number.proposed": 1,
"property.titleNumberKnown.form": ["No"],
"applicant.ownership.certificate": ["a"],
"property.boundary.area.hectares": 0.012592,
"property.boundary.site.buffered": {
"proposal.site.area.hectares": 0.012592,
"proposal.site.buffered": {
type: "Feature",
geometry: {
type: "Polygon",
Expand Down Expand Up @@ -1816,8 +1816,8 @@ export const mockPlanningPermissionSession = {
H5vt0Zwv5M: {
auto: false,
data: {
"property.boundary.area": 125.92,
"property.boundary.site": {
"proposal.site.area": 125.92,
"proposal.site": {
type: "Feature",
geometry: {
type: "Polygon",
Expand All @@ -1833,8 +1833,8 @@ export const mockPlanningPermissionSession = {
},
properties: null,
},
"property.boundary.area.hectares": 0.012592,
"property.boundary.site.buffered": {
"proposal.site.area.hectares": 0.012592,
"proposal.site.buffered": {
type: "Feature",
geometry: {
type: "Polygon",
Expand Down
Loading

0 comments on commit 7666205

Please sign in to comment.