diff --git a/components/case.js b/components/case.js new file mode 100644 index 00000000..b55d1f58 --- /dev/null +++ b/components/case.js @@ -0,0 +1,28 @@ +import Link from "next/link"; +import { useRouter } from "next/router"; +import { useContext } from "react"; +import useTranslation from "next-translate/useTranslation"; +import Summary from "./case/summary"; +import Documents from "./case/documents"; + +export default function CaseSummary({ children, pages }) { + let { t } = useTranslation(); + + const router = useRouter(); + const { locale } = router; + + return ( +
+
+
+ + +
+
+
+ ); +} diff --git a/components/case/documents.js b/components/case/documents.js new file mode 100644 index 00000000..bfb1c5de --- /dev/null +++ b/components/case/documents.js @@ -0,0 +1,65 @@ +import Link from "next/link"; +import { useRouter } from "next/router"; +import useTranslation from "next-translate/useTranslation"; + +export default function CaseSummary() { + let { t } = useTranslation(); + + const router = useRouter(); + const { locale } = router; + return ( +
+
+
+

Documents

+
+
+
+ {t("case:documents-name-label")} +
+
+ {t("case:documents-doc-type-label")} +
+
+ {t("case:documents-date-published-label")} +
+
+ {t("case:documents-size-label")} +
+
+
+
+ + + + {t("case:documents-name-label")}: + + 3272770 Appeal Decision.pdf + + +
+
+ + {t("case:documents-doc-type-label")}: + + Outcome / Decision +
+
+ + {t("case:documents-date-published-label")}: + + 15/06/2021 +
+
+ + {t("case:documents-size-label")}: + + 92 +
+
+
+
+
+
+ ); +} diff --git a/components/case/summary.js b/components/case/summary.js new file mode 100644 index 00000000..832860a2 --- /dev/null +++ b/components/case/summary.js @@ -0,0 +1,274 @@ +import Link from "next/link"; +import { useRouter } from "next/router"; +import useTranslation from "next-translate/useTranslation"; + +export default function CaseSummary() { + let { t } = useTranslation(); + + const router = useRouter(); + const { locale } = router; + return ( +
+
+
+

+ Reference: APP/B1415/W/20/3271702 +

+ +
+
+
+ {t("case:summary-applicant-label")} +
+
+ Mr J Pocknell +
+
+
+
+ {t("case:summary-agent-label")} +
+
+ Mr Cos Polito +
+
+
+
+ {t("case:summary-site-address-label")} +
+
+ 72 Guild Street +
+ London +
+ SE23 6FH +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+

+ {t("case:summary-case-details-label")} +

+ +
+
+
+ {t("case:summary-case-type-label")} +
+
+ Planning Appeal (W){" "} +
+
+
+
+ {t("case:summary-lpa-label")} +
+
+ Hastings Borough Council +
+
+
+
+ {t( + "case:summary-case-summary-label" + )} +
+
+ Erection of a two-storey chalet + style detached dwelling +
+
+
+
+ {t( + "case:summary-case-officer-label" + )} +
+
+ {" "} + Neale Oliver +
+
+
+
+ {t("case:summary-procedure-label")} +
+
+ Written representations +
+
+
+
+ {t("case:summary-status-label")} +
+
+ In Progress +
+
+
+
+ {t("case:summary-decision-label")} +
+
+ Allowed + + 3272770 Appeal Decision.pdf + +
+
+
+
+ {t( + "case:summary-case-link-status-label" + )} +
+
+ Not Linked +
+
+
+
+ {t( + "case:summary-linked-cases-label" + )} +
+
+ 0 +
+
+
+
+
+
+
+
+
+

+ {t("case:summary-dates-label")} +

+
+
+
+ {t("case:summary-start-date-label")} +
+
+ 26-May-21 +
+
+ +
+
+ {t( + "case:summary-questionnaire-due-date-label" + )} +
+
+ 02-Jun-21 +
+
+ +
+
+ {t( + "case:summary-statement-due-date-label" + )} +
+
+ 30-Jun-21 +
+
+ +
+
+ {t( + "case:summary-interested-party-date-label" + )} +
+
+ 30-Jun-21 +
+
+ +
+
+ {t( + "case:summary-applicant-final-comments-date-label" + )} +
+
+ 14-Jul-21 +
+
+ +
+
+ {t( + "case:summary-inquiry-evidence-date-label" + )} +
+
+ N/A +
+
+ +
+
+ {t("case:summary-event-date-label")} +
+
+ Date arranged +
+
+ +
+
+ {t( + "case:summary-decision-date-label" + )} +
+
+ Not yet decided +
+
+
+
+
+
+
+
+ {/*
+
+ +
+
*/} +
+ ); +} diff --git a/components/caseresults.js b/components/caseresults.js new file mode 100644 index 00000000..67d2e010 --- /dev/null +++ b/components/caseresults.js @@ -0,0 +1,45 @@ +import Link from "next/link"; +import { useRouter } from "next/router"; +import { useContext } from "react"; +import useTranslation from "next-translate/useTranslation"; +import SearchForCase from "./search/searchforcase"; +import SearchResults from "./search/searchresults"; + +export default function Search({ children, pages }) { + let { t } = useTranslation(); + + const router = useRouter(); + const { locale } = router; + + return ( +
+
+
+ +
+
+
+
+ +
+
+
+ ); +} diff --git a/components/myportal/watchedcases.js b/components/myportal/watchedcases.js index 34b1504b..9a0dbbe8 100644 --- a/components/myportal/watchedcases.js +++ b/components/myportal/watchedcases.js @@ -3,22 +3,23 @@ import { useRouter } from "next/router"; import useTranslation from "next-translate/useTranslation"; export default function WatchedCases() { - let { t } = useTranslation(); + let { t } = useTranslation(); - const router = useRouter(); - const { locale } = router; - return ( -
-
-

- {t("myportal:watchedcases-card-title")} -

-
- - {t("myportal:viewall-link")} - + const router = useRouter(); + const { locale } = router; + return ( +
+
+

+ {t("myportal:watchedcases-card-title")} +

+ + +
-
-
- ); + ); } diff --git a/components/search/searchresults.js b/components/search/searchresults.js index 448b395d..373cb705 100644 --- a/components/search/searchresults.js +++ b/components/search/searchresults.js @@ -17,7 +17,7 @@ export default function SearchResults() { {t("search:searchresults-count-label-part-1")} 99{" "} {t("search:searchresults-count-label-part-2")}

-
+
{t("search:searchresults-case-reference-label")} @@ -40,7 +40,7 @@ export default function SearchResults() {
- + Case Reference: diff --git a/i18n.json b/i18n.json index b6146af8..f00df536 100644 --- a/i18n.json +++ b/i18n.json @@ -19,6 +19,9 @@ ], "/searchresults": [ "search" + ], + "/case": [ + "case" ] } } \ No newline at end of file diff --git a/locales/cy/case.json b/locales/cy/case.json new file mode 100644 index 00000000..3797ca04 --- /dev/null +++ b/locales/cy/case.json @@ -0,0 +1,33 @@ +{ + "case-card-title": "Reference: APP/B1415/W/20/3271702", + "summary-applicant-label": "Apelydd/Ymgeisydd", + "summary-agent-label": "Asiant", + "summary-site-address-label": "Cyfeiriad y Safle", + "summary-make-representation-label": "Cyflwyno cynrychiolaeth", + "summary-back-button-label": "Ewch yn ôl", + "summary-case-details-label": "Manylion yr Achos", + "summary-case-type-label": "Math o Achos", + "summary-lpa-label": "Awdurdod Cynllunio Lleol", + "summary-case-summary-label": "Crynodeb o'r Achos", + "summary-case-officer-label": "Swyddog Achos", + "summary-procedure-label": "Gweithdrefn", + "summary-status-label": "Statws", + "summary-decision-label": "Penderfyniad a chanlyniad", + "summary-case-link-status-label": "Statws cysylltiad yr Achos", + "summary-linked-cases-label": "Achosion cysylltiedig", + "summary-dates-label": "Dyddiadau", + "summary-start-date-label": "Dyddiad Dechrau", + "summary-questionnaire-due-date-label": "Holiadur i ddod", + "summary-statement-due-date-label": "Datganiad (au) i ddod", + "summary-interested-party-date-label": "Sylwadau Parti â Buddiant i ddod", + "summary-applicant-final-comments-date-label": "Sylwadau Terfynol yr Apelydd/ACLl i ddod", + "summary-inquiry-evidence-date-label": "Tystiolaeth yr Ymchwiliad i ddod", + "summary-event-date-label": "Dyddiad y Digwyddiad", + "summary-decision-date-label": "Dyddiad y Penderfyniad", + "summary-documents-button-label": "Dogfennau", + "documents-document-count-label": "Dogfennau", + "documents-name-label": "Math y Ddogfen", + "documents-doc-type-label": "Math y Ddogfen", + "documents-date-published-label": "Dyddiad cyhoeddi", + "documents-size-label": "Maint y ffeil (kb)" +} \ No newline at end of file diff --git a/locales/en/case.json b/locales/en/case.json new file mode 100644 index 00000000..93cccc5e --- /dev/null +++ b/locales/en/case.json @@ -0,0 +1,33 @@ +{ + "case-card-title": "Reference: APP/B1415/W/20/3271702", + "summary-applicant-label": "Appellant/Applicant", + "summary-agent-label": "Agent", + "summary-site-address-label": "Site Address", + "summary-make-representation-label": "Make representation", + "summary-back-button-label": "Go back", + "summary-case-details-label": "Case Details", + "summary-case-type-label": "Case Type", + "summary-lpa-label": "Local Planning Authority", + "summary-case-summary-label": "Case Summary", + "summary-case-officer-label": "Case Officer", + "summary-procedure-label": "Procedure", + "summary-status-label": "Status", + "summary-decision-label": "Decision and Outcome", + "summary-case-link-status-label": "Case Link Status", + "summary-linked-cases-label": "Linked Cases", + "summary-dates-label": "Dates", + "summary-start-date-label": "Start Date", + "summary-questionnaire-due-date-label": "Questionnaire due", + "summary-statement-due-date-label": "Statement(s) due", + "summary-interested-party-date-label": "Interested Party Comments due", + "summary-applicant-final-comments-date-label": "Appellant/LPA Final Comments due", + "summary-inquiry-evidence-date-label": "Inquiry Evidence due", + "summary-event-date-label": "Event Date", + "summary-decision-date-label": "Decision Date", + "summary-documents-button-label": "Documents", + "documents-document-count-label": "Document(s)", + "documents-name-label": "Name", + "documents-doc-type-label": "Document type", + "documents-date-published-label": "Date published", + "documents-size-label": "Size (KB)" +} \ No newline at end of file diff --git a/pages/case.js b/pages/case.js new file mode 100644 index 00000000..e4993759 --- /dev/null +++ b/pages/case.js @@ -0,0 +1,79 @@ +import _ from "lodash"; +import Head from "next/head"; +import Header from "../components/header"; +import Banner from "../components/banner"; +import CookieBanner from "../components/cookieBanner"; +import Breadcrumbs from "../components/breadcrumbs"; +import CaseSummary from "../components/case"; +import Footer from "../components/footer"; +import Errorpage from "../components/errorpage"; +import styles from "../styles/Home.module.css"; +import { useSelector, shallowEqual, connect } from "react-redux"; +import { wrapper } from "../store/store"; +import Cookies from "cookies"; +import { useRouter } from "next/router"; +import useTranslation from "next-translate/useTranslation"; +import Case from "../components/case"; + +const Home = (props) => { + const { footerLinks, pages } = props; + let { t, lang } = useTranslation(); + + const router = useRouter(); + const { locale } = router; + + return ( +
+ + + {t("case:page-title")} - {t("common:service-name")} + + +
+ +
+
+ + +
+
+
+
+ ); +}; + +// export const getServerSideProps = wrapper.getServerSideProps( +// async ({ locale, store, req, res }) => { +// const token = await getToken(); +// let accessToken = token.access_token; + +// const apiRoot = process.browser ? window.API_ROOT : process.env.API_ROOT; + +// const [pages, footerLinks, courseListContent] = await Promise.all([ +// await getPages(accessToken, locale), +// await getFooterLinks(accessToken, locale), +// await getCourseList(accessToken, locale), +// ]); +// //const courseID = await getCourseID +// store.dispatch(setApiRoot(apiRoot)); +// store.dispatch(setPages(pages)); +// store.dispatch(setFooterLinks(footerLinks)); +// store.dispatch(setCourseListContent(courseListContent)); +// } +// ); + +// const mapStateToProps = (state) => { +// //console.log(state); + +// return { +// apiroot: state.apiroot, +// courseListContent: state.courseListContent.courseListContent, +// pages: state.pages.pages, +// footerLinks: state.footerLinks.footerLinks, +// regions: state.regions, +// sectors: state.sectors, +// form: state.form, +// }; +// }; + +export default Home; //connect(mapStateToProps)(Home); diff --git a/pages/searchresults.js b/pages/searchresults.js index 3e43347a..cf5cb147 100644 --- a/pages/searchresults.js +++ b/pages/searchresults.js @@ -25,7 +25,7 @@ const Home = (props) => {
- {t("myportal:page-title")} - {t("common:service-name")} + {t("search:page-title")} - {t("common:service-name")}
diff --git a/styles/sass/welshgov/_application.scss b/styles/sass/welshgov/_application.scss index 3acd5c7d..3ea06711 100644 --- a/styles/sass/welshgov/_application.scss +++ b/styles/sass/welshgov/_application.scss @@ -109,7 +109,7 @@ nav { } } -div.govuk-summary-list__row:nth-child(even) { +.results .govuk-summary-list__row:nth-child(even) { background: #f3f2f1; } @@ -130,3 +130,7 @@ div.govuk-summary-list__row:nth-child(even) { display: none; } } + +.case .govuk-grid-column-full .govuk-summary-list__key { + width: 100%; +}