-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into jh/follow-on-feedback-component
- Loading branch information
Showing
15 changed files
with
178 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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", | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
editor.planx.uk/src/pages/FlowEditor/components/Flow/FeedbackLog/FeedbackLog.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
); | ||
}; |
Oops, something went wrong.