added in a key to be used when right clicked on link
This commit is contained in:
@@ -37,8 +37,8 @@ const AwaitingSubmission = (props) => {
|
||||
router.locale != "en"
|
||||
? "/" +
|
||||
router.locale +
|
||||
"/fymhorth/gweldpopeth"
|
||||
: "/myportal/viewall"
|
||||
"/fymhorth/gweldpopeth?key=awaitingSubmission"
|
||||
: "/myportal/viewall?key=awaitingSubmission"
|
||||
}
|
||||
className="govuk-link--no-underline"
|
||||
onClick={() => {
|
||||
|
||||
@@ -354,8 +354,8 @@ const AwaitingSubmissionFromBlob = (props) => {
|
||||
router.locale != "en"
|
||||
? "/" +
|
||||
router.locale +
|
||||
"/fymhorth/gweldpopeth"
|
||||
: "/myportal/viewall"
|
||||
"/fymhorth/gweldpopeth?key=awaitingSubmissionDetails"
|
||||
: "/myportal/viewall?key=awaitingSubmissionDetails"
|
||||
}
|
||||
className="govuk-link--no-underline"
|
||||
onClick={() => {
|
||||
|
||||
@@ -32,8 +32,8 @@ const MyCases = (props) => {
|
||||
router.locale != "en"
|
||||
? "/" +
|
||||
router.locale +
|
||||
"/fymhorth/gweldpopeth"
|
||||
: "/myportal/viewall"
|
||||
"/fymhorth/gweldpopeth?key=myCases"
|
||||
: "/myportal/viewall?key=myCases"
|
||||
}
|
||||
className="govuk-link--no-underline"
|
||||
onClick={() => {
|
||||
|
||||
@@ -37,8 +37,8 @@ const MyRepresentations = (props) => {
|
||||
router.locale != "en"
|
||||
? "/" +
|
||||
router.locale +
|
||||
"/fymhorth/gweldpopeth"
|
||||
: "/myportal/viewall"
|
||||
"/fymhorth/gweldpopeth?key=myRepresentations"
|
||||
: "/myportal/viewall?key=myRepresentations"
|
||||
}
|
||||
className="govuk-link--no-underline"
|
||||
onClick={() => {
|
||||
|
||||
@@ -36,8 +36,8 @@ const MyRepresentations = (props) => {
|
||||
router.locale != "en"
|
||||
? "/" +
|
||||
router.locale +
|
||||
"/fymhorth/gweldpopeth"
|
||||
: "/myportal/viewall"
|
||||
"/fymhorth/gweldpopeth?key=myRepresentations"
|
||||
: "/myportal/viewall?key=myRepresentations"
|
||||
}
|
||||
className="govuk-link--no-underline"
|
||||
onClick={() => {
|
||||
|
||||
@@ -43,8 +43,8 @@ const MySubmittedReps = (props) => {
|
||||
router.locale != "en"
|
||||
? "/" +
|
||||
router.locale +
|
||||
"/fymhorth/gweldpopeth"
|
||||
: "/myportal/viewall"
|
||||
"/fymhorth/gweldpopeth?key=mySubmittedReps"
|
||||
: "/myportal/viewall?key=mySubmittedReps"
|
||||
}
|
||||
className="govuk-link--no-underline"
|
||||
onClick={() => {
|
||||
|
||||
@@ -76,19 +76,23 @@ const ViewAllResults = (props) => {
|
||||
return dateObj.toLocaleString();
|
||||
};
|
||||
|
||||
let currentView = props.currentView.currentView;
|
||||
//console.log("currentView.viewKey:", typeof currentView.viewKey);
|
||||
let viewKeyFromUrl = router.query.key;
|
||||
|
||||
// typeof currentView.viewKey == "undefined"
|
||||
let currentView = props.currentView.currentView;
|
||||
//console.log("currentViewKey:", typeof currentViewKey);
|
||||
|
||||
// typeof currentViewKey == "undefined"
|
||||
// ? console.log("no currentview")
|
||||
// : console.log("has currentview");
|
||||
|
||||
let currentViewKey = currentView.viewKey || viewKeyFromUrl;
|
||||
|
||||
var resultsArr =
|
||||
currentView.viewKey == "awaitingSubmissionDetails"
|
||||
currentViewKey == "awaitingSubmissionDetails"
|
||||
? props["awaitingSubmission"].awaitingSubmissionDetails.case
|
||||
: currentView.viewKey == "mySubmittedReps"
|
||||
? props[currentView.viewKey][currentView.viewKey]
|
||||
: props[currentView.viewKey][currentView.viewKey].value || [];
|
||||
: currentViewKey == "mySubmittedReps"
|
||||
? props[currentViewKey][currentViewKey]
|
||||
: props[currentViewKey][currentViewKey].value || [];
|
||||
|
||||
const [orderByState, setOrderbyState] = useState("createdon");
|
||||
const [fieldSortState, setfieldSortState] = useState("asc");
|
||||
@@ -105,11 +109,11 @@ const ViewAllResults = (props) => {
|
||||
}
|
||||
|
||||
var searchDetailsObj =
|
||||
currentView.viewKey == "awaitingSubmissionDetails"
|
||||
currentViewKey == "awaitingSubmissionDetails"
|
||||
? props["awaitingSubmission"].awaitingSubmissionDetails.value
|
||||
: currentView.viewKey == "myRepresentations"
|
||||
: currentViewKey == "myRepresentations"
|
||||
? props["myRepresentations"].myRepresentations.value
|
||||
: props[currentView.viewKey][currentView.viewKey + "Details"] || [];
|
||||
: props[currentViewKey][currentViewKey + "Details"] || [];
|
||||
|
||||
let resultsRowArr = [];
|
||||
const buildResultsRowArr = () => {
|
||||
@@ -117,15 +121,13 @@ const ViewAllResults = (props) => {
|
||||
let detailsObj = jsonpath({
|
||||
path:
|
||||
"$" +
|
||||
(currentView.viewKey == "myRepresentations"
|
||||
? ""
|
||||
: "..value") +
|
||||
(currentViewKey == "myRepresentations" ? "" : "..value") +
|
||||
'[?(@ && @.pinswg_name=="' +
|
||||
(currentView.viewKey == "awaitingSubmissionDetails"
|
||||
(currentViewKey == "awaitingSubmissionDetails"
|
||||
? item.title
|
||||
: currentView.viewKey == "watchedCases"
|
||||
: currentViewKey == "watchedCases"
|
||||
? item.ticketnumber
|
||||
: currentView.viewKey == "myRepresentations"
|
||||
: currentViewKey == "myRepresentations"
|
||||
? item.pinswg_name
|
||||
: item.pinswg_title) +
|
||||
'")]',
|
||||
@@ -137,7 +139,7 @@ const ViewAllResults = (props) => {
|
||||
//console.log(searchDetailsObj[key]);
|
||||
|
||||
// searchDetailsObj[key] =
|
||||
// currentView.viewKey == "myRepresentations"
|
||||
// currentViewKey == "myRepresentations"
|
||||
// ? searchDetailsObj[key].value[0]
|
||||
// : searchDetailsObj[key];
|
||||
|
||||
@@ -145,7 +147,7 @@ const ViewAllResults = (props) => {
|
||||
resultsRowArr.push(
|
||||
<div className="govuk-summary-list__row" key={key}>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16 govuk-!-padding-left-2">
|
||||
{currentView.viewKey == "myCases" &&
|
||||
{currentViewKey == "myCases" &&
|
||||
resultsArr[key].pinswg_publishtoweb === false ? (
|
||||
<div className="cardModuleReference">
|
||||
{resultsArr[key].ticketnumber}{" "}
|
||||
@@ -155,8 +157,7 @@ const ViewAllResults = (props) => {
|
||||
<>
|
||||
<Link
|
||||
href={
|
||||
currentView.viewKey ==
|
||||
"myRepresentations"
|
||||
currentViewKey == "myRepresentations"
|
||||
? {
|
||||
pathname:
|
||||
"/myportal/representation",
|
||||
@@ -169,7 +170,7 @@ const ViewAllResults = (props) => {
|
||||
.repfile_name,
|
||||
},
|
||||
}
|
||||
: currentView.viewKey ==
|
||||
: currentViewKey ==
|
||||
"awaitingSubmissionDetails"
|
||||
? router.locale == "cy"
|
||||
? "/fymhorth/parhauigyflwyno"
|
||||
@@ -191,25 +192,25 @@ const ViewAllResults = (props) => {
|
||||
"&inid=" +
|
||||
resultsArr[key].incidentid +
|
||||
"&key=" +
|
||||
currentView.viewKey
|
||||
currentViewKey
|
||||
: router.locale == "cy"
|
||||
? myportal == true
|
||||
? "/fymhorth/achos" +
|
||||
resultsArr[key].ticketnumber +
|
||||
"?key=" +
|
||||
currentView.viewKey
|
||||
currentViewKey
|
||||
: "/achos" +
|
||||
resultsArr[key].ticketnumber
|
||||
: myportal == true
|
||||
? "/myportal/case/" +
|
||||
resultsArr[key].ticketnumber +
|
||||
"?key=" +
|
||||
currentView.viewKey
|
||||
currentViewKey
|
||||
: "/case/" +
|
||||
resultsArr[key].ticketnumber
|
||||
}
|
||||
onClick={() => {
|
||||
currentView.viewKey == "watchedCases" &&
|
||||
currentViewKey == "watchedCases" &&
|
||||
setSearchResults(
|
||||
props.watchedCases.watchedCases
|
||||
),
|
||||
@@ -222,9 +223,9 @@ const ViewAllResults = (props) => {
|
||||
resultsArr[key]
|
||||
.ticketnumber,
|
||||
"currentReference":
|
||||
currentView.viewKey !=
|
||||
currentViewKey !=
|
||||
"watchedCases"
|
||||
? currentView.viewKey ==
|
||||
? currentViewKey ==
|
||||
"myRepresentations"
|
||||
? resultsArr[key]
|
||||
.caseRef
|
||||
@@ -234,10 +235,9 @@ const ViewAllResults = (props) => {
|
||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
|
||||
"currentType":
|
||||
currentView.viewKey,
|
||||
"currentType": currentViewKey,
|
||||
"incidentid":
|
||||
currentView.viewKey !=
|
||||
currentViewKey !=
|
||||
"watchedCases"
|
||||
? resultsArr[key]
|
||||
.incidentid
|
||||
@@ -249,14 +249,14 @@ const ViewAllResults = (props) => {
|
||||
resultsArr[key]
|
||||
.pinswg_appealcasetype,
|
||||
"repDetails":
|
||||
currentView.viewKey ==
|
||||
currentViewKey ==
|
||||
"myRepresentations" &&
|
||||
resultsArr[key],
|
||||
}),
|
||||
setCurrentView({
|
||||
"viewName":
|
||||
currentView.viewName,
|
||||
"viewKey": currentView.viewKey,
|
||||
"viewKey": currentViewKey,
|
||||
});
|
||||
}}
|
||||
>
|
||||
@@ -266,11 +266,10 @@ const ViewAllResults = (props) => {
|
||||
)}
|
||||
:
|
||||
</span>
|
||||
{currentView.viewKey != "watchedCases"
|
||||
? currentView.viewKey ==
|
||||
"myRepresentations"
|
||||
{currentViewKey != "watchedCases"
|
||||
? currentViewKey == "myRepresentations"
|
||||
? resultsArr[key].caseRef
|
||||
: currentView.viewKey ==
|
||||
: currentViewKey ==
|
||||
"awaitingSubmissionDetails"
|
||||
? resultsArr[key].title
|
||||
: resultsArr[key].pinswg_title
|
||||
@@ -278,7 +277,7 @@ const ViewAllResults = (props) => {
|
||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||
]}
|
||||
</Link>
|
||||
{currentView.viewKey == "myRepresentations" && (
|
||||
{currentViewKey == "myRepresentations" && (
|
||||
<>
|
||||
<br />
|
||||
<span>
|
||||
@@ -296,14 +295,14 @@ const ViewAllResults = (props) => {
|
||||
{t("search:searchresults-site-address-label")}:
|
||||
</span>
|
||||
|
||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
||||
{currentViewKey == "awaitingSubmissionDetails" &&
|
||||
_.has(searchDetailsObj[key], "pinswg_siteaddressline1")
|
||||
? searchDetailsObj[key].pinswg_siteaddressline1
|
||||
: ""}
|
||||
{_.has(detailsObj, "pinswg_siteaddressline1")
|
||||
? detailsObj.pinswg_siteaddressline1
|
||||
: ""}
|
||||
{currentView.viewKey == "myRepresentations" &&
|
||||
{currentViewKey == "myRepresentations" &&
|
||||
_.has(searchDetailsObj[key].pinswg_siteaddressline1)
|
||||
? searchDetailsObj[key].value[0]
|
||||
.pinswg_siteaddressline1
|
||||
@@ -311,14 +310,14 @@ const ViewAllResults = (props) => {
|
||||
{_.has(detailsObj, "pinswg_siteaddressline1")
|
||||
? detailsObj.pinswg_siteaddressline1
|
||||
: ""}
|
||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
||||
{currentViewKey == "awaitingSubmissionDetails" &&
|
||||
_.has(
|
||||
searchDetailsObj[key],
|
||||
"pinswg_siteaddressline1"
|
||||
) &&
|
||||
searchDetailsObj[key].pinswg_siteaddressline1 !=
|
||||
null && <br />}
|
||||
{currentView.viewKey == "myRepresentations" &&
|
||||
{currentViewKey == "myRepresentations" &&
|
||||
_.has(
|
||||
searchDetailsObj[key].pinswg_siteaddressline1
|
||||
) &&
|
||||
@@ -328,25 +327,25 @@ const ViewAllResults = (props) => {
|
||||
detailsObj.pinswg_siteaddressline1 != null && (
|
||||
<br />
|
||||
)}
|
||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
||||
{currentViewKey == "awaitingSubmissionDetails" &&
|
||||
_.has(searchDetailsObj[key], "pinswg_siteaddressline1")
|
||||
? searchDetailsObj[key].pinswg_siteaddressline2
|
||||
: ""}
|
||||
{currentView.viewKey == "myRepresentations" &&
|
||||
{currentViewKey == "myRepresentations" &&
|
||||
_.has(searchDetailsObj[key].pinswg_siteaddressline1)
|
||||
? searchDetailsObj[key].pinswg_siteaddressline2
|
||||
: ""}
|
||||
{_.has(detailsObj, "pinswg_siteaddressline1")
|
||||
? detailsObj.pinswg_siteaddressline2
|
||||
: ""}
|
||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
||||
{currentViewKey == "awaitingSubmissionDetails" &&
|
||||
_.has(
|
||||
searchDetailsObj[key],
|
||||
"pinswg_siteaddressline2"
|
||||
) &&
|
||||
searchDetailsObj[key].pinswg_siteaddressline2 !=
|
||||
null && <br />}
|
||||
{currentView.viewKey == "myRepresentations" &&
|
||||
{currentViewKey == "myRepresentations" &&
|
||||
_.has(
|
||||
searchDetailsObj[key].pinswg_siteaddressline2
|
||||
) &&
|
||||
@@ -356,25 +355,25 @@ const ViewAllResults = (props) => {
|
||||
detailsObj.pinswg_siteaddressline2 != null && (
|
||||
<br />
|
||||
)}
|
||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
||||
{currentViewKey == "awaitingSubmissionDetails" &&
|
||||
_.has(searchDetailsObj[key], "pinswg_siteaddresstown")
|
||||
? searchDetailsObj[key].pinswg_siteaddresstown
|
||||
: ""}
|
||||
{currentView.viewKey == "myRepresentations" &&
|
||||
{currentViewKey == "myRepresentations" &&
|
||||
_.has(searchDetailsObj[key], "pinswg_siteaddresstown")
|
||||
? searchDetailsObj[key].pinswg_siteaddresstown
|
||||
: ""}
|
||||
{_.has(detailsObj, "pinswg_siteaddresstown")
|
||||
? detailsObj.pinswg_siteaddresstown
|
||||
: ""}
|
||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
||||
{currentViewKey == "awaitingSubmissionDetails" &&
|
||||
_.has(
|
||||
searchDetailsObj[key],
|
||||
"pinswg_siteaddresstown"
|
||||
) &&
|
||||
searchDetailsObj[key].pinswg_siteaddresstown !=
|
||||
null && <br />}
|
||||
{currentView.viewKey == "myRepresentations" &&
|
||||
{currentViewKey == "myRepresentations" &&
|
||||
_.has(
|
||||
searchDetailsObj[key],
|
||||
"pinswg_siteaddresstown"
|
||||
@@ -383,18 +382,18 @@ const ViewAllResults = (props) => {
|
||||
null && <br />}
|
||||
{_.has(detailsObj, "pinswg_siteaddresstown") &&
|
||||
detailsObj.pinswg_siteaddresstown != null && <br />}
|
||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
||||
{currentViewKey == "awaitingSubmissionDetails" &&
|
||||
_.has(searchDetailsObj[key], "pinswg_siteaddresscounty")
|
||||
? searchDetailsObj[key].pinswg_siteaddresscounty
|
||||
: ""}
|
||||
{currentView.viewKey == "myRepresentations" &&
|
||||
{currentViewKey == "myRepresentations" &&
|
||||
_.has(searchDetailsObj[key], "pinswg_siteaddresscounty")
|
||||
? searchDetailsObj[key].pinswg_siteaddresscounty
|
||||
: ""}
|
||||
{_.has(detailsObj, "pinswg_siteaddresscounty")
|
||||
? detailsObj.pinswg_siteaddresscounty
|
||||
: ""}
|
||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
||||
{currentViewKey == "awaitingSubmissionDetails" &&
|
||||
_.has(
|
||||
searchDetailsObj[key],
|
||||
"pinswg_siteaddresscounty"
|
||||
@@ -405,7 +404,7 @@ const ViewAllResults = (props) => {
|
||||
detailsObj.pinswg_siteaddresscounty != null && (
|
||||
<br />
|
||||
)}
|
||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
||||
{currentViewKey == "awaitingSubmissionDetails" &&
|
||||
_.has(
|
||||
searchDetailsObj[key],
|
||||
"pinswg_siteaddresspostcode"
|
||||
@@ -431,10 +430,9 @@ const ViewAllResults = (props) => {
|
||||
"pinswg_siteaddresspostcode",
|
||||
].map((field, idx) => {
|
||||
const isAwaitingSubmission =
|
||||
currentView.viewKey ===
|
||||
"awaitingSubmissionDetails";
|
||||
currentViewKey === "awaitingSubmissionDetails";
|
||||
const isMyRepresentations =
|
||||
currentView.viewKey === "myRepresentations";
|
||||
currentViewKey === "myRepresentations";
|
||||
const searchValue = _.get(
|
||||
searchDetailsObj,
|
||||
`${key}.${field}`
|
||||
@@ -462,11 +460,11 @@ const ViewAllResults = (props) => {
|
||||
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||
<span className="results-visually-hidden">
|
||||
{currentView.viewKey == "awaitingSubmissionDetails"
|
||||
{currentViewKey == "awaitingSubmissionDetails"
|
||||
? t("search:searchresults-created-on-label")
|
||||
: t("search:searchresults-applicant-label")}
|
||||
</span>
|
||||
{currentView.viewKey == "awaitingSubmissionDetails"
|
||||
{currentViewKey == "awaitingSubmissionDetails"
|
||||
? formatDates(item.createdon)
|
||||
: _.has(detailsObj, [
|
||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue",
|
||||
@@ -474,7 +472,7 @@ const ViewAllResults = (props) => {
|
||||
? detailsObj[
|
||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: currentView.viewKey == "myRepresentations"
|
||||
: currentViewKey == "myRepresentations"
|
||||
? searchDetailsObj[key][
|
||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
@@ -486,7 +484,7 @@ const ViewAllResults = (props) => {
|
||||
<span className="results-visually-hidden">
|
||||
{t("search:searchresults-authority-label")}:
|
||||
</span>
|
||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
||||
{currentViewKey == "awaitingSubmissionDetails" &&
|
||||
_.has(resultsArr[key], "pinswg_lpaname")
|
||||
? router.locale == "cy"
|
||||
? jsonpath({
|
||||
@@ -531,7 +529,7 @@ const ViewAllResults = (props) => {
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
})
|
||||
: currentView.viewKey == "myRepresentations"
|
||||
: currentViewKey == "myRepresentations"
|
||||
? searchDetailsObj[key].value
|
||||
: searchDetailsObj[key].value[0][
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
@@ -554,10 +552,10 @@ const ViewAllResults = (props) => {
|
||||
: resultsArr[key][
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
(currentView.viewKey == "myRepresentations"
|
||||
(currentViewKey == "myRepresentations"
|
||||
? ""
|
||||
: "N/A")
|
||||
: currentView.viewKey == "myRepresentations" &&
|
||||
: currentViewKey == "myRepresentations" &&
|
||||
router.locale == "cy" &&
|
||||
jsonpath({
|
||||
path:
|
||||
@@ -575,7 +573,7 @@ const ViewAllResults = (props) => {
|
||||
{t("search:searchresults-case-type-label")}:
|
||||
</span>
|
||||
|
||||
{currentView.viewKey == "awaitingSubmissionDetails"
|
||||
{currentViewKey == "awaitingSubmissionDetails"
|
||||
? router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
@@ -604,11 +602,11 @@ const ViewAllResults = (props) => {
|
||||
: item[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
(currentView.viewKey == "myRepresentations"
|
||||
(currentViewKey == "myRepresentations"
|
||||
? ""
|
||||
: "N/A")}
|
||||
|
||||
{currentView.viewKey == "myRepresentations" &&
|
||||
{currentViewKey == "myRepresentations" &&
|
||||
(router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
@@ -630,13 +628,13 @@ const ViewAllResults = (props) => {
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||
<span className="results-visually-hidden">
|
||||
{currentView.viewKey == "myRepresentations"
|
||||
{currentViewKey == "myRepresentations"
|
||||
? "Created"
|
||||
: t("search:searchresults-status-label")}
|
||||
:
|
||||
</span>
|
||||
|
||||
{currentView.viewKey == "awaitingSubmissionDetails"
|
||||
{currentViewKey == "awaitingSubmissionDetails"
|
||||
? router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
@@ -654,7 +652,7 @@ const ViewAllResults = (props) => {
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
}) || "N/A"
|
||||
: currentView.viewKey == "myRepresentations"
|
||||
: currentViewKey == "myRepresentations"
|
||||
? repRaisedDate(item.repfile_name) // ? router.locale == "cy"
|
||||
: // ? jsonpath({path:
|
||||
//
|
||||
@@ -692,7 +690,7 @@ const ViewAllResults = (props) => {
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] || "N/A"}
|
||||
</dd>
|
||||
{currentView.viewKey == "awaitingSubmissionDetails" && (
|
||||
{currentViewKey == "awaitingSubmissionDetails" && (
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16 ">
|
||||
<button
|
||||
title={t(
|
||||
@@ -720,7 +718,7 @@ const ViewAllResults = (props) => {
|
||||
</button>
|
||||
</dd>
|
||||
)}
|
||||
{currentView.viewKey == "myRepresentations" && (
|
||||
{currentViewKey == "myRepresentations" && (
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16 ">
|
||||
<button
|
||||
title={t(
|
||||
@@ -750,7 +748,7 @@ const ViewAllResults = (props) => {
|
||||
</dd>
|
||||
)}
|
||||
|
||||
{currentView.viewKey == "watchedCases" && (
|
||||
{currentViewKey == "watchedCases" && (
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16 ">
|
||||
<button
|
||||
title={t(
|
||||
@@ -924,15 +922,15 @@ const ViewAllResults = (props) => {
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
<h1 className="govuk-heading-xl govuk-!-margin-bottom-7">
|
||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
||||
{currentViewKey == "awaitingSubmissionDetails" &&
|
||||
t("myportal:awatitingsubmission-card-title")}
|
||||
{currentView.viewKey == "watchedCases" &&
|
||||
{currentViewKey == "watchedCases" &&
|
||||
t("myportal:watchedcases-card-title")}
|
||||
{currentView.viewKey == "myCases" &&
|
||||
{currentViewKey == "myCases" &&
|
||||
t("myportal:mycases-card-title")}
|
||||
{currentView.viewKey == "myRepresentations" &&
|
||||
{currentViewKey == "myRepresentations" &&
|
||||
t("myportal:myrepresentations-card-title")}
|
||||
{currentView.viewKey == "mySubmittedReps" &&
|
||||
{currentViewKey == "mySubmittedReps" &&
|
||||
"Submitted representations"}
|
||||
</h1>
|
||||
|
||||
@@ -940,14 +938,13 @@ const ViewAllResults = (props) => {
|
||||
<h3>
|
||||
{" "}
|
||||
There are no{" "}
|
||||
{currentView.viewKey ==
|
||||
"awaitingSubmissionDetails" &&
|
||||
{currentViewKey == "awaitingSubmissionDetails" &&
|
||||
t("myportal:awatitingsubmission-card-title")}
|
||||
{currentView.viewKey == "watchedCases" &&
|
||||
{currentViewKey == "watchedCases" &&
|
||||
t("myportal:watchedcases-card-title")}
|
||||
{currentView.viewKey == "myCases" &&
|
||||
{currentViewKey == "myCases" &&
|
||||
t("myportal:mycases-card-title")}
|
||||
{currentView.viewKey == "myRepresentations" &&
|
||||
{currentViewKey == "myRepresentations" &&
|
||||
t("myportal:myrepresentations-card-title")}{" "}
|
||||
records
|
||||
</h3>
|
||||
@@ -959,7 +956,7 @@ const ViewAllResults = (props) => {
|
||||
type="button"
|
||||
onClick={() =>
|
||||
sortDataBy(
|
||||
currentView.viewKey ==
|
||||
currentViewKey ==
|
||||
"awaitingSubmissionDetails"
|
||||
? "title"
|
||||
: "pinswg_title"
|
||||
@@ -967,7 +964,7 @@ const ViewAllResults = (props) => {
|
||||
}
|
||||
className={
|
||||
orderByState ==
|
||||
(currentView.viewKey ==
|
||||
(currentViewKey ==
|
||||
"awaitingSubmissionDetails"
|
||||
? "title"
|
||||
: "pinswg_title")
|
||||
@@ -987,7 +984,7 @@ const ViewAllResults = (props) => {
|
||||
"search:searchresults-site-address-label"
|
||||
)}
|
||||
</dd>
|
||||
{currentView.viewKey ==
|
||||
{currentViewKey ==
|
||||
"awaitingSubmissionDetails" ? (
|
||||
<dd className="govuk-summary-list__key govuk-!-font-size-16">
|
||||
<button
|
||||
@@ -1020,7 +1017,7 @@ const ViewAllResults = (props) => {
|
||||
type="button"
|
||||
onClick={() =>
|
||||
sortDataBy(
|
||||
currentView.viewKey ==
|
||||
currentViewKey ==
|
||||
"awaitingSubmissionDetails"
|
||||
? "pinswg_lpaname"
|
||||
: "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
@@ -1028,7 +1025,7 @@ const ViewAllResults = (props) => {
|
||||
}
|
||||
className={
|
||||
orderByState ==
|
||||
(currentView.viewKey ==
|
||||
(currentViewKey ==
|
||||
"awaitingSubmissionDetails"
|
||||
? "pinswg_lpaname"
|
||||
: "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue")
|
||||
@@ -1044,7 +1041,7 @@ const ViewAllResults = (props) => {
|
||||
</button>
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__key govuk-!-font-size-16">
|
||||
{currentView.viewKey !=
|
||||
{currentViewKey !=
|
||||
"awaitingSubmissionDetails" ? (
|
||||
<button
|
||||
type="button"
|
||||
@@ -1055,7 +1052,7 @@ const ViewAllResults = (props) => {
|
||||
}
|
||||
className={
|
||||
orderByState ==
|
||||
(currentView.viewKey ==
|
||||
(currentViewKey ==
|
||||
"awaitingSubmissionDetails"
|
||||
? "pinswg_lpaname"
|
||||
: "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue")
|
||||
@@ -1076,8 +1073,7 @@ const ViewAllResults = (props) => {
|
||||
)}{" "}
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__key govuk-!-font-size-16">
|
||||
{currentView.viewKey ==
|
||||
"myRepresentations" ? (
|
||||
{currentViewKey == "myRepresentations" ? (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() =>
|
||||
@@ -1098,11 +1094,10 @@ const ViewAllResults = (props) => {
|
||||
)}
|
||||
</dd>
|
||||
|
||||
{(currentView.viewKey == "watchedCases" ||
|
||||
currentView.viewKey ==
|
||||
{(currentViewKey == "watchedCases" ||
|
||||
currentViewKey ==
|
||||
"awaitingSubmissionDetails" ||
|
||||
currentView.viewKey ==
|
||||
"myRepresentations") && (
|
||||
currentViewKey == "myRepresentations") && (
|
||||
<dd className="govuk-summary-list__key govuk-!-font-size-16 govuk-summary-list__action"></dd>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -44,8 +44,8 @@ const WatchedCases = (props) => {
|
||||
router.locale != "en"
|
||||
? "/" +
|
||||
router.locale +
|
||||
"/fymhorth/gweldpopeth"
|
||||
: "/myportal/viewall"
|
||||
"/fymhorth/gweldpopeth?key=watchedCases"
|
||||
: "/myportal/viewall?key=watchedCases"
|
||||
}
|
||||
className="govuk-link--no-underline"
|
||||
onClick={() => {
|
||||
|
||||
Reference in New Issue
Block a user