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

Production deploy #4118

Merged
merged 6 commits into from
Jan 8, 2025
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
4 changes: 2 additions & 2 deletions api.planx.uk/modules/admin/session/html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
6 changes: 1 addition & 5 deletions api.planx.uk/modules/flows/downloadSchema/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ export const getFlowSchema = async (flowId: string) => {
node: nodeId,
type: nodeData?.type?.toString() || "_root",
text: nodeData.data?.text,
planx_variable:
nodeData.data?.fn ||
nodeData.data?.val ||
nodeData.data?.output ||
nodeData.data?.dataFieldBoundary,
planx_variable: nodeData.data?.fn || nodeData.data?.val,
}),
);

Expand Down
4 changes: 2 additions & 2 deletions api.planx.uk/modules/send/utils/exportZip.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<LowCalSession> = {
...mockLowcalSession,
id: "1234",
Expand All @@ -146,7 +146,7 @@ describe("buildSubmissionExportZip", () => {
passport: {
data: {
...mockLowcalSession.data!.passport.data,
"property.boundary.site": undefined,
"proposal.site": undefined,
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions api.planx.uk/modules/send/utils/exportZip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"] ??= {};
Expand Down
2 changes: 1 addition & 1 deletion api.planx.uk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@airbrake/node": "^2.1.8",
"@aws-sdk/client-s3": "^3.696.0",
"@aws-sdk/s3-request-presigner": "^3.701.0",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#d004278",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#dc2386b",
"@types/isomorphic-fetch": "^0.0.36",
"adm-zip": "^0.5.10",
"axios": "^1.7.4",
Expand Down
40 changes: 20 additions & 20 deletions api.planx.uk/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api.planx.uk/tests/mocks/saveAndReturnMocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/api-driven/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"packageManager": "[email protected]",
"dependencies": {
"@cucumber/cucumber": "^11.1.1",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#d004278",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#dc2386b",
"axios": "^1.7.4",
"dotenv": "^16.3.1",
"dotenv-expand": "^10.0.0",
Expand Down
40 changes: 20 additions & 20 deletions e2e/tests/api-driven/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading