added default list views for myportal linked cases
This commit is contained in:
@@ -8,6 +8,7 @@ const Breadcrumbs = (props) => {
|
|||||||
const {
|
const {
|
||||||
courseContent,
|
courseContent,
|
||||||
slug,
|
slug,
|
||||||
|
formTitle,
|
||||||
activitysub,
|
activitysub,
|
||||||
activity,
|
activity,
|
||||||
applicant_id,
|
applicant_id,
|
||||||
@@ -110,6 +111,45 @@ const Breadcrumbs = (props) => {
|
|||||||
) : (
|
) : (
|
||||||
""
|
""
|
||||||
)}
|
)}
|
||||||
|
{router.pathname == "/viewall" ? (
|
||||||
|
<>
|
||||||
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
|
<Link href="/myportal">
|
||||||
|
<a className="govuk-breadcrumbs__link">
|
||||||
|
My Portal
|
||||||
|
</a>
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
|
Your cases
|
||||||
|
</li>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
""
|
||||||
|
)}
|
||||||
|
{router.pathname == "/case" ? (
|
||||||
|
<>
|
||||||
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
|
<Link href="/myportal">
|
||||||
|
<a className="govuk-breadcrumbs__link">
|
||||||
|
My Portal
|
||||||
|
</a>
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
|
<Link href="/viewall">
|
||||||
|
<a className="govuk-breadcrumbs__link">
|
||||||
|
Your cases{" "}
|
||||||
|
</a>
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
|
Case Reference: CAS-00010-J9W6L5
|
||||||
|
</li>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
""
|
||||||
|
)}
|
||||||
{!_.isEmpty(slug) ? (
|
{!_.isEmpty(slug) ? (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
@@ -126,6 +166,9 @@ const Breadcrumbs = (props) => {
|
|||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
|
{props.formTitle}
|
||||||
|
</li>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
""
|
""
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export default function CaseSummary() {
|
|||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h1 className="govuk-heading-xl govuk-!-margin-bottom-7">
|
<h1 className="govuk-heading-xl govuk-!-margin-bottom-7">
|
||||||
Reference: APP/B1415/W/20/3271702
|
Reference: CAS-00010-J9W6L5
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<dl className="govuk-summary-list govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-margin-bottom-9">
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export function Textfield(props) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<label className="govuk-label govuk-label--m " htmlFor="event-name">
|
<label className="govuk-label " htmlFor="event-name">
|
||||||
{props.label}
|
{props.label}
|
||||||
</label>
|
</label>
|
||||||
<Field
|
<Field
|
||||||
@@ -26,14 +26,14 @@ export function MultiLinefield(props) {
|
|||||||
return (
|
return (
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<h1 className="govuk-label-wrapper">
|
<h1 className="govuk-label-wrapper">
|
||||||
<label
|
<label className="govuk-label" htmlFor="more-detail">
|
||||||
className="govuk-label govuk-label--l"
|
|
||||||
htmlFor="more-detail"
|
|
||||||
>
|
|
||||||
{props.label}
|
{props.label}
|
||||||
</label>
|
</label>
|
||||||
</h1>
|
</h1>
|
||||||
<div id="more-detail-hint" className="govuk-hint">
|
<div
|
||||||
|
id="more-detail-hint"
|
||||||
|
className="govuk-hint govuk-!-font-size-14"
|
||||||
|
>
|
||||||
Do not include personal or financial information, like your
|
Do not include personal or financial information, like your
|
||||||
National Insurance number or credit card details.
|
National Insurance number or credit card details.
|
||||||
</div>
|
</div>
|
||||||
@@ -60,19 +60,16 @@ export function DateField(props) {
|
|||||||
role="group"
|
role="group"
|
||||||
aria-describedby="dob-hint"
|
aria-describedby="dob-hint"
|
||||||
>
|
>
|
||||||
<legend className="govuk-fieldset__legend govuk-fieldset__legend--s">
|
<legend className="govuk-fieldset__legend govuk-fieldset__legend--s govuk-!-font-weight-regular">
|
||||||
<label className="govuk-fieldset__heading">
|
<label className="govuk-fieldset__heading">
|
||||||
{props.label}
|
{props.label}
|
||||||
</label>
|
</label>
|
||||||
</legend>
|
</legend>
|
||||||
<div id="dob-hint" className="govuk-hint">
|
|
||||||
For example, 31 3 1980
|
|
||||||
</div>
|
|
||||||
<div className="govuk-date-input" id="dob">
|
<div className="govuk-date-input" id="dob">
|
||||||
<div className="govuk-date-input__item">
|
<div className="govuk-date-input__item">
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<label
|
<label
|
||||||
className="govuk-label govuk-date-input__label"
|
className="govuk-label govuk-date-input__label govuk-!-font-size-14"
|
||||||
htmlFor={props.name + "-day"}
|
htmlFor={props.name + "-day"}
|
||||||
>
|
>
|
||||||
Day
|
Day
|
||||||
@@ -91,7 +88,7 @@ export function DateField(props) {
|
|||||||
<div className="govuk-date-input__item">
|
<div className="govuk-date-input__item">
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<label
|
<label
|
||||||
className="govuk-label govuk-date-input__label"
|
className="govuk-label govuk-date-input__label govuk-!-font-size-14"
|
||||||
htmlFor={props.name + "-month"}
|
htmlFor={props.name + "-month"}
|
||||||
>
|
>
|
||||||
Month
|
Month
|
||||||
@@ -110,7 +107,7 @@ export function DateField(props) {
|
|||||||
<div className="govuk-date-input__item">
|
<div className="govuk-date-input__item">
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<label
|
<label
|
||||||
className="govuk-label govuk-date-input__label"
|
className="govuk-label govuk-date-input__label govuk-!-font-size-14"
|
||||||
htmlFor={props.name + "-year"}
|
htmlFor={props.name + "-year"}
|
||||||
>
|
>
|
||||||
Year
|
Year
|
||||||
@@ -139,15 +136,15 @@ export function YesNofield(props) {
|
|||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<fieldset
|
<fieldset
|
||||||
className="govuk-fieldset"
|
className="govuk-fieldset"
|
||||||
aria-describedby="changed-name-hint"
|
aria-describedby={props.name + "-hint"}
|
||||||
>
|
>
|
||||||
<legend className="govuk-fieldset__legend govuk-fieldset__legend--s">
|
<legend className="govuk-fieldset__legend govuk-fieldset__legend--s govuk-!-font-weight-regular">
|
||||||
<label className="govuk-fieldset__heading">
|
<label className="govuk-fieldset__heading govuk-body-m">
|
||||||
{props.label}
|
{props.label}
|
||||||
</label>
|
</label>
|
||||||
</legend>
|
</legend>
|
||||||
|
|
||||||
<div className="govuk-radios govuk-radios--inline">
|
<div className="govuk-radios govuk-radios--inline govuk-radios--small">
|
||||||
{Object.keys(yesNo).map((key, index) => (
|
{Object.keys(yesNo).map((key, index) => (
|
||||||
<div
|
<div
|
||||||
className="govuk-radios__item"
|
className="govuk-radios__item"
|
||||||
@@ -236,16 +233,9 @@ export function NumericField(props) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<label
|
<label className="govuk-label" htmlFor="account-number">
|
||||||
className="govuk-label govuk-label--m"
|
|
||||||
htmlFor="account-number"
|
|
||||||
>
|
|
||||||
{props.label}
|
{props.label}
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<div id="account-number-hint" className="govuk-hint">
|
|
||||||
Must be between 6 and 8 digits long
|
|
||||||
</div>
|
|
||||||
<Field
|
<Field
|
||||||
name={props.name}
|
name={props.name}
|
||||||
id={props.name}
|
id={props.name}
|
||||||
@@ -266,16 +256,9 @@ export function DecimalField(props) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<label
|
<label className="govuk-label" htmlFor="account-number">
|
||||||
className="govuk-label govuk-label--m"
|
|
||||||
htmlFor="account-number"
|
|
||||||
>
|
|
||||||
{props.label}
|
{props.label}
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<div id="account-number-hint" className="govuk-hint">
|
|
||||||
Must be between 6 and 8 digits long
|
|
||||||
</div>
|
|
||||||
<Field
|
<Field
|
||||||
name={props.name}
|
name={props.name}
|
||||||
id={props.name}
|
id={props.name}
|
||||||
@@ -296,7 +279,7 @@ export function ReadOnlyfield(props) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<label className="govuk-label govuk-label--m " htmlFor="event-name">
|
<label className="govuk-label " htmlFor="event-name">
|
||||||
{props.label}
|
{props.label}
|
||||||
</label>
|
</label>
|
||||||
<Field
|
<Field
|
||||||
|
|||||||
@@ -1,24 +1,28 @@
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import TopThree from "./topthree";
|
||||||
|
|
||||||
export default function AwaitingSubmission() {
|
export default function AwaitingSubmission() {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { locale } = router;
|
const { locale } = router;
|
||||||
return (
|
return (
|
||||||
<div className="card card-3" id="casescomment-card">
|
<div className="card card-3" id="casescomment-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<h3 className="heading-small card-heading">
|
<h3 className="heading-small card-heading">
|
||||||
{t("myportal:awatitingsubmission-card-title")}
|
{t("myportal:awatitingsubmission-card-title")}
|
||||||
</h3>
|
</h3>
|
||||||
<div className="cardVieAll">
|
<div className="cardModuleContainer">
|
||||||
<Link href="/">
|
<TopThree />
|
||||||
<a>{t("myportal:viewall-link")}</a>
|
</div>
|
||||||
</Link>
|
<div className="cardVieAll">
|
||||||
|
<Link href="/viewall">
|
||||||
|
<a>{t("myportal:viewall-link")}</a>
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
);
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,28 @@
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import TopThree from "./topthree";
|
||||||
export default function MyCases() {
|
export default function MyCases() {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { locale } = router;
|
const { locale } = router;
|
||||||
return (
|
return (
|
||||||
<div className="card card-3" id="casescomment-card">
|
<div className="card card-3" id="casescomment-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<h3 className="heading-small card-heading">
|
<h3 className="heading-small card-heading">
|
||||||
{t("myportal:mycases-card-title")}
|
{t("myportal:mycases-card-title")}
|
||||||
</h3>
|
</h3>
|
||||||
<div className="cardVieAll">
|
<div className="cardModuleContainer">
|
||||||
<Link href="/">
|
<TopThree />
|
||||||
<a>{t("myportal:viewall-link")}</a>
|
</div>
|
||||||
</Link>
|
|
||||||
|
<div className="cardVieAll">
|
||||||
|
<Link href="/viewall">
|
||||||
|
<a>{t("myportal:viewall-link")}</a>
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
);
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,28 @@
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import TopThree from "./topthree";
|
||||||
export default function MyRepresentations() {
|
export default function MyRepresentations() {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { locale } = router;
|
const { locale } = router;
|
||||||
return (
|
return (
|
||||||
<div className="card card-3" id="casescomment-card">
|
<div className="card card-3" id="casescomment-card">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<h3 className="heading-small card-heading">
|
<h3 className="heading-small card-heading">
|
||||||
{t("myportal:myrepresentations-card-title")}
|
{t("myportal:myrepresentations-card-title")}
|
||||||
</h3>
|
</h3>
|
||||||
<div className="cardVieAll">
|
<div className="cardModuleContainer">
|
||||||
<Link href="/">
|
<TopThree />{" "}
|
||||||
<a>{t("myportal:viewall-link")}</a>
|
</div>
|
||||||
</Link>
|
|
||||||
|
<div className="cardVieAll">
|
||||||
|
<Link href="/viewall">
|
||||||
|
<a>{t("myportal:viewall-link")}</a>
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
);
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
import Link from "next/link";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
|
||||||
|
export default function TopThree() {
|
||||||
|
let { t } = useTranslation();
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const { locale } = router;
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div className="cardModuleItem">
|
||||||
|
<div className="cardModuleDetails">
|
||||||
|
<div className="cardModuleReference">
|
||||||
|
<b>Case reference:</b>{" "}
|
||||||
|
<Link href="/case">
|
||||||
|
<a>CAS-00010-J9W6L5</a>
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
<div className="carModuleAddress">
|
||||||
|
<b>Address: </b> Beggars Lane
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="cardModuleRemoveCase"> —</div>
|
||||||
|
</div>
|
||||||
|
<div className="cardModuleItem">
|
||||||
|
<div className="cardModuleDetails">
|
||||||
|
<div className="cardModuleReference">
|
||||||
|
<b>Case reference:</b>{" "}
|
||||||
|
<Link href="/case">
|
||||||
|
<a>CAS-00010-J9W6L5</a>
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
<div className="carModuleAddress">
|
||||||
|
<b>Address: </b> Beggars Lane
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="cardModuleRemoveCase"> —</div>
|
||||||
|
</div>
|
||||||
|
<div className="cardModuleItem">
|
||||||
|
<div className="cardModuleDetails">
|
||||||
|
<div className="cardModuleReference">
|
||||||
|
<b>Case reference:</b>{" "}
|
||||||
|
<Link href="/case">
|
||||||
|
<a>CAS-00010-J9W6L5</a>
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
<div className="carModuleAddress">
|
||||||
|
<b>Address: </b> Beggars Lane
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="cardModuleRemoveCase"> —</div>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import TopThree from "./topthree";
|
||||||
export default function WatchedCases() {
|
export default function WatchedCases() {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|
||||||
@@ -13,9 +13,12 @@ export default function WatchedCases() {
|
|||||||
<h3 className="heading-small card-heading">
|
<h3 className="heading-small card-heading">
|
||||||
{t("myportal:watchedcases-card-title")}
|
{t("myportal:watchedcases-card-title")}
|
||||||
</h3>
|
</h3>
|
||||||
|
<div className="cardModuleContainer">
|
||||||
|
<TopThree />
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="cardVieAll">
|
<div className="cardVieAll">
|
||||||
<Link href="/">
|
<Link href="/viewall">
|
||||||
<a>{t("myportal:viewall-link")}</a>
|
<a>{t("myportal:viewall-link")}</a>
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -53,7 +53,9 @@ let BuildSection = (props) => {
|
|||||||
return (
|
return (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-grid-column-two-thirds">
|
<div className="govuk-grid-column-two-thirds">
|
||||||
<h2>{titles[0].value} </h2>
|
<h1 className="govuk-heading-m govuk-!-margin-top-5">
|
||||||
|
{titles[0].value}{" "}
|
||||||
|
</h1>
|
||||||
<form onSubmit={handleSubmit(onHandleSubmit)}>
|
<form onSubmit={handleSubmit(onHandleSubmit)}>
|
||||||
<BuildRow
|
<BuildRow
|
||||||
rowXML={rowXML}
|
rowXML={rowXML}
|
||||||
@@ -96,9 +98,10 @@ let BuildSection = (props) => {
|
|||||||
aria-labelledby="progress-list"
|
aria-labelledby="progress-list"
|
||||||
className="at-nav"
|
className="at-nav"
|
||||||
>
|
>
|
||||||
<h3 className="govuk-heading-s govuk-!-font-weight-regular gov-font-dark-grey">
|
<h3 className="govuk-heading-s govuk-!-font-weight-bold gov-font-dark-grey">
|
||||||
{props.formTitle}
|
Progress:
|
||||||
</h3>
|
</h3>
|
||||||
|
<hr className="govuk-section-break govuk-section-break--m govuk-section-break--visible" />
|
||||||
|
|
||||||
<ol className="govuk-list">
|
<ol className="govuk-list">
|
||||||
<ul className="govuk-list ">
|
<ul className="govuk-list ">
|
||||||
|
|||||||
@@ -0,0 +1,147 @@
|
|||||||
|
import Link from "next/link";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
|
||||||
|
export default function ViewAllResults(props) {
|
||||||
|
const { searchString, searchResultsObj } = props;
|
||||||
|
let { t } = useTranslation();
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const { locale } = router;
|
||||||
|
|
||||||
|
var resultsArr = props.searchResultsObj.searchResultsObj.value || [{}];
|
||||||
|
const resultRow = Object.keys(resultsArr).map((key, index) => {
|
||||||
|
<div className="govuk-summary-list__row">
|
||||||
|
<dd className="govuk-summary-list__value govuk-!-font-size-14 govuk-!-padding-left-2">
|
||||||
|
<Link href="/case">
|
||||||
|
<a>
|
||||||
|
<span className="results-visually-hidden">
|
||||||
|
Case Reference:
|
||||||
|
</span>
|
||||||
|
{resultsArr[key].title}
|
||||||
|
</a>
|
||||||
|
</Link>
|
||||||
|
</dd>
|
||||||
|
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||||
|
<span className="results-visually-hidden">Site Address: </span>
|
||||||
|
23 Martineau Lane
|
||||||
|
<br /> HASTINGS
|
||||||
|
<br />
|
||||||
|
TN35 5DS
|
||||||
|
</dd>
|
||||||
|
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||||
|
<span className="results-visually-hidden">
|
||||||
|
Appellant/Applicant:
|
||||||
|
</span>
|
||||||
|
Mr J Pocknell
|
||||||
|
</dd>
|
||||||
|
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||||
|
<span className="results-visually-hidden">Authority:</span>
|
||||||
|
Hastings Borough Council{" "}
|
||||||
|
</dd>
|
||||||
|
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||||
|
<span className="results-visually-hidden">Case Type:</span>
|
||||||
|
Planning (W){" "}
|
||||||
|
</dd>
|
||||||
|
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||||
|
<span className="results-visually-hidden">Status:</span>
|
||||||
|
In Progress
|
||||||
|
</dd>
|
||||||
|
</div>;
|
||||||
|
});
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-grid-column-full">
|
||||||
|
<h1 className="govuk-heading-xl govuk-!-margin-bottom-7">
|
||||||
|
Your cases
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<dl className="govuk-summary-list govuk-!-margin-bottom-9 results">
|
||||||
|
<div className="govuk-summary-list__row results-headings">
|
||||||
|
<dd className="govuk-summary-list__key govuk-!-font-size-14 results_wider govuk-!-padding-left-2">
|
||||||
|
{t("search:searchresults-case-reference-label")}
|
||||||
|
</dd>
|
||||||
|
<dd className="govuk-summary-list__key govuk-!-font-size-14">
|
||||||
|
{t("search:searchresults-site-address-label")}
|
||||||
|
</dd>
|
||||||
|
<dd className="govuk-summary-list__key govuk-!-font-size-14">
|
||||||
|
{t("search:searchresults-applicant-label")}
|
||||||
|
</dd>
|
||||||
|
<dd className="govuk-summary-list__key govuk-!-font-size-14">
|
||||||
|
{t("search:searchresults-authority-label")}
|
||||||
|
</dd>
|
||||||
|
<dd className="govuk-summary-list__key govuk-!-font-size-14">
|
||||||
|
{t("search:searchresults-case-type-label")}
|
||||||
|
</dd>
|
||||||
|
<dd className="govuk-summary-list__key govuk-!-font-size-14">
|
||||||
|
{t("search:searchresults-status-label")}
|
||||||
|
</dd>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{resultsArr.map((item, key) => {
|
||||||
|
return (
|
||||||
|
<div className="govuk-summary-list__row" key={key}>
|
||||||
|
<dd className="govuk-summary-list__value govuk-!-font-size-14 govuk-!-padding-left-2">
|
||||||
|
<Link href="/case">
|
||||||
|
<a>
|
||||||
|
<span className="results-visually-hidden">
|
||||||
|
Case Reference:
|
||||||
|
</span>
|
||||||
|
{item.title}
|
||||||
|
</a>
|
||||||
|
</Link>
|
||||||
|
</dd>
|
||||||
|
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||||
|
<span className="results-visually-hidden">
|
||||||
|
Site Address:{" "}
|
||||||
|
</span>
|
||||||
|
23 Martineau Lane
|
||||||
|
<br /> HASTINGS
|
||||||
|
<br />
|
||||||
|
TN35 5DS
|
||||||
|
</dd>
|
||||||
|
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||||
|
<span className="results-visually-hidden">
|
||||||
|
Appellant/Applicant:
|
||||||
|
</span>
|
||||||
|
Mr J Pocknell
|
||||||
|
</dd>
|
||||||
|
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||||
|
<span className="results-visually-hidden">
|
||||||
|
Authority:
|
||||||
|
</span>
|
||||||
|
{
|
||||||
|
item[
|
||||||
|
"_customerid_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
</dd>
|
||||||
|
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||||
|
<span className="results-visually-hidden">
|
||||||
|
Case Type:
|
||||||
|
</span>
|
||||||
|
{
|
||||||
|
item[
|
||||||
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
</dd>
|
||||||
|
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||||
|
<span className="results-visually-hidden">
|
||||||
|
Status:
|
||||||
|
</span>
|
||||||
|
{
|
||||||
|
item[
|
||||||
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
</dd>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
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 ViewAllResults from "./search/viewall";
|
||||||
|
|
||||||
|
export default function ViewAll(props) {
|
||||||
|
const { searchString, searchResultsObj } = props;
|
||||||
|
let { t } = useTranslation();
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const { locale } = router;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<main
|
||||||
|
className="govuk-main-wrapper govuk-main-wrapper--auto-spacing"
|
||||||
|
id="main-content"
|
||||||
|
role="main"
|
||||||
|
>
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-grid-column-full">
|
||||||
|
<ViewAllResults
|
||||||
|
searchString={searchString}
|
||||||
|
searchResultsObj={searchResultsObj}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-grid-column-full">
|
||||||
|
<div className="govuk-button-group">
|
||||||
|
<Link href="/myportal">
|
||||||
|
<a className="govuk-button">Back</a>
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -20,6 +20,9 @@
|
|||||||
"/searchresults": [
|
"/searchresults": [
|
||||||
"search"
|
"search"
|
||||||
],
|
],
|
||||||
|
"/viewall": [
|
||||||
|
"search"
|
||||||
|
],
|
||||||
"/case": [
|
"/case": [
|
||||||
"case"
|
"case"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"service-name": "Porth Gwaith Achos Apeliadau",
|
"service-name": "Cynllunio gwaith achos",
|
||||||
"breadcrumb-back-link": "Yn ôl",
|
"breadcrumb-back-link": "Yn ôl",
|
||||||
"error-radio": "Dewiswch opsiwn",
|
"error-radio": "Dewiswch opsiwn",
|
||||||
"error-checkbox": "Enter a value",
|
"error-checkbox": "Enter a value",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"service-name": "Appeals Casework Portal",
|
"service-name": "Planning casework",
|
||||||
"breadcrumb-back-link": "Back",
|
"breadcrumb-back-link": "Back",
|
||||||
"error-radio": "Choose an option",
|
"error-radio": "Choose an option",
|
||||||
"error-checkbox": "Choose an option",
|
"error-checkbox": "Choose an option",
|
||||||
|
|||||||
@@ -0,0 +1,101 @@
|
|||||||
|
const ApiResponse = (req, res) => {
|
||||||
|
res.statusCode = 200;
|
||||||
|
res.json({
|
||||||
|
"@odata.context":
|
||||||
|
"https://devcrm2016.llcdt.gov.wales/DVPINS/api/data/v8.2/$metadata#incidents(_accountid_value,_customerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title)",
|
||||||
|
"@odata.count": 9,
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"@odata.etag": 'W/"704047"',
|
||||||
|
"_accountid_value": null,
|
||||||
|
"_customerid_value": "56e7ef63-7e64-eb11-aaba-00224800be9c",
|
||||||
|
"pinswg_appealcasetype": 846040000,
|
||||||
|
"statuscode": 1,
|
||||||
|
"ticketnumber": "CAS-00009-W8N6W4",
|
||||||
|
"title": "CAS-00009-W8N6W4",
|
||||||
|
"incidentid": "9919eac3-21af-eb11-aac3-00224800be9c",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"@odata.etag": 'W/"704095"',
|
||||||
|
"_accountid_value": null,
|
||||||
|
"_customerid_value": "56e7ef63-7e64-eb11-aaba-00224800be9c",
|
||||||
|
"pinswg_appealcasetype": 846040011,
|
||||||
|
"statuscode": 1,
|
||||||
|
"ticketnumber": "CAS-00010-J9W6L5",
|
||||||
|
"title": "CAS-00010-J9W6L5",
|
||||||
|
"incidentid": "55f4fc74-33af-eb11-aac3-00224800be9c",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"@odata.etag": 'W/"709250"',
|
||||||
|
"_accountid_value": null,
|
||||||
|
"_customerid_value": "41fead24-29ba-eb11-aac4-00224800be9c",
|
||||||
|
"pinswg_appealcasetype": 846040001,
|
||||||
|
"statuscode": 1,
|
||||||
|
"ticketnumber": "CAS-00011-K1N0J8",
|
||||||
|
"title": "CAS-00011-K1N0J8",
|
||||||
|
"incidentid": "6bd04d33-29ba-eb11-aac4-00224800be9c",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"@odata.etag": 'W/"710463"',
|
||||||
|
"_accountid_value": null,
|
||||||
|
"_customerid_value": "56e7ef63-7e64-eb11-aaba-00224800be9c",
|
||||||
|
"pinswg_appealcasetype": 846040000,
|
||||||
|
"statuscode": 1,
|
||||||
|
"ticketnumber": "CAS-00012-D9W6S8",
|
||||||
|
"title": "CAS-00012-D9W6S8",
|
||||||
|
"incidentid": "b9c9cbe4-6abc-eb11-aac4-00224800be9c",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"@odata.etag": 'W/"746096"',
|
||||||
|
"_accountid_value": null,
|
||||||
|
"_customerid_value": "80d99a34-82ad-eb11-aac3-00224800be9c",
|
||||||
|
"pinswg_appealcasetype": 846040025,
|
||||||
|
"statuscode": 1,
|
||||||
|
"ticketnumber": "CAS-00013-Z0B5Z9",
|
||||||
|
"title": "CAS-00013-Z0B5Z9",
|
||||||
|
"incidentid": "34071ec4-54d3-eb11-aac5-00224800be9c",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"@odata.etag": 'W/"749764"',
|
||||||
|
"_accountid_value": null,
|
||||||
|
"_customerid_value": "56e7ef63-7e64-eb11-aaba-00224800be9c",
|
||||||
|
"pinswg_appealcasetype": 846040021,
|
||||||
|
"statuscode": 1,
|
||||||
|
"ticketnumber": "CAS-00014-S3L9B4",
|
||||||
|
"title": "CAS-00014-S3L9B4",
|
||||||
|
"incidentid": "2230700b-ebd7-eb11-aac5-00224800be9c",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"@odata.etag": 'W/"750875"',
|
||||||
|
"_accountid_value": null,
|
||||||
|
"_customerid_value": "cfb7b446-a7d8-eb11-aac5-00224800be9c",
|
||||||
|
"pinswg_appealcasetype": 846040000,
|
||||||
|
"statuscode": 1,
|
||||||
|
"ticketnumber": "CAS-00015-L7J9H1",
|
||||||
|
"title": "CAS-00015-L7J9H1",
|
||||||
|
"incidentid": "d5b7b446-a7d8-eb11-aac5-00224800be9c",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"@odata.etag": 'W/"755001"',
|
||||||
|
"_accountid_value": null,
|
||||||
|
"_customerid_value": "cfb7b446-a7d8-eb11-aac5-00224800be9c",
|
||||||
|
"pinswg_appealcasetype": 846040004,
|
||||||
|
"statuscode": 1,
|
||||||
|
"ticketnumber": "CAS-00016-Y9K9Q0",
|
||||||
|
"title": "CAS-00016-Y9K9Q0",
|
||||||
|
"incidentid": "cc6f93ea-bdd9-eb11-aac5-00224800be9c",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"@odata.etag": 'W/"755216"',
|
||||||
|
"_accountid_value": null,
|
||||||
|
"_customerid_value": "243c0009-49da-eb11-aac5-00224800be9c",
|
||||||
|
"pinswg_appealcasetype": 846040004,
|
||||||
|
"statuscode": 1,
|
||||||
|
"ticketnumber": "CAS-00017-B8X7N0",
|
||||||
|
"title": "CAS-00017-B8X7N0",
|
||||||
|
"incidentid": "73895a1b-68dd-eb11-aac5-00224800be9c",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export default ApiResponse;
|
||||||
@@ -21,6 +21,7 @@ const Home = (props) => {
|
|||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { locale } = router;
|
const { locale } = router;
|
||||||
|
const { appealtypes } = router.query;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
@@ -34,6 +35,7 @@ const Home = (props) => {
|
|||||||
<Header courseName={t("common:service-name")} />
|
<Header courseName={t("common:service-name")} />
|
||||||
<div className="govuk-width-container">
|
<div className="govuk-width-container">
|
||||||
<Banner />
|
<Banner />
|
||||||
|
<Breadcrumbs slug={appealtypes} />
|
||||||
<Case />
|
<Case />
|
||||||
</div>
|
</div>
|
||||||
<Footer footerLinks={footerLinks} />
|
<Footer footerLinks={footerLinks} />
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ let Home = (props) => {
|
|||||||
<Header courseName={t("common:service-name")} />
|
<Header courseName={t("common:service-name")} />
|
||||||
<div className="govuk-width-container">
|
<div className="govuk-width-container">
|
||||||
<Banner />
|
<Banner />
|
||||||
<Breadcrumbs slug={appealtypes} />
|
<Breadcrumbs slug={appealtypes} formTitle={formTitle} />
|
||||||
|
|
||||||
<BuildSection
|
<BuildSection
|
||||||
formXML={formXML}
|
formXML={formXML}
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ const Home = (props) => {
|
|||||||
|
|
||||||
const { appealType } = props;
|
const { appealType } = props;
|
||||||
|
|
||||||
const optionsObj =
|
const optionsObj = props.appealType.appealTypeOptions.GlobalOptionSet
|
||||||
props.appealType.appealTypeOptions.GlobalOptionSet.Options;
|
.Options || [{}];
|
||||||
|
|
||||||
const appealOptions = Object.keys(optionsObj).map((key, index) => (
|
const appealOptions = Object.keys(optionsObj).map((key, index) => (
|
||||||
<option
|
<option
|
||||||
|
|||||||
@@ -0,0 +1,97 @@
|
|||||||
|
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 ViewAll from "../components/viewall";
|
||||||
|
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 { setSearch, getSearchObj } from "../store/search/action";
|
||||||
|
import {
|
||||||
|
setSearchResults,
|
||||||
|
getSearchResultsObj,
|
||||||
|
} from "../store/searchOutput/action";
|
||||||
|
import { getBasicSearch } from "../actions";
|
||||||
|
|
||||||
|
const Home = (props) => {
|
||||||
|
const { footerLinks, pages } = props;
|
||||||
|
let { t, lang } = useTranslation();
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const { locale } = router;
|
||||||
|
const { appealtypes } = router.query;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<Head>
|
||||||
|
<title>
|
||||||
|
{t("search:page-title")} - {t("common:service-name")}
|
||||||
|
</title>
|
||||||
|
</Head>
|
||||||
|
<div id="page_wrapper">
|
||||||
|
<CookieBanner />
|
||||||
|
<Header courseName={t("common:service-name")} />
|
||||||
|
<div className="govuk-width-container">
|
||||||
|
<Banner />
|
||||||
|
<Breadcrumbs slug={appealtypes} />
|
||||||
|
<ViewAll
|
||||||
|
searchString={"View All"}
|
||||||
|
searchResultsObj={props.searchResultsObj}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<Footer footerLinks={footerLinks} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getServerSideProps = wrapper.getServerSideProps(
|
||||||
|
(store) =>
|
||||||
|
async ({ req, res }) => {
|
||||||
|
const searchResultsObj = (await getBasicSearch("View All")) || null;
|
||||||
|
store.dispatch(setSearchResults(searchResultsObj));
|
||||||
|
store.dispatch(setSearch("View All"));
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// export const getServerSideProps = wrapper.getServerSideProps(
|
||||||
|
// async ({ locale, store, query, 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));
|
||||||
|
// console.log(query);
|
||||||
|
// //store.dispatch(setSearch(query.search));
|
||||||
|
// }
|
||||||
|
// );
|
||||||
|
|
||||||
|
const mapStateToProps = (state) => {
|
||||||
|
console.log("mapstate", state);
|
||||||
|
|
||||||
|
return {
|
||||||
|
search: state.search,
|
||||||
|
searchResultsObj: state.searchResultsObj,
|
||||||
|
form: state.form,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export default connect(mapStateToProps)(Home);
|
||||||
@@ -209,3 +209,64 @@ html[data-useragent*="MSIE 10.0"] .flex-container {
|
|||||||
margin-top: auto;
|
margin-top: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.card-body {
|
||||||
|
width: 93%;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.cardModuleItem:last-of-type {
|
||||||
|
margin-bottom: 20px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cardModuleItem {
|
||||||
|
display: flex;
|
||||||
|
padding: 10px 10px 10px 0;
|
||||||
|
border-bottom: 1px solid lightgrey;
|
||||||
|
|
||||||
|
.cardModuleDetails {
|
||||||
|
width: 95%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cardModuleReference a {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cardModuleRemoveCase {
|
||||||
|
border: 1px solid $red;
|
||||||
|
padding: 5px;
|
||||||
|
height: 20px;
|
||||||
|
padding-top: 0px;
|
||||||
|
padding-bottom: 0px;
|
||||||
|
border-radius: 5px;
|
||||||
|
width: auto;
|
||||||
|
color: white;
|
||||||
|
font-weight: bold;
|
||||||
|
background-color: $red;
|
||||||
|
font-size: 15px;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: $lightred;
|
||||||
|
color: $white;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
border-color: #ffdd00;
|
||||||
|
outline: 3px solid transparent;
|
||||||
|
-webkit-box-shadow: inset 0 0 0 1px #ffdd00;
|
||||||
|
box-shadow: inset 0 0 0 1px #ffdd00;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus:not(:active):not(:hover) {
|
||||||
|
border-color: #ffdd00;
|
||||||
|
color: #0b0c0c;
|
||||||
|
background-color: #ffdd00;
|
||||||
|
-webkit-box-shadow: 0 2px 0 #0b0c0c;
|
||||||
|
box-shadow: 0 2px 0 #0b0c0c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -9,13 +9,14 @@ html {
|
|||||||
.govuk-heading-xl,
|
.govuk-heading-xl,
|
||||||
.govuk-heading-l,
|
.govuk-heading-l,
|
||||||
.govuk-heading-m,
|
.govuk-heading-m,
|
||||||
.govuk-header-l,
|
s .govuk-header-l,
|
||||||
.govuk-header-m,
|
.govuk-header-m,
|
||||||
.govuk-header__link,
|
.govuk-header__link,
|
||||||
.govuk-button,
|
.govuk-button,
|
||||||
.govuk-label,
|
.govuk-label,
|
||||||
.govuk-select,
|
.govuk-select,
|
||||||
.govuk-breadcrumbs__link,
|
.govuk-breadcrumbs__link,
|
||||||
|
.govuk-fieldset__legend--s,
|
||||||
h1,
|
h1,
|
||||||
h2,
|
h2,
|
||||||
h3,
|
h3,
|
||||||
|
|||||||
Reference in New Issue
Block a user