rioght mouse click on view all
This commit is contained in:
@@ -43,6 +43,7 @@ const Breadcrumbs = (props) => {
|
|||||||
? 9
|
? 9
|
||||||
: "";
|
: "";
|
||||||
|
|
||||||
|
var viewAllKey = currentView?.viewKey || router.query.viewKey;
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<nav
|
<nav
|
||||||
@@ -475,24 +476,20 @@ const Breadcrumbs = (props) => {
|
|||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
{currentView.currentView.viewKey ==
|
{viewAllKey ==
|
||||||
"awaitingSubmissionDetails" &&
|
"awaitingSubmissionDetails" &&
|
||||||
t(
|
t(
|
||||||
"myportal:awatitingsubmission-card-title"
|
"myportal:awatitingsubmission-card-title"
|
||||||
)}
|
)}
|
||||||
{currentView.currentView.viewKey ==
|
{viewAllKey == "watchedCases" &&
|
||||||
"watchedCases" &&
|
|
||||||
t("myportal:watchedcases-card-title")}
|
t("myportal:watchedcases-card-title")}
|
||||||
{currentView.currentView.viewKey ==
|
{viewAllKey == "myCases" &&
|
||||||
"myCases" &&
|
|
||||||
t("myportal:mycases-card-title")}
|
t("myportal:mycases-card-title")}
|
||||||
{currentView.currentView.viewKey ==
|
{viewAllKey == "myRepresentations" &&
|
||||||
"myRepresentations" &&
|
|
||||||
t(
|
t(
|
||||||
"myportal:myrepresentations-card-title"
|
"myportal:myrepresentations-card-title"
|
||||||
)}
|
)}
|
||||||
{currentView.currentView.viewKey ==
|
{viewAllKey == "mySubmittedReps" &&
|
||||||
"mySubmittedReps" &&
|
|
||||||
"Submitted representations"}
|
"Submitted representations"}
|
||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -57,7 +57,6 @@ const CaseSummary = (props) => {
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { locale } = router;
|
const { locale } = router;
|
||||||
const {
|
const {
|
||||||
appealTypeID,
|
|
||||||
incidentid,
|
incidentid,
|
||||||
caseReference,
|
caseReference,
|
||||||
myCases,
|
myCases,
|
||||||
@@ -79,6 +78,7 @@ const CaseSummary = (props) => {
|
|||||||
docsOffline,
|
docsOffline,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
|
let appealTypeID = props.appealTypeID || router.query.appealType;
|
||||||
const showLoginCheck =
|
const showLoginCheck =
|
||||||
currentType == "directResultsObj" ? "true" : currentView.showLogin;
|
currentType == "directResultsObj" ? "true" : currentView.showLogin;
|
||||||
const { data: session, status } = useSession();
|
const { data: session, status } = useSession();
|
||||||
|
|||||||
@@ -34,11 +34,12 @@ const AwaitingSubmission = (props) => {
|
|||||||
<div className="cardVieAll">
|
<div className="cardVieAll">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale != "en"
|
(router.locale != "en"
|
||||||
? "/" +
|
? "/" +
|
||||||
router.locale +
|
router.locale +
|
||||||
"/fymhorth/gweldpopeth"
|
"/fymhorth/gweldpopeth"
|
||||||
: "/myportal/viewall"
|
: "/myportal/viewall") +
|
||||||
|
"?viewKey=awaitingSubmission"
|
||||||
}
|
}
|
||||||
className="govuk-link--no-underline"
|
className="govuk-link--no-underline"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@@ -351,11 +351,12 @@ const AwaitingSubmissionFromBlob = (props) => {
|
|||||||
<div className="cardVieAll">
|
<div className="cardVieAll">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale != "en"
|
(router.locale != "en"
|
||||||
? "/" +
|
? "/" +
|
||||||
router.locale +
|
router.locale +
|
||||||
"/fymhorth/gweldpopeth"
|
"/fymhorth/gweldpopeth"
|
||||||
: "/myportal/viewall"
|
: "/myportal/viewall") +
|
||||||
|
"?viewKey=awaitingSubmission"
|
||||||
}
|
}
|
||||||
className="govuk-link--no-underline"
|
className="govuk-link--no-underline"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@@ -29,11 +29,11 @@ const MyCases = (props) => {
|
|||||||
<div className="cardVieAll">
|
<div className="cardVieAll">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale != "en"
|
(router.locale != "en"
|
||||||
? "/" +
|
? "/" +
|
||||||
router.locale +
|
router.locale +
|
||||||
"/fymhorth/gweldpopeth"
|
"/fymhorth/gweldpopeth"
|
||||||
: "/myportal/viewall"
|
: "/myportal/viewall") + "?viewKey=myCases"
|
||||||
}
|
}
|
||||||
className="govuk-link--no-underline"
|
className="govuk-link--no-underline"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@@ -34,11 +34,12 @@ const MyRepresentations = (props) => {
|
|||||||
<div className="cardVieAll">
|
<div className="cardVieAll">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale != "en"
|
(router.locale != "en"
|
||||||
? "/" +
|
? "/" +
|
||||||
router.locale +
|
router.locale +
|
||||||
"/fymhorth/gweldpopeth"
|
"/fymhorth/gweldpopeth"
|
||||||
: "/myportal/viewall"
|
: "/myportal/viewall") +
|
||||||
|
"?viewKey=myRepresentations"
|
||||||
}
|
}
|
||||||
className="govuk-link--no-underline"
|
className="govuk-link--no-underline"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@@ -33,11 +33,12 @@ const MyRepresentations = (props) => {
|
|||||||
<div className="cardVieAll">
|
<div className="cardVieAll">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale != "en"
|
(router.locale != "en"
|
||||||
? "/" +
|
? "/" +
|
||||||
router.locale +
|
router.locale +
|
||||||
"/fymhorth/gweldpopeth"
|
"/fymhorth/gweldpopeth"
|
||||||
: "/myportal/viewall"
|
: "/myportal/viewall") +
|
||||||
|
"?viewKey=myRepresentations"
|
||||||
}
|
}
|
||||||
className="govuk-link--no-underline"
|
className="govuk-link--no-underline"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@@ -40,11 +40,12 @@ const MySubmittedReps = (props) => {
|
|||||||
<div className="cardVieAll">
|
<div className="cardVieAll">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale != "en"
|
(router.locale != "en"
|
||||||
? "/" +
|
? "/" +
|
||||||
router.locale +
|
router.locale +
|
||||||
"/fymhorth/gweldpopeth"
|
"/fymhorth/gweldpopeth"
|
||||||
: "/myportal/viewall"
|
: "/myportal/viewall") +
|
||||||
|
"?viewKey=mySubmittedReps"
|
||||||
}
|
}
|
||||||
className="govuk-link--no-underline"
|
className="govuk-link--no-underline"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@@ -207,13 +207,19 @@ const TopThree = (props) => {
|
|||||||
showTopThreeArr[key].incidentid
|
showTopThreeArr[key].incidentid
|
||||||
: router.locale == "cy"
|
: router.locale == "cy"
|
||||||
? "/fymhorth/achos/" +
|
? "/fymhorth/achos/" +
|
||||||
showTopThreeArr[key].pinswg_title +
|
showTopThreeArr[key].ticketnumber +
|
||||||
"?key=" +
|
"?key=" +
|
||||||
topThreeType
|
topThreeType +
|
||||||
|
"&appealType=" +
|
||||||
|
showTopThreeArr[key]
|
||||||
|
.pinswg_appealcasetype
|
||||||
: "/myportal/case/" +
|
: "/myportal/case/" +
|
||||||
showTopThreeArr[key].pinswg_title +
|
showTopThreeArr[key].ticketnumber +
|
||||||
"?key=" +
|
"?key=" +
|
||||||
topThreeType
|
topThreeType +
|
||||||
|
"&appealType=" +
|
||||||
|
showTopThreeArr[key]
|
||||||
|
.pinswg_appealcasetype
|
||||||
}
|
}
|
||||||
className="govuk-link--no-underline"
|
className="govuk-link--no-underline"
|
||||||
data-id={index}
|
data-id={index}
|
||||||
|
|||||||
@@ -77,18 +77,20 @@ const ViewAllResults = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let currentView = props.currentView.currentView;
|
let currentView = props.currentView.currentView;
|
||||||
//console.log("currentView.viewKey:", typeof currentView.viewKey);
|
//console.log("viewAllKey:", typeof viewAllKey);
|
||||||
|
|
||||||
// typeof currentView.viewKey == "undefined"
|
// typeof viewAllKey == "undefined"
|
||||||
// ? console.log("no currentview")
|
// ? console.log("no currentview")
|
||||||
// : console.log("has currentview");
|
// : console.log("has currentview");
|
||||||
|
|
||||||
|
var viewAllKey = currentView?.viewKey || router.query.viewKey;
|
||||||
|
|
||||||
var resultsArr =
|
var resultsArr =
|
||||||
currentView.viewKey == "awaitingSubmissionDetails"
|
viewAllKey == "awaitingSubmissionDetails"
|
||||||
? props["awaitingSubmission"].awaitingSubmissionDetails.case
|
? props["awaitingSubmission"].awaitingSubmissionDetails.case
|
||||||
: currentView.viewKey == "mySubmittedReps"
|
: viewAllKey == "mySubmittedReps"
|
||||||
? props[currentView.viewKey][currentView.viewKey]
|
? props[viewAllKey][viewAllKey]
|
||||||
: props[currentView.viewKey][currentView.viewKey].value || [];
|
: props[viewAllKey][viewAllKey].value || [];
|
||||||
|
|
||||||
const [orderByState, setOrderbyState] = useState("createdon");
|
const [orderByState, setOrderbyState] = useState("createdon");
|
||||||
const [fieldSortState, setfieldSortState] = useState("asc");
|
const [fieldSortState, setfieldSortState] = useState("asc");
|
||||||
@@ -105,11 +107,11 @@ const ViewAllResults = (props) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var searchDetailsObj =
|
var searchDetailsObj =
|
||||||
currentView.viewKey == "awaitingSubmissionDetails"
|
viewAllKey == "awaitingSubmissionDetails"
|
||||||
? props["awaitingSubmission"].awaitingSubmissionDetails.value
|
? props["awaitingSubmission"].awaitingSubmissionDetails.value
|
||||||
: currentView.viewKey == "myRepresentations"
|
: viewAllKey == "myRepresentations"
|
||||||
? props["myRepresentations"].myRepresentations.value
|
? props["myRepresentations"].myRepresentations.value
|
||||||
: props[currentView.viewKey][currentView.viewKey + "Details"] || [];
|
: props[viewAllKey][viewAllKey + "Details"] || [];
|
||||||
|
|
||||||
let resultsRowArr = [];
|
let resultsRowArr = [];
|
||||||
const buildResultsRowArr = () => {
|
const buildResultsRowArr = () => {
|
||||||
@@ -117,15 +119,13 @@ const ViewAllResults = (props) => {
|
|||||||
let detailsObj = jsonpath({
|
let detailsObj = jsonpath({
|
||||||
path:
|
path:
|
||||||
"$" +
|
"$" +
|
||||||
(currentView.viewKey == "myRepresentations"
|
(viewAllKey == "myRepresentations" ? "" : "..value") +
|
||||||
? ""
|
|
||||||
: "..value") +
|
|
||||||
'[?(@ && @.pinswg_name=="' +
|
'[?(@ && @.pinswg_name=="' +
|
||||||
(currentView.viewKey == "awaitingSubmissionDetails"
|
(viewAllKey == "awaitingSubmissionDetails"
|
||||||
? item.title
|
? item.title
|
||||||
: currentView.viewKey == "watchedCases"
|
: viewAllKey == "watchedCases"
|
||||||
? item.ticketnumber
|
? item.ticketnumber
|
||||||
: currentView.viewKey == "myRepresentations"
|
: viewAllKey == "myRepresentations"
|
||||||
? item.pinswg_name
|
? item.pinswg_name
|
||||||
: item.pinswg_title) +
|
: item.pinswg_title) +
|
||||||
'")]',
|
'")]',
|
||||||
@@ -137,7 +137,7 @@ const ViewAllResults = (props) => {
|
|||||||
//console.log(searchDetailsObj[key]);
|
//console.log(searchDetailsObj[key]);
|
||||||
|
|
||||||
// searchDetailsObj[key] =
|
// searchDetailsObj[key] =
|
||||||
// currentView.viewKey == "myRepresentations"
|
// viewAllKey == "myRepresentations"
|
||||||
// ? searchDetailsObj[key].value[0]
|
// ? searchDetailsObj[key].value[0]
|
||||||
// : searchDetailsObj[key];
|
// : searchDetailsObj[key];
|
||||||
|
|
||||||
@@ -145,7 +145,7 @@ const ViewAllResults = (props) => {
|
|||||||
resultsRowArr.push(
|
resultsRowArr.push(
|
||||||
<div className="govuk-summary-list__row" key={key}>
|
<div className="govuk-summary-list__row" key={key}>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16 govuk-!-padding-left-2">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16 govuk-!-padding-left-2">
|
||||||
{currentView.viewKey == "myCases" &&
|
{viewAllKey == "myCases" &&
|
||||||
resultsArr[key].pinswg_publishtoweb === false ? (
|
resultsArr[key].pinswg_publishtoweb === false ? (
|
||||||
<div className="cardModuleReference">
|
<div className="cardModuleReference">
|
||||||
{resultsArr[key].ticketnumber}{" "}
|
{resultsArr[key].ticketnumber}{" "}
|
||||||
@@ -155,8 +155,7 @@ const ViewAllResults = (props) => {
|
|||||||
<>
|
<>
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
currentView.viewKey ==
|
viewAllKey == "myRepresentations"
|
||||||
"myRepresentations"
|
|
||||||
? {
|
? {
|
||||||
pathname:
|
pathname:
|
||||||
"/myportal/representation",
|
"/myportal/representation",
|
||||||
@@ -169,7 +168,7 @@ const ViewAllResults = (props) => {
|
|||||||
.repfile_name,
|
.repfile_name,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
: currentView.viewKey ==
|
: viewAllKey ==
|
||||||
"awaitingSubmissionDetails"
|
"awaitingSubmissionDetails"
|
||||||
? router.locale == "cy"
|
? router.locale == "cy"
|
||||||
? "/fymhorth/parhauigyflwyno"
|
? "/fymhorth/parhauigyflwyno"
|
||||||
@@ -191,7 +190,7 @@ const ViewAllResults = (props) => {
|
|||||||
"&inid=" +
|
"&inid=" +
|
||||||
resultsArr[key].incidentid +
|
resultsArr[key].incidentid +
|
||||||
"&key=" +
|
"&key=" +
|
||||||
currentView.viewKey
|
viewAllKey
|
||||||
: router.locale == "cy"
|
: router.locale == "cy"
|
||||||
? myportal == true
|
? myportal == true
|
||||||
? "/fymhorth/achos"
|
? "/fymhorth/achos"
|
||||||
@@ -200,12 +199,12 @@ const ViewAllResults = (props) => {
|
|||||||
? "/myportal/case/" +
|
? "/myportal/case/" +
|
||||||
resultsArr[key].ticketnumber +
|
resultsArr[key].ticketnumber +
|
||||||
"?key=" +
|
"?key=" +
|
||||||
currentView.viewKey
|
viewAllKey
|
||||||
: "/case/" +
|
: "/case/" +
|
||||||
resultsArr[key].ticketnumber
|
resultsArr[key].ticketnumber
|
||||||
}
|
}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
currentView.viewKey == "watchedCases" &&
|
viewAllKey == "watchedCases" &&
|
||||||
setSearchResults(
|
setSearchResults(
|
||||||
props.watchedCases.watchedCases
|
props.watchedCases.watchedCases
|
||||||
),
|
),
|
||||||
@@ -218,9 +217,8 @@ const ViewAllResults = (props) => {
|
|||||||
resultsArr[key]
|
resultsArr[key]
|
||||||
.ticketnumber,
|
.ticketnumber,
|
||||||
"currentReference":
|
"currentReference":
|
||||||
currentView.viewKey !=
|
viewAllKey != "watchedCases"
|
||||||
"watchedCases"
|
? viewAllKey ==
|
||||||
? currentView.viewKey ==
|
|
||||||
"myRepresentations"
|
"myRepresentations"
|
||||||
? resultsArr[key]
|
? resultsArr[key]
|
||||||
.caseRef
|
.caseRef
|
||||||
@@ -230,11 +228,9 @@ const ViewAllResults = (props) => {
|
|||||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
],
|
||||||
|
|
||||||
"currentType":
|
"currentType": viewAllKey,
|
||||||
currentView.viewKey,
|
|
||||||
"incidentid":
|
"incidentid":
|
||||||
currentView.viewKey !=
|
viewAllKey != "watchedCases"
|
||||||
"watchedCases"
|
|
||||||
? resultsArr[key]
|
? resultsArr[key]
|
||||||
.incidentid
|
.incidentid
|
||||||
: resultsArr[key][
|
: resultsArr[key][
|
||||||
@@ -245,14 +241,14 @@ const ViewAllResults = (props) => {
|
|||||||
resultsArr[key]
|
resultsArr[key]
|
||||||
.pinswg_appealcasetype,
|
.pinswg_appealcasetype,
|
||||||
"repDetails":
|
"repDetails":
|
||||||
currentView.viewKey ==
|
viewAllKey ==
|
||||||
"myRepresentations" &&
|
"myRepresentations" &&
|
||||||
resultsArr[key],
|
resultsArr[key],
|
||||||
}),
|
}),
|
||||||
setCurrentView({
|
setCurrentView({
|
||||||
"viewName":
|
"viewName":
|
||||||
currentView.viewName,
|
currentView.viewName,
|
||||||
"viewKey": currentView.viewKey,
|
"viewKey": viewAllKey,
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -262,9 +258,8 @@ const ViewAllResults = (props) => {
|
|||||||
)}
|
)}
|
||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
{currentView.viewKey != "watchedCases"
|
{viewAllKey != "watchedCases"
|
||||||
? currentView.viewKey ==
|
? viewAllKey == "myRepresentations"
|
||||||
"myRepresentations"
|
|
||||||
? resultsArr[key].caseRef
|
? resultsArr[key].caseRef
|
||||||
: resultsArr[key].ticketnumber
|
: resultsArr[key].ticketnumber
|
||||||
: resultsArr[key][
|
: resultsArr[key][
|
||||||
@@ -275,7 +270,7 @@ const ViewAllResults = (props) => {
|
|||||||
detailsObj={detailsObj}
|
detailsObj={detailsObj}
|
||||||
appealType={item.pinswg_appealcasetype}
|
appealType={item.pinswg_appealcasetype}
|
||||||
/>
|
/>
|
||||||
{currentView.viewKey == "myRepresentations" && (
|
{viewAllKey == "myRepresentations" && (
|
||||||
<>
|
<>
|
||||||
<br />
|
<br />
|
||||||
<span>
|
<span>
|
||||||
@@ -291,14 +286,14 @@ const ViewAllResults = (props) => {
|
|||||||
{t("search:searchresults-site-address-label")}:
|
{t("search:searchresults-site-address-label")}:
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
{viewAllKey == "awaitingSubmissionDetails" &&
|
||||||
_.has(searchDetailsObj[key], "pinswg_siteaddressline1")
|
_.has(searchDetailsObj[key], "pinswg_siteaddressline1")
|
||||||
? searchDetailsObj[key].pinswg_siteaddressline1
|
? searchDetailsObj[key].pinswg_siteaddressline1
|
||||||
: ""}
|
: ""}
|
||||||
{_.has(detailsObj, "pinswg_siteaddressline1")
|
{_.has(detailsObj, "pinswg_siteaddressline1")
|
||||||
? detailsObj.pinswg_siteaddressline1
|
? detailsObj.pinswg_siteaddressline1
|
||||||
: ""}
|
: ""}
|
||||||
{currentView.viewKey == "myRepresentations" &&
|
{viewAllKey == "myRepresentations" &&
|
||||||
_.has(searchDetailsObj[key].pinswg_siteaddressline1)
|
_.has(searchDetailsObj[key].pinswg_siteaddressline1)
|
||||||
? searchDetailsObj[key].value[0]
|
? searchDetailsObj[key].value[0]
|
||||||
.pinswg_siteaddressline1
|
.pinswg_siteaddressline1
|
||||||
@@ -306,14 +301,14 @@ const ViewAllResults = (props) => {
|
|||||||
{_.has(detailsObj, "pinswg_siteaddressline1")
|
{_.has(detailsObj, "pinswg_siteaddressline1")
|
||||||
? detailsObj.pinswg_siteaddressline1
|
? detailsObj.pinswg_siteaddressline1
|
||||||
: ""}
|
: ""}
|
||||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
{viewAllKey == "awaitingSubmissionDetails" &&
|
||||||
_.has(
|
_.has(
|
||||||
searchDetailsObj[key],
|
searchDetailsObj[key],
|
||||||
"pinswg_siteaddressline1"
|
"pinswg_siteaddressline1"
|
||||||
) &&
|
) &&
|
||||||
searchDetailsObj[key].pinswg_siteaddressline1 !=
|
searchDetailsObj[key].pinswg_siteaddressline1 !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{currentView.viewKey == "myRepresentations" &&
|
{viewAllKey == "myRepresentations" &&
|
||||||
_.has(
|
_.has(
|
||||||
searchDetailsObj[key].pinswg_siteaddressline1
|
searchDetailsObj[key].pinswg_siteaddressline1
|
||||||
) &&
|
) &&
|
||||||
@@ -323,25 +318,25 @@ const ViewAllResults = (props) => {
|
|||||||
detailsObj.pinswg_siteaddressline1 != null && (
|
detailsObj.pinswg_siteaddressline1 != null && (
|
||||||
<br />
|
<br />
|
||||||
)}
|
)}
|
||||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
{viewAllKey == "awaitingSubmissionDetails" &&
|
||||||
_.has(searchDetailsObj[key], "pinswg_siteaddressline1")
|
_.has(searchDetailsObj[key], "pinswg_siteaddressline1")
|
||||||
? searchDetailsObj[key].pinswg_siteaddressline2
|
? searchDetailsObj[key].pinswg_siteaddressline2
|
||||||
: ""}
|
: ""}
|
||||||
{currentView.viewKey == "myRepresentations" &&
|
{viewAllKey == "myRepresentations" &&
|
||||||
_.has(searchDetailsObj[key].pinswg_siteaddressline1)
|
_.has(searchDetailsObj[key].pinswg_siteaddressline1)
|
||||||
? searchDetailsObj[key].pinswg_siteaddressline2
|
? searchDetailsObj[key].pinswg_siteaddressline2
|
||||||
: ""}
|
: ""}
|
||||||
{_.has(detailsObj, "pinswg_siteaddressline1")
|
{_.has(detailsObj, "pinswg_siteaddressline1")
|
||||||
? detailsObj.pinswg_siteaddressline2
|
? detailsObj.pinswg_siteaddressline2
|
||||||
: ""}
|
: ""}
|
||||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
{viewAllKey == "awaitingSubmissionDetails" &&
|
||||||
_.has(
|
_.has(
|
||||||
searchDetailsObj[key],
|
searchDetailsObj[key],
|
||||||
"pinswg_siteaddressline2"
|
"pinswg_siteaddressline2"
|
||||||
) &&
|
) &&
|
||||||
searchDetailsObj[key].pinswg_siteaddressline2 !=
|
searchDetailsObj[key].pinswg_siteaddressline2 !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{currentView.viewKey == "myRepresentations" &&
|
{viewAllKey == "myRepresentations" &&
|
||||||
_.has(
|
_.has(
|
||||||
searchDetailsObj[key].pinswg_siteaddressline2
|
searchDetailsObj[key].pinswg_siteaddressline2
|
||||||
) &&
|
) &&
|
||||||
@@ -351,25 +346,25 @@ const ViewAllResults = (props) => {
|
|||||||
detailsObj.pinswg_siteaddressline2 != null && (
|
detailsObj.pinswg_siteaddressline2 != null && (
|
||||||
<br />
|
<br />
|
||||||
)}
|
)}
|
||||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
{viewAllKey == "awaitingSubmissionDetails" &&
|
||||||
_.has(searchDetailsObj[key], "pinswg_siteaddresstown")
|
_.has(searchDetailsObj[key], "pinswg_siteaddresstown")
|
||||||
? searchDetailsObj[key].pinswg_siteaddresstown
|
? searchDetailsObj[key].pinswg_siteaddresstown
|
||||||
: ""}
|
: ""}
|
||||||
{currentView.viewKey == "myRepresentations" &&
|
{viewAllKey == "myRepresentations" &&
|
||||||
_.has(searchDetailsObj[key], "pinswg_siteaddresstown")
|
_.has(searchDetailsObj[key], "pinswg_siteaddresstown")
|
||||||
? searchDetailsObj[key].pinswg_siteaddresstown
|
? searchDetailsObj[key].pinswg_siteaddresstown
|
||||||
: ""}
|
: ""}
|
||||||
{_.has(detailsObj, "pinswg_siteaddresstown")
|
{_.has(detailsObj, "pinswg_siteaddresstown")
|
||||||
? detailsObj.pinswg_siteaddresstown
|
? detailsObj.pinswg_siteaddresstown
|
||||||
: ""}
|
: ""}
|
||||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
{viewAllKey == "awaitingSubmissionDetails" &&
|
||||||
_.has(
|
_.has(
|
||||||
searchDetailsObj[key],
|
searchDetailsObj[key],
|
||||||
"pinswg_siteaddresstown"
|
"pinswg_siteaddresstown"
|
||||||
) &&
|
) &&
|
||||||
searchDetailsObj[key].pinswg_siteaddresstown !=
|
searchDetailsObj[key].pinswg_siteaddresstown !=
|
||||||
null && <br />}
|
null && <br />}
|
||||||
{currentView.viewKey == "myRepresentations" &&
|
{viewAllKey == "myRepresentations" &&
|
||||||
_.has(
|
_.has(
|
||||||
searchDetailsObj[key],
|
searchDetailsObj[key],
|
||||||
"pinswg_siteaddresstown"
|
"pinswg_siteaddresstown"
|
||||||
@@ -378,18 +373,18 @@ const ViewAllResults = (props) => {
|
|||||||
null && <br />}
|
null && <br />}
|
||||||
{_.has(detailsObj, "pinswg_siteaddresstown") &&
|
{_.has(detailsObj, "pinswg_siteaddresstown") &&
|
||||||
detailsObj.pinswg_siteaddresstown != null && <br />}
|
detailsObj.pinswg_siteaddresstown != null && <br />}
|
||||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
{viewAllKey == "awaitingSubmissionDetails" &&
|
||||||
_.has(searchDetailsObj[key], "pinswg_siteaddresscounty")
|
_.has(searchDetailsObj[key], "pinswg_siteaddresscounty")
|
||||||
? searchDetailsObj[key].pinswg_siteaddresscounty
|
? searchDetailsObj[key].pinswg_siteaddresscounty
|
||||||
: ""}
|
: ""}
|
||||||
{currentView.viewKey == "myRepresentations" &&
|
{viewAllKey == "myRepresentations" &&
|
||||||
_.has(searchDetailsObj[key], "pinswg_siteaddresscounty")
|
_.has(searchDetailsObj[key], "pinswg_siteaddresscounty")
|
||||||
? searchDetailsObj[key].pinswg_siteaddresscounty
|
? searchDetailsObj[key].pinswg_siteaddresscounty
|
||||||
: ""}
|
: ""}
|
||||||
{_.has(detailsObj, "pinswg_siteaddresscounty")
|
{_.has(detailsObj, "pinswg_siteaddresscounty")
|
||||||
? detailsObj.pinswg_siteaddresscounty
|
? detailsObj.pinswg_siteaddresscounty
|
||||||
: ""}
|
: ""}
|
||||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
{viewAllKey == "awaitingSubmissionDetails" &&
|
||||||
_.has(
|
_.has(
|
||||||
searchDetailsObj[key],
|
searchDetailsObj[key],
|
||||||
"pinswg_siteaddresscounty"
|
"pinswg_siteaddresscounty"
|
||||||
@@ -400,7 +395,7 @@ const ViewAllResults = (props) => {
|
|||||||
detailsObj.pinswg_siteaddresscounty != null && (
|
detailsObj.pinswg_siteaddresscounty != null && (
|
||||||
<br />
|
<br />
|
||||||
)}
|
)}
|
||||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
{viewAllKey == "awaitingSubmissionDetails" &&
|
||||||
_.has(
|
_.has(
|
||||||
searchDetailsObj[key],
|
searchDetailsObj[key],
|
||||||
"pinswg_siteaddresspostcode"
|
"pinswg_siteaddresspostcode"
|
||||||
@@ -426,10 +421,9 @@ const ViewAllResults = (props) => {
|
|||||||
"pinswg_siteaddresspostcode",
|
"pinswg_siteaddresspostcode",
|
||||||
].map((field, idx) => {
|
].map((field, idx) => {
|
||||||
const isAwaitingSubmission =
|
const isAwaitingSubmission =
|
||||||
currentView.viewKey ===
|
viewAllKey === "awaitingSubmissionDetails";
|
||||||
"awaitingSubmissionDetails";
|
|
||||||
const isMyRepresentations =
|
const isMyRepresentations =
|
||||||
currentView.viewKey === "myRepresentations";
|
viewAllKey === "myRepresentations";
|
||||||
const searchValue = _.get(
|
const searchValue = _.get(
|
||||||
searchDetailsObj,
|
searchDetailsObj,
|
||||||
`${key}.${field}`
|
`${key}.${field}`
|
||||||
@@ -457,11 +451,11 @@ const ViewAllResults = (props) => {
|
|||||||
|
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
<span className="results-visually-hidden">
|
<span className="results-visually-hidden">
|
||||||
{currentView.viewKey == "awaitingSubmissionDetails"
|
{viewAllKey == "awaitingSubmissionDetails"
|
||||||
? t("search:searchresults-created-on-label")
|
? t("search:searchresults-created-on-label")
|
||||||
: t("search:searchresults-applicant-label")}
|
: t("search:searchresults-applicant-label")}
|
||||||
</span>
|
</span>
|
||||||
{currentView.viewKey == "awaitingSubmissionDetails"
|
{viewAllKey == "awaitingSubmissionDetails"
|
||||||
? formatDates(item.createdon)
|
? formatDates(item.createdon)
|
||||||
: _.has(detailsObj, [
|
: _.has(detailsObj, [
|
||||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue",
|
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue",
|
||||||
@@ -469,7 +463,7 @@ const ViewAllResults = (props) => {
|
|||||||
? detailsObj[
|
? detailsObj[
|
||||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||||
]
|
]
|
||||||
: currentView.viewKey == "myRepresentations"
|
: viewAllKey == "myRepresentations"
|
||||||
? searchDetailsObj[key][
|
? searchDetailsObj[key][
|
||||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||||
]
|
]
|
||||||
@@ -481,7 +475,7 @@ const ViewAllResults = (props) => {
|
|||||||
<span className="results-visually-hidden">
|
<span className="results-visually-hidden">
|
||||||
{t("search:searchresults-authority-label")}:
|
{t("search:searchresults-authority-label")}:
|
||||||
</span>
|
</span>
|
||||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
{viewAllKey == "awaitingSubmissionDetails" &&
|
||||||
_.has(resultsArr[key], "pinswg_lpaname")
|
_.has(resultsArr[key], "pinswg_lpaname")
|
||||||
? router.locale == "cy"
|
? router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
@@ -526,7 +520,7 @@ const ViewAllResults = (props) => {
|
|||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true,
|
eval: true,
|
||||||
})
|
})
|
||||||
: currentView.viewKey == "myRepresentations"
|
: viewAllKey == "myRepresentations"
|
||||||
? searchDetailsObj[key].value
|
? searchDetailsObj[key].value
|
||||||
: searchDetailsObj[key].value[0][
|
: searchDetailsObj[key].value[0][
|
||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -549,10 +543,10 @@ const ViewAllResults = (props) => {
|
|||||||
: resultsArr[key][
|
: resultsArr[key][
|
||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
(currentView.viewKey == "myRepresentations"
|
(viewAllKey == "myRepresentations"
|
||||||
? ""
|
? ""
|
||||||
: "N/A")
|
: "N/A")
|
||||||
: currentView.viewKey == "myRepresentations" &&
|
: viewAllKey == "myRepresentations" &&
|
||||||
router.locale == "cy" &&
|
router.locale == "cy" &&
|
||||||
jsonpath({
|
jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -570,7 +564,7 @@ const ViewAllResults = (props) => {
|
|||||||
{t("search:searchresults-case-type-label")}:
|
{t("search:searchresults-case-type-label")}:
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{currentView.viewKey == "awaitingSubmissionDetails"
|
{viewAllKey == "awaitingSubmissionDetails"
|
||||||
? router.locale == "cy"
|
? router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -599,11 +593,9 @@ const ViewAllResults = (props) => {
|
|||||||
: item[
|
: item[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
(currentView.viewKey == "myRepresentations"
|
(viewAllKey == "myRepresentations" ? "" : "N/A")}
|
||||||
? ""
|
|
||||||
: "N/A")}
|
|
||||||
|
|
||||||
{currentView.viewKey == "myRepresentations" &&
|
{viewAllKey == "myRepresentations" &&
|
||||||
(router.locale == "cy"
|
(router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -625,13 +617,13 @@ const ViewAllResults = (props) => {
|
|||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
<span className="results-visually-hidden">
|
<span className="results-visually-hidden">
|
||||||
{currentView.viewKey == "myRepresentations"
|
{viewAllKey == "myRepresentations"
|
||||||
? "Created"
|
? "Created"
|
||||||
: t("search:searchresults-status-label")}
|
: t("search:searchresults-status-label")}
|
||||||
:
|
:
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{currentView.viewKey == "awaitingSubmissionDetails"
|
{viewAllKey == "awaitingSubmissionDetails"
|
||||||
? router.locale == "cy"
|
? router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -649,7 +641,7 @@ const ViewAllResults = (props) => {
|
|||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true,
|
eval: true,
|
||||||
}) || "N/A"
|
}) || "N/A"
|
||||||
: currentView.viewKey == "myRepresentations"
|
: viewAllKey == "myRepresentations"
|
||||||
? repRaisedDate(item.repfile_name) // ? router.locale == "cy"
|
? repRaisedDate(item.repfile_name) // ? router.locale == "cy"
|
||||||
: // ? jsonpath({path:
|
: // ? jsonpath({path:
|
||||||
//
|
//
|
||||||
@@ -687,7 +679,7 @@ const ViewAllResults = (props) => {
|
|||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] || "N/A"}
|
] || "N/A"}
|
||||||
</dd>
|
</dd>
|
||||||
{currentView.viewKey == "awaitingSubmissionDetails" && (
|
{viewAllKey == "awaitingSubmissionDetails" && (
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16 cardModuleItem ">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16 cardModuleItem ">
|
||||||
<button
|
<button
|
||||||
title={t(
|
title={t(
|
||||||
@@ -715,7 +707,7 @@ const ViewAllResults = (props) => {
|
|||||||
</button>
|
</button>
|
||||||
</dd>
|
</dd>
|
||||||
)}
|
)}
|
||||||
{currentView.viewKey == "myRepresentations" && (
|
{viewAllKey == "myRepresentations" && (
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16 cardModuleItem ">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16 cardModuleItem ">
|
||||||
<button
|
<button
|
||||||
title={t(
|
title={t(
|
||||||
@@ -745,7 +737,7 @@ const ViewAllResults = (props) => {
|
|||||||
</dd>
|
</dd>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{currentView.viewKey == "watchedCases" && (
|
{viewAllKey == "watchedCases" && (
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16 cardModuleItem ">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16 cardModuleItem ">
|
||||||
<button
|
<button
|
||||||
title={t(
|
title={t(
|
||||||
@@ -897,15 +889,15 @@ const ViewAllResults = (props) => {
|
|||||||
<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">
|
||||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
{viewAllKey == "awaitingSubmissionDetails" &&
|
||||||
t("myportal:awatitingsubmission-card-title")}
|
t("myportal:awatitingsubmission-card-title")}
|
||||||
{currentView.viewKey == "watchedCases" &&
|
{viewAllKey == "watchedCases" &&
|
||||||
t("myportal:watchedcases-card-title")}
|
t("myportal:watchedcases-card-title")}
|
||||||
{currentView.viewKey == "myCases" &&
|
{viewAllKey == "myCases" &&
|
||||||
t("myportal:mycases-card-title")}
|
t("myportal:mycases-card-title")}
|
||||||
{currentView.viewKey == "myRepresentations" &&
|
{viewAllKey == "myRepresentations" &&
|
||||||
t("myportal:myrepresentations-card-title")}
|
t("myportal:myrepresentations-card-title")}
|
||||||
{currentView.viewKey == "mySubmittedReps" &&
|
{viewAllKey == "mySubmittedReps" &&
|
||||||
"Submitted representations"}
|
"Submitted representations"}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
@@ -913,14 +905,13 @@ const ViewAllResults = (props) => {
|
|||||||
<h3>
|
<h3>
|
||||||
{" "}
|
{" "}
|
||||||
There are no{" "}
|
There are no{" "}
|
||||||
{currentView.viewKey ==
|
{viewAllKey == "awaitingSubmissionDetails" &&
|
||||||
"awaitingSubmissionDetails" &&
|
|
||||||
t("myportal:awatitingsubmission-card-title")}
|
t("myportal:awatitingsubmission-card-title")}
|
||||||
{currentView.viewKey == "watchedCases" &&
|
{viewAllKey == "watchedCases" &&
|
||||||
t("myportal:watchedcases-card-title")}
|
t("myportal:watchedcases-card-title")}
|
||||||
{currentView.viewKey == "myCases" &&
|
{viewAllKey == "myCases" &&
|
||||||
t("myportal:mycases-card-title")}
|
t("myportal:mycases-card-title")}
|
||||||
{currentView.viewKey == "myRepresentations" &&
|
{viewAllKey == "myRepresentations" &&
|
||||||
t("myportal:myrepresentations-card-title")}{" "}
|
t("myportal:myrepresentations-card-title")}{" "}
|
||||||
records
|
records
|
||||||
</h3>
|
</h3>
|
||||||
@@ -932,7 +923,7 @@ const ViewAllResults = (props) => {
|
|||||||
type="button"
|
type="button"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
sortDataBy(
|
sortDataBy(
|
||||||
currentView.viewKey ==
|
viewAllKey ==
|
||||||
"awaitingSubmissionDetails"
|
"awaitingSubmissionDetails"
|
||||||
? "title"
|
? "title"
|
||||||
: "pinswg_title"
|
: "pinswg_title"
|
||||||
@@ -940,7 +931,7 @@ const ViewAllResults = (props) => {
|
|||||||
}
|
}
|
||||||
className={
|
className={
|
||||||
orderByState ==
|
orderByState ==
|
||||||
(currentView.viewKey ==
|
(viewAllKey ==
|
||||||
"awaitingSubmissionDetails"
|
"awaitingSubmissionDetails"
|
||||||
? "title"
|
? "title"
|
||||||
: "pinswg_title")
|
: "pinswg_title")
|
||||||
@@ -960,8 +951,7 @@ const ViewAllResults = (props) => {
|
|||||||
"search:searchresults-site-address-label"
|
"search:searchresults-site-address-label"
|
||||||
)}
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
{currentView.viewKey ==
|
{viewAllKey == "awaitingSubmissionDetails" ? (
|
||||||
"awaitingSubmissionDetails" ? (
|
|
||||||
<dd className="govuk-summary-list__key govuk-!-font-size-16">
|
<dd className="govuk-summary-list__key govuk-!-font-size-16">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@@ -993,7 +983,7 @@ const ViewAllResults = (props) => {
|
|||||||
type="button"
|
type="button"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
sortDataBy(
|
sortDataBy(
|
||||||
currentView.viewKey ==
|
viewAllKey ==
|
||||||
"awaitingSubmissionDetails"
|
"awaitingSubmissionDetails"
|
||||||
? "pinswg_lpaname"
|
? "pinswg_lpaname"
|
||||||
: "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
: "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -1001,7 +991,7 @@ const ViewAllResults = (props) => {
|
|||||||
}
|
}
|
||||||
className={
|
className={
|
||||||
orderByState ==
|
orderByState ==
|
||||||
(currentView.viewKey ==
|
(viewAllKey ==
|
||||||
"awaitingSubmissionDetails"
|
"awaitingSubmissionDetails"
|
||||||
? "pinswg_lpaname"
|
? "pinswg_lpaname"
|
||||||
: "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue")
|
: "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue")
|
||||||
@@ -1017,7 +1007,7 @@ const ViewAllResults = (props) => {
|
|||||||
</button>
|
</button>
|
||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__key govuk-!-font-size-16">
|
<dd className="govuk-summary-list__key govuk-!-font-size-16">
|
||||||
{currentView.viewKey !=
|
{viewAllKey !=
|
||||||
"awaitingSubmissionDetails" ? (
|
"awaitingSubmissionDetails" ? (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@@ -1028,7 +1018,7 @@ const ViewAllResults = (props) => {
|
|||||||
}
|
}
|
||||||
className={
|
className={
|
||||||
orderByState ==
|
orderByState ==
|
||||||
(currentView.viewKey ==
|
(viewAllKey ==
|
||||||
"awaitingSubmissionDetails"
|
"awaitingSubmissionDetails"
|
||||||
? "pinswg_lpaname"
|
? "pinswg_lpaname"
|
||||||
: "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue")
|
: "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue")
|
||||||
@@ -1049,8 +1039,7 @@ const ViewAllResults = (props) => {
|
|||||||
)}{" "}
|
)}{" "}
|
||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__key govuk-!-font-size-16">
|
<dd className="govuk-summary-list__key govuk-!-font-size-16">
|
||||||
{currentView.viewKey ==
|
{viewAllKey == "myRepresentations" ? (
|
||||||
"myRepresentations" ? (
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
|
|||||||
@@ -40,11 +40,12 @@ const WatchedCases = (props) => {
|
|||||||
<div className="cardVieAll">
|
<div className="cardVieAll">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale != "en"
|
(router.locale != "en"
|
||||||
? "/" +
|
? "/" +
|
||||||
router.locale +
|
router.locale +
|
||||||
"/fymhorth/gweldpopeth"
|
"/fymhorth/gweldpopeth"
|
||||||
: "/myportal/viewall"
|
: "/myportal/viewall") +
|
||||||
|
"?viewKey=watchedCases"
|
||||||
}
|
}
|
||||||
className="govuk-link--no-underline"
|
className="govuk-link--no-underline"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@@ -104,13 +104,18 @@ const CaseHome = (props) => {
|
|||||||
props.awaitingSubmission.awaitingSubmission
|
props.awaitingSubmission.awaitingSubmission
|
||||||
}
|
}
|
||||||
caseReference={
|
caseReference={
|
||||||
props.currentView.caseReference.currentReference
|
props.searchResultsObj.searchResultsObj.value[0]
|
||||||
|
.ticketnumber
|
||||||
}
|
}
|
||||||
currentType={props.currentType}
|
currentType={props.currentType}
|
||||||
appealTypeID={
|
appealTypeID={
|
||||||
props.currentView.caseReference.appealType
|
props.searchResultsObj.searchResultsObj.value[0]
|
||||||
|
.pinswg_appealcasetype
|
||||||
|
}
|
||||||
|
incidentid={
|
||||||
|
props.searchResultsObj.searchResultsObj.value[0]
|
||||||
|
.incidentid
|
||||||
}
|
}
|
||||||
incidentid={props.currentView.caseReference.incidentid}
|
|
||||||
representationsObj={
|
representationsObj={
|
||||||
props.searchResultsObj.representationsObj
|
props.searchResultsObj.representationsObj
|
||||||
}
|
}
|
||||||
@@ -182,6 +187,15 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
? query.ticketnumber
|
? query.ticketnumber
|
||||||
: query.ticketnumber.split("-").join(" ");
|
: query.ticketnumber.split("-").join(" ");
|
||||||
|
|
||||||
|
const pattern = /CAS-\d{5}-[A-Z0-9]{6}/;
|
||||||
|
const match = query.ticketnumber.match(pattern);
|
||||||
|
|
||||||
|
if (match) {
|
||||||
|
console.log("Match found!", match[0]);
|
||||||
|
} else {
|
||||||
|
console.log("No match.");
|
||||||
|
}
|
||||||
|
|
||||||
const searchResultsObj = await getBasicSearch(developmentQuery);
|
const searchResultsObj = await getBasicSearch(developmentQuery);
|
||||||
const searchDetailsObj = await getSearchDetails(searchResultsObj);
|
const searchDetailsObj = await getSearchDetails(searchResultsObj);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user