Skip to content

Commit

Permalink
chore: Bump planx-core, update types (#2339)
Browse files Browse the repository at this point in the history
* chore: Bump planx-core

* fix: Tighten types to match planx-core changes

* chore: Bump planx-core for new tsconfigs

* chore: Bump planx-core after merge to main
  • Loading branch information
DafyddLlyr authored Oct 26, 2023
1 parent caf3fb9 commit 06ad2d8
Show file tree
Hide file tree
Showing 12 changed files with 216 additions and 157 deletions.
10 changes: 6 additions & 4 deletions api.planx.uk/admin/session/html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ export const getHTMLExport: HTMLExportHandler = async (req, res, next) => {
if (!session) throw Error(`Unable to find session ${req.params.sessionId}`);

const responses = await $api.export.csvData(req.params.sessionId);
const boundingBox =
session.data.passport.data["property.boundary.site.buffered"];
const boundingBox = session.data.passport.data[
"property.boundary.site.buffered"
] as unknown as GeoJSON.Feature;

const html = generateApplicationHTML({
planXExportData: responses as PlanXExportData[],
Expand Down Expand Up @@ -66,8 +67,9 @@ export const getRedactedHTMLExport: HTMLExportHandler = async (
const redactedResponses = await $api.export.csvDataRedacted(
req.params.sessionId,
);
const boundingBox =
session.data.passport.data["property.boundary.site.buffered"];
const boundingBox = session.data.passport.data[
"property.boundary.site.buffered"
] as unknown as GeoJSON.Feature;

const html = generateApplicationHTML({
planXExportData: redactedResponses as PlanXExportData[],
Expand Down
6 changes: 4 additions & 2 deletions api.planx.uk/inviteToPay/createPaymentSendEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,11 @@ const createPaymentSendEvents = async (
if (destinations.includes(Destination.Uniform)) {
// Bucks has 3 instances of Uniform for 4 legacy councils, set teamSlug to pre-merger council name
if (teamSlug === "buckinghamshire") {
teamSlug = session.data?.passport?.data?.[
const localAuthorities: string[] = session.data?.passport?.data?.[
"property.localAuthorityDistrict"
]
] as string[];

teamSlug = localAuthorities
?.filter((name: string) => name !== "Buckinghamshire")[0]
?.toLowerCase()
?.replace(/\W+/g, "-");
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 @@ -4,7 +4,7 @@
"private": true,
"dependencies": {
"@airbrake/node": "^2.1.8",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#2b7fa5b",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#69c797c",
"@types/isomorphic-fetch": "^0.0.36",
"adm-zip": "^0.5.10",
"aws-sdk": "^2.1467.0",
Expand Down
71 changes: 33 additions & 38 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 e2e/tests/api-driven/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"dependencies": {
"@cucumber/cucumber": "^9.3.0",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#2b7fa5b",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#69c797c",
"axios": "^1.4.0",
"dotenv": "^16.3.1",
"dotenv-expand": "^10.0.0",
Expand Down
Loading

0 comments on commit 06ad2d8

Please sign in to comment.