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 #2663

Merged
merged 6 commits into from
Jan 15, 2024
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
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#af52a96",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#b8da594",
"@types/isomorphic-fetch": "^0.0.36",
"adm-zip": "^0.5.10",
"aws-sdk": "^2.1467.0",
Expand Down
9 changes: 5 additions & 4 deletions api.planx.uk/pnpm-lock.yaml

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

4 changes: 2 additions & 2 deletions e2e/tests/api-driven/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
},
"dependencies": {
"@cucumber/cucumber": "^9.3.0",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#af52a96",
"axios": "^1.6.5",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#b8da594",
"axios": "^1.6.0",
"dotenv": "^16.3.1",
"dotenv-expand": "^10.0.0",
"graphql": "^16.8.1",
Expand Down
10 changes: 5 additions & 5 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.

4 changes: 2 additions & 2 deletions e2e/tests/ui-driven/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"postinstall": "./install-dependencies.sh"
},
"dependencies": {
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#af52a96",
"axios": "^1.6.5",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#b8da594",
"axios": "^1.6.2",
"dotenv": "^16.3.1",
"eslint": "^8.56.0",
"graphql": "^16.8.1",
Expand Down
10 changes: 5 additions & 5 deletions e2e/tests/ui-driven/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 editor.planx.uk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@mui/styles": "^5.15.2",
"@mui/utils": "^5.15.2",
"@opensystemslab/map": "^0.7.5",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#af52a96",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#b8da594",
"@tiptap/core": "^2.0.3",
"@tiptap/extension-bold": "^2.0.3",
"@tiptap/extension-bubble-menu": "^2.1.13",
Expand Down
10 changes: 5 additions & 5 deletions editor.planx.uk/pnpm-lock.yaml

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

25 changes: 21 additions & 4 deletions editor.planx.uk/src/@planx/components/Send/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,25 @@ const SendComponent: React.FC<Props> = (props) => {
return originalValues.indexOf(a) - originalValues.indexOf(b);
}),
);

// Show warnings on selection of BOPS or Uniform for likely unsupported services
// Don't actually restrict selection because flowSlug matching is imperfect for some valid test cases
const flowSlug = window.location.pathname?.split("/")?.[1];
if (
value === Destination.BOPS &&
newCheckedValues.includes(value) &&
!["apply-for-a-lawful-development-certificate", "apply-for-prior-approval", "apply-for-planning-permission"].includes(flowSlug)
) {
alert("BOPS only accepts Lawful Development Certificate, Prior Approval, and Planning Permission submissions. Please do not select if you're building another type of submission service!");
}

if (
value === Destination.Uniform &&
newCheckedValues.includes(value) &&
flowSlug !== "apply-for-a-lawful-development-certificate"
) {
alert("Uniform only accepts Lawful Development Certificate submissions. Please do not select if you're building another type of submission service!");
}
};

return (
Expand Down Expand Up @@ -109,10 +128,8 @@ const SendComponent: React.FC<Props> = (props) => {
<Box display="flex" mt={2}>
<Warning titleAccess="Warning" color="primary" fontSize="large" />
<Typography variant="body2" ml={1}>
API tokens are required to submit successfully to the selected
destinations. Check in with PlanX developers before launching your
service to make sure that tokens are available and configured for
your environment.
API tokens may be required to submit successfully. Check in with PlanX developers before launching your
service to make sure that submissions are configured for your environment.
</Typography>
</Box>
</ModalSectionContent>
Expand Down
2 changes: 1 addition & 1 deletion editor.planx.uk/src/@planx/components/Send/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export interface Send extends MoreInformation {
}

export const DEFAULT_TITLE = "Send";
export const DEFAULT_DESTINATION = Destination.BOPS;
export const DEFAULT_DESTINATION = Destination.Email;

export const parseContent = (data: Record<string, any> | undefined): Send => ({
...parseMoreInformation(data),
Expand Down
7 changes: 4 additions & 3 deletions editor.planx.uk/src/components/Header.test.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Team } from "@opensystemslab/planx-core/types";
import { screen } from "@testing-library/react";
import { vanillaStore } from "pages/FlowEditor/lib/store";
import React from "react";
import { act } from "react-dom/test-utils";
import * as ReactNavi from "react-navi";
import { axe, setup } from "testUtils";
import { Team } from "types";

import flowWithoutSections from "../pages/FlowEditor/lib/__tests__/mocks/flowWithClones.json";
import flowWithThreeSections from "../pages/FlowEditor/lib/__tests__/mocks/flowWithThreeSections.json";
Expand All @@ -18,8 +18,9 @@ const mockTeam1: Team = {
slug: "opensystemslab",
theme: {
logo: "logo.jpg",
primary: "#0010A4",
secondary: null,
primaryColour: "#0010A4",
actionColour: "#0010A4",
linkColour: "#0010A4",
favicon: null,
},
};
Expand Down
2 changes: 1 addition & 1 deletion editor.planx.uk/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ const Header: React.FC = () => {
elevation={0}
color="transparent"
ref={headerRef}
style={{ backgroundColor: theme?.primary || "#2c2c2c" }}
style={{ backgroundColor: theme?.primaryColour || "#2c2c2c" }}
>
<Toolbar headerRef={headerRef}></Toolbar>
</Root>
Expand Down
Loading
Loading