fixed breacrumb and label
This commit is contained in:
+35
-18
@@ -324,6 +324,35 @@ const CaseSummary = (props) => {
|
||||
|
||||
const zoom = isNaN(parseFloat(siteCoords.latitude)) ? 7 : 12;
|
||||
|
||||
const buildSearchHref = (router, session) => {
|
||||
const { va, adv, ads, key } = router.query;
|
||||
|
||||
if (va === "true") {
|
||||
return {
|
||||
pathname: "/myportal/viewall",
|
||||
query: { key }
|
||||
};
|
||||
}
|
||||
|
||||
const base = session ? "/myportal" : "";
|
||||
|
||||
if (adv === "true") {
|
||||
return {
|
||||
pathname: `${base}/advancedsearchresults`,
|
||||
query: router.query
|
||||
};
|
||||
}
|
||||
|
||||
if (ads === "true") {
|
||||
return {
|
||||
pathname: `${base}/addresssearchresults`,
|
||||
query: router.query
|
||||
};
|
||||
}
|
||||
|
||||
return { pathname: `${base}/searchresults`, query: router.query };
|
||||
};
|
||||
|
||||
let showDetailsBlock =
|
||||
showDetails == true ? (
|
||||
<>
|
||||
@@ -996,23 +1025,10 @@ const CaseSummary = (props) => {
|
||||
|
||||
<Link
|
||||
className="govuk-button govuk-button--secondary"
|
||||
href={{
|
||||
pathname:
|
||||
(session
|
||||
? "/myportal"
|
||||
: "") +
|
||||
(router.query
|
||||
.adv ==
|
||||
"true"
|
||||
? "/advancedsearchresults"
|
||||
: router
|
||||
.query
|
||||
.ads ==
|
||||
"true"
|
||||
? "/addresssearchresults"
|
||||
: "/searchresults"),
|
||||
query: router.query
|
||||
}}
|
||||
href={buildSearchHref(
|
||||
router,
|
||||
session
|
||||
)}
|
||||
>
|
||||
{" "}
|
||||
{t(
|
||||
@@ -2134,7 +2150,8 @@ const mapStateToProps = (state) => {
|
||||
myCases: state.myCases,
|
||||
watchedCases: state.watchedCases,
|
||||
myRepresentations: state.myRepresentations,
|
||||
awaitingSubmission: state.awaitingSubmission
|
||||
awaitingSubmission: state.awaitingSubmission,
|
||||
mySubmittedReps: state.myRepresentations.mySubmittedReps
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user