Skip to content

Commit

Permalink
Merge branch 'main' into jh/follow-on-feedback-component
Browse files Browse the repository at this point in the history
  • Loading branch information
jamdelion committed Nov 7, 2024
2 parents a8380f9 + 280cfe0 commit 0fd922b
Show file tree
Hide file tree
Showing 15 changed files with 178 additions and 167 deletions.
2 changes: 1 addition & 1 deletion api.planx.uk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"@airbrake/node": "^2.1.8",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#dee2279",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#134b20d",
"@types/isomorphic-fetch": "^0.0.36",
"adm-zip": "^0.5.10",
"aws-sdk": "^2.1467.0",
Expand Down
8 changes: 4 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.

2 changes: 1 addition & 1 deletion e2e/tests/api-driven/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"packageManager": "[email protected]",
"dependencies": {
"@cucumber/cucumber": "^9.3.0",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#dee2279",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#134b20d",
"axios": "^1.7.4",
"dotenv": "^16.3.1",
"dotenv-expand": "^10.0.0",
Expand Down
8 changes: 4 additions & 4 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.

2 changes: 1 addition & 1 deletion e2e/tests/ui-driven/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"postinstall": "./install-dependencies.sh"
},
"dependencies": {
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#dee2279",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#134b20d",
"axios": "^1.7.4",
"dotenv": "^16.3.1",
"eslint": "^8.56.0",
Expand Down
8 changes: 4 additions & 4 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 @@ -15,7 +15,7 @@
"@mui/material": "^5.15.10",
"@mui/utils": "^5.15.11",
"@opensystemslab/map": "1.0.0-alpha.4",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#dee2279",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#134b20d",
"@tiptap/core": "^2.4.0",
"@tiptap/extension-bold": "^2.0.3",
"@tiptap/extension-bubble-menu": "^2.1.13",
Expand Down
26 changes: 13 additions & 13 deletions editor.planx.uk/pnpm-lock.yaml

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

Original file line number Diff line number Diff line change
Expand Up @@ -85,26 +85,26 @@ export default function PickOSAddress(props: PickOSAddressProps): FCReturn {
selectedAddress.SAO_TEXT, // populated in cases of building name only, no street number
]
.filter(Boolean)
.join(""),
.join("") || undefined,
saoEnd: [
selectedAddress.SAO_END_NUMBER,
selectedAddress.SAO_END_SUFFIX,
]
.filter(Boolean)
.join(""),
.join("") || undefined,
pao: [
selectedAddress.PAO_START_NUMBER,
selectedAddress.PAO_START_SUFFIX,
selectedAddress.PAO_TEXT, // populated in cases of building name only, no street number
]
.filter(Boolean)
.join(""),
.join("") || undefined,
paoEnd: [
selectedAddress.PAO_END_NUMBER,
selectedAddress.PAO_END_SUFFIX,
]
.filter(Boolean)
.join(""),
.join("") || undefined,
street: selectedAddress.STREET_DESCRIPTION,
town: selectedAddress.TOWN_NAME,
postcode: selectedAddress.POSTCODE_LOCATOR,
Expand Down
4 changes: 2 additions & 2 deletions editor.planx.uk/src/@planx/components/FindProperty/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ export interface SiteAddress extends MinimumSiteAddress {
usrn?: string;
blpu_code?: string;
organisation?: string | null;
sao?: string | null;
saoEnd?: string | null;
sao?: string;
saoEnd?: string;
pao?: string;
paoEnd?: string;
street?: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import Container from "@mui/material/Container";
import Table from "@mui/material/Table";
import TableBody from "@mui/material/TableBody";
import TableCell from "@mui/material/TableCell";
import TableHead from "@mui/material/TableHead";
import TableRow from "@mui/material/TableRow";
import Typography from "@mui/material/Typography";
import React from "react";
import { Feedback } from "routes/feedback";
import SettingsSection from "ui/editor/SettingsSection";
import ErrorSummary from "ui/shared/ErrorSummary/ErrorSummary";

import { CollapsibleRow } from "./components/CollapsibleRow";
import { Feed } from "./styled";

interface Props {
feedback: Feedback[];
}

export const FeedbackLog: React.FC<Props> = ({ feedback }) => {
const displayFeedbackItems = [
"userComment",
"address",
"projectType",
"where",
"browserPlatform",
];

return (
<Container maxWidth="contentWrap">
<SettingsSection>
<Typography variant="h2" component="h3" gutterBottom>
Feedback log
</Typography>
<Typography variant="body1">
Feedback from users about this service.
</Typography>
</SettingsSection>
<SettingsSection>
{feedback.length === 0 ? (
<ErrorSummary
format="info"
heading="No feedback found for this service"
message="If you're looking for feedback from more than six months ago, please contact a PlanX developer"
/>
) : (
<Feed>
<Table stickyHeader sx={{ tableLayout: "fixed" }}>
<TableHead>
<TableRow
sx={{ "& > *": { borderBottomColor: "black !important" } }}
>
<TableCell sx={{ width: 160 }}>
<strong>Type</strong>
</TableCell>
<TableCell sx={{ width: 100 }}>
<strong>Date</strong>
</TableCell>
<TableCell sx={{ width: 340 }}>
<strong>Comment</strong>
</TableCell>
<TableCell sx={{ width: 60 }} />
</TableRow>
</TableHead>
<TableBody>
{feedback.map((item) => (
<CollapsibleRow
key={item.id}
{...item}
displayFeedbackItems={displayFeedbackItems}
/>
))}
</TableBody>
</Table>
</Feed>
)}
</SettingsSection>
</Container>
);
};
Loading

0 comments on commit 0fd922b

Please sign in to comment.