adjusted logic to cater for viewl all path and dnsapplications
This commit is contained in:
+181
-290
@@ -13,24 +13,40 @@ import {
|
|||||||
setRepresentationSubmit
|
setRepresentationSubmit
|
||||||
} from "../store/currentView/action";
|
} from "../store/currentView/action";
|
||||||
const Breadcrumbs = (props) => {
|
const Breadcrumbs = (props) => {
|
||||||
const { currentView, setCurrentSection, setRepresentationSubmit } = props;
|
const {
|
||||||
|
currentView,
|
||||||
|
setCurrentSection,
|
||||||
|
setRepresentationSubmit,
|
||||||
|
appealType,
|
||||||
|
showQuestionnaireSection,
|
||||||
|
setShowQuestionnaireSection
|
||||||
|
} = props;
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|
||||||
const { data: session } = useSession();
|
const { data: session } = useSession();
|
||||||
|
|
||||||
|
const nestedProps = props?.props || {};
|
||||||
|
const nestedSearchString = nestedProps?.search?.searchString || "";
|
||||||
|
const nestedCurrentReference =
|
||||||
|
nestedProps?.currentView?.caseReference?.currentReference || "";
|
||||||
|
|
||||||
|
const isWelsh = router.locale === "cy";
|
||||||
|
const localisedPath = (englishPath, welshSuffixPath) =>
|
||||||
|
isWelsh ? `/${router.locale}${welshSuffixPath}` : englishPath;
|
||||||
|
|
||||||
const currentReference =
|
const currentReference =
|
||||||
props?.props?.currentView?.caseReference?.currentReference || "";
|
currentView?.caseReference?.currentReference || nestedCurrentReference;
|
||||||
const fallbackSearchTitle =
|
const fallbackSearchTitle =
|
||||||
props?.props?.searchResultsObj?.searchResultsObj?.value?.[0]?.title ||
|
props?.searchResultsObj?.searchResultsObj?.value?.[0]?.title || "";
|
||||||
"";
|
|
||||||
const caseReferenceDisplay = currentReference || fallbackSearchTitle;
|
const caseReferenceDisplay = currentReference || fallbackSearchTitle;
|
||||||
|
|
||||||
const myPortalHref =
|
const myPortalHref = localisedPath("/myportal", "/fymhorth");
|
||||||
router.locale != "en" ? "/" + router.locale + "/fymhorth" : "/myportal";
|
const cyMyPortalHref = myPortalHref;
|
||||||
const cyMyPortalHref =
|
const pathname = router.pathname;
|
||||||
router.locale == "cy" ? "/" + router.locale + "/fymhorth" : "/myportal";
|
const isPath = (path) => pathname === path;
|
||||||
const caseReference = currentView?.caseReference || {};
|
const caseReference = currentView?.caseReference || {};
|
||||||
|
const currentViewState = currentView?.currentView || {};
|
||||||
const repDetails = caseReference?.repDetails;
|
const repDetails = caseReference?.repDetails;
|
||||||
const hasRepDetails = Object.prototype.hasOwnProperty.call(
|
const hasRepDetails = Object.prototype.hasOwnProperty.call(
|
||||||
caseReference,
|
caseReference,
|
||||||
@@ -38,22 +54,46 @@ const Breadcrumbs = (props) => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const qcount =
|
const qcount =
|
||||||
caseReference.appealType == 846040000 ||
|
caseReference.appealType === 846040000 ||
|
||||||
caseReference.appealType == 846040001 ||
|
caseReference.appealType === 846040001 ||
|
||||||
caseReference.appealType == 846040025 ||
|
caseReference.appealType === 846040025 ||
|
||||||
caseReference.appealType == 846040004 ||
|
caseReference.appealType === 846040004 ||
|
||||||
caseReference.appealType == 846040018 ||
|
caseReference.appealType === 846040018 ||
|
||||||
caseReference.appealType == 846040003 ||
|
caseReference.appealType === 846040003 ||
|
||||||
caseReference.appealType == 846040009 ||
|
caseReference.appealType === 846040009 ||
|
||||||
caseReference.appealType == 846040008
|
caseReference.appealType === 846040008
|
||||||
? 7
|
? 7
|
||||||
: caseReference.appealType == 846040005 ||
|
: caseReference.appealType === 846040005 ||
|
||||||
caseReference.appealType == 846040006 ||
|
caseReference.appealType === 846040006 ||
|
||||||
caseReference.appealType == 846040007
|
caseReference.appealType === 846040007
|
||||||
? 9
|
? 9
|
||||||
: "";
|
: "";
|
||||||
|
|
||||||
const { va, adv, ads, key } = router.query;
|
const { va, adv, ads, key } = router.query;
|
||||||
|
const isAdv = adv === "true";
|
||||||
|
const isAds = ads === "true";
|
||||||
|
|
||||||
|
const hideServiceNamePaths = [
|
||||||
|
"/myportal/[appealtypes]",
|
||||||
|
"/newappeal",
|
||||||
|
"/newappeal/[appealtypes]",
|
||||||
|
"/myportal/representation"
|
||||||
|
];
|
||||||
|
const shouldShowServiceName = !hideServiceNamePaths.includes(pathname);
|
||||||
|
|
||||||
|
const getViewAllLabel = (viewKey) => {
|
||||||
|
const labelsByKey = {
|
||||||
|
awaitingSubmissionDetails: t(
|
||||||
|
"myportal:awatitingsubmission-card-title"
|
||||||
|
),
|
||||||
|
watchedCases: t("myportal:watchedcases-card-title"),
|
||||||
|
myCases: t("myportal:mycases-card-title"),
|
||||||
|
myRepresentations: t("myportal:myrepresentations-card-title"),
|
||||||
|
mySubmittedReps: "Submitted representations"
|
||||||
|
};
|
||||||
|
|
||||||
|
return labelsByKey[viewKey] || null;
|
||||||
|
};
|
||||||
|
|
||||||
const breadcrumbHref = (() => {
|
const breadcrumbHref = (() => {
|
||||||
if (va === "true") {
|
if (va === "true") {
|
||||||
@@ -65,6 +105,12 @@ const Breadcrumbs = (props) => {
|
|||||||
|
|
||||||
const base = session ? "/myportal" : "";
|
const base = session ? "/myportal" : "";
|
||||||
|
|
||||||
|
if (!va && !adv && !ads) {
|
||||||
|
return {
|
||||||
|
pathname: "/myportal"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
if (adv === "true") {
|
if (adv === "true") {
|
||||||
return {
|
return {
|
||||||
pathname: `${base}/advancedsearchresults`,
|
pathname: `${base}/advancedsearchresults`,
|
||||||
@@ -87,35 +133,17 @@ const Breadcrumbs = (props) => {
|
|||||||
|
|
||||||
const breadcrumbLabel = (() => {
|
const breadcrumbLabel = (() => {
|
||||||
if (va === "true") {
|
if (va === "true") {
|
||||||
if (key === "awaitingSubmissionDetails")
|
return getViewAllLabel(key);
|
||||||
return t("myportal:awatitingsubmission-card-title");
|
|
||||||
}
|
}
|
||||||
if (key === "watchedCases")
|
|
||||||
return t("myportal:watchedcases-card-title");
|
|
||||||
|
|
||||||
if (key === "myCases") return t("myportal:mycases-card-title");
|
const keyedLabel = getViewAllLabel(key);
|
||||||
|
if (keyedLabel) return keyedLabel;
|
||||||
|
|
||||||
if (key === "myRepresentations")
|
if (isAdv) {
|
||||||
return t("myportal:myrepresentations-card-title");
|
|
||||||
|
|
||||||
if (key === "awaitingSubmissionDetails")
|
|
||||||
return t("myportal:awatitingsubmission-card-title");
|
|
||||||
|
|
||||||
if (key === "watchedCases")
|
|
||||||
return t("myportal:watchedcases-card-title");
|
|
||||||
|
|
||||||
if (key === "myCases") return t("myportal:mycases-card-title");
|
|
||||||
|
|
||||||
if (key === "myRepresentations")
|
|
||||||
return t("myportal:myrepresentations-card-title");
|
|
||||||
|
|
||||||
if (key === "mySubmittedReps") return "Submitted representations";
|
|
||||||
|
|
||||||
if (adv === "true") {
|
|
||||||
return t("common:breadcrumb-advanced-search-results");
|
return t("common:breadcrumb-advanced-search-results");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ads === "true") {
|
if (isAds) {
|
||||||
return t("common:breadcrumb-address-search-results");
|
return t("common:breadcrumb-address-search-results");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,26 +158,23 @@ const Breadcrumbs = (props) => {
|
|||||||
>
|
>
|
||||||
<div className="govuk-breadcrumbs ">
|
<div className="govuk-breadcrumbs ">
|
||||||
<ol className="govuk-breadcrumbs__list">
|
<ol className="govuk-breadcrumbs__list">
|
||||||
{router.pathname != "/myportal/[appealtypes]" &&
|
{shouldShowServiceName && (
|
||||||
router.pathname != "/newappeal" &&
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
router.pathname != "/newappeal/[appealtypes]" &&
|
<Link
|
||||||
router.pathname != "/myportal/representation" && (
|
href={"/"}
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
className="govuk-breadcrumbs__link"
|
||||||
<Link
|
>
|
||||||
href={"/"}
|
{t("common:service-name-breadcrumb")}
|
||||||
className="govuk-breadcrumbs__link"
|
</Link>
|
||||||
>
|
</li>
|
||||||
{t("common:service-name-breadcrumb")}
|
)}
|
||||||
</Link>
|
|
||||||
</li>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{router.pathname == "/myportal" && (
|
{isPath("/myportal") && (
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
{t("myportal:page-title")}
|
{t("myportal:page-title")}
|
||||||
</li>
|
</li>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/myportal/searchresults" && (
|
{isPath("/myportal/searchresults") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<a
|
<a
|
||||||
@@ -164,28 +189,28 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/searchresults" && (
|
{isPath("/searchresults") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
{t("common:breadcrumb-search-results")}
|
{t("common:breadcrumb-search-results")}
|
||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/advancedsearch" && (
|
{isPath("/advancedsearch") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
{t("common:breadcrumb-advanced-search")}
|
{t("common:breadcrumb-advanced-search")}
|
||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/addresssearch" && (
|
{isPath("/addresssearch") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
{t("common:breadcrumb-address-search")}
|
{t("common:breadcrumb-address-search")}
|
||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/myportal/addresssearch" && (
|
{isPath("/myportal/addresssearch") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
@@ -200,7 +225,7 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/myportal/advancedsearch" && (
|
{isPath("/myportal/advancedsearch") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
@@ -215,7 +240,7 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/myportal/contactus" && (
|
{isPath("/myportal/contactus") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
@@ -230,13 +255,20 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/addresssearchresults" && (
|
{isPath("/contactus") && (
|
||||||
|
<>
|
||||||
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
|
{t("common:footer-contact-us-link-label")}
|
||||||
|
</li>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
{isPath("/addresssearchresults") && (
|
||||||
<>
|
<>
|
||||||
{" "}
|
{" "}
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale != "en"
|
isWelsh
|
||||||
? router.locale +
|
? router.locale +
|
||||||
"/chwiliadcyfeiriadau"
|
"/chwiliadcyfeiriadau"
|
||||||
: "/addresssearch"
|
: "/addresssearch"
|
||||||
@@ -253,13 +285,13 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/advancedsearchresults" && (
|
{isPath("/advancedsearchresults") && (
|
||||||
<>
|
<>
|
||||||
{" "}
|
{" "}
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale != "en"
|
isWelsh
|
||||||
? router.locale +
|
? router.locale +
|
||||||
"/advancedsearch"
|
"/advancedsearch"
|
||||||
: "/advancedsearch"
|
: "/advancedsearch"
|
||||||
@@ -276,8 +308,7 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname ==
|
{isPath("/myportal/advancedsearchresults") && (
|
||||||
"/myportal/advancedsearchresults" && (
|
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
@@ -290,7 +321,7 @@ const Breadcrumbs = (props) => {
|
|||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale != "en"
|
isWelsh
|
||||||
? router.locale +
|
? router.locale +
|
||||||
"/myportal/advancedsearch"
|
"/myportal/advancedsearch"
|
||||||
: "/myportal/advancedsearch"
|
: "/myportal/advancedsearch"
|
||||||
@@ -307,8 +338,7 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname ==
|
{isPath("/myportal/addresssearchresults") && (
|
||||||
"/myportal/addresssearchresults" && (
|
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
@@ -321,7 +351,7 @@ const Breadcrumbs = (props) => {
|
|||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale != "en"
|
isWelsh
|
||||||
? "/" +
|
? "/" +
|
||||||
router.locale +
|
router.locale +
|
||||||
"/fymhorth/chwiliadcyfeiriadau"
|
"/fymhorth/chwiliadcyfeiriadau"
|
||||||
@@ -339,49 +369,11 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/newappeal" && (
|
{isPath("/newappeal") && <></>}
|
||||||
|
{isPath("/newappeal/[appealtypes]") && (
|
||||||
<>
|
<>
|
||||||
{/* <li className="govuk-breadcrumbs__list-item">
|
{appealType.currentSection > 1 &&
|
||||||
<Link
|
(appealType.currentSection === 9999 ? (
|
||||||
href={
|
|
||||||
router.locale != "en"
|
|
||||||
? "/" +
|
|
||||||
router.locale +
|
|
||||||
"/fymhorth"
|
|
||||||
: "/myportal"
|
|
||||||
}
|
|
||||||
className="govuk-breadcrumbs__link"
|
|
||||||
>
|
|
||||||
{t("newappeal:parent-page-title")}
|
|
||||||
</Link>
|
|
||||||
</li>
|
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
|
||||||
{t("newappeal:page-title")}
|
|
||||||
</li> */}
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
{router.pathname == "/newappeal/[appealtypes]" && (
|
|
||||||
<>
|
|
||||||
{/* <li className="govuk-breadcrumbs__list-item">
|
|
||||||
<Link
|
|
||||||
href={
|
|
||||||
router.locale != "en"
|
|
||||||
? "/" +
|
|
||||||
router.locale +
|
|
||||||
"/fymhorth"
|
|
||||||
: "/myportal"
|
|
||||||
}
|
|
||||||
className="govuk-breadcrumbs__link"
|
|
||||||
>
|
|
||||||
{t("newappeal:parent-page-title")}
|
|
||||||
</Link>
|
|
||||||
</li>
|
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
|
||||||
{t("newappeal:page-title")}
|
|
||||||
</li> */}
|
|
||||||
|
|
||||||
{props.appealType.currentSection > 1 &&
|
|
||||||
(props.appealType.currentSection == 9999 ? (
|
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
href={"/"}
|
href={"/"}
|
||||||
@@ -399,8 +391,8 @@ const Breadcrumbs = (props) => {
|
|||||||
href="#"
|
href="#"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
setCurrentSection(
|
setCurrentSection(
|
||||||
props.appealType
|
appealType.currentSection -
|
||||||
.currentSection - 1
|
1
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
@@ -410,30 +402,10 @@ const Breadcrumbs = (props) => {
|
|||||||
))}
|
))}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/myportal/[appealtypes]" && (
|
{isPath("/myportal/[appealtypes]") && (
|
||||||
<>
|
<>
|
||||||
{/* <li className="govuk-breadcrumbs__list-item">
|
{appealType.currentSection > 1 &&
|
||||||
<Link
|
(appealType.currentSection === 9999 ? (
|
||||||
href={
|
|
||||||
router.locale != "en"
|
|
||||||
? "/" +
|
|
||||||
router.locale +
|
|
||||||
"/fymhorth"
|
|
||||||
: "/myportal"
|
|
||||||
}
|
|
||||||
className="govuk-breadcrumbs__link"
|
|
||||||
>
|
|
||||||
{t("newappeal:parent-page-title")}
|
|
||||||
</Link>
|
|
||||||
</li>
|
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
|
||||||
{t("newappeal:page-title")}
|
|
||||||
</li>
|
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
|
||||||
{t("common:back-link")} {props.formTitle}
|
|
||||||
</li> */}
|
|
||||||
{props.appealType.currentSection > 1 &&
|
|
||||||
(props.appealType.currentSection == 9999 ? (
|
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
href={"/"}
|
href={"/"}
|
||||||
@@ -452,8 +424,7 @@ const Breadcrumbs = (props) => {
|
|||||||
href="#"
|
href="#"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
setCurrentSection(
|
setCurrentSection(
|
||||||
props.appealType
|
appealType.currentSection -
|
||||||
.currentSection -
|
|
||||||
1
|
1
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -465,7 +436,7 @@ const Breadcrumbs = (props) => {
|
|||||||
))}
|
))}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/newappeal/selectappeal" && (
|
{isPath("/newappeal/selectappeal") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
@@ -488,7 +459,7 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/viewall" && (
|
{isPath("/viewall") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
@@ -503,7 +474,7 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/myportal/viewall" && (
|
{isPath("/myportal/viewall") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
@@ -514,37 +485,19 @@ const Breadcrumbs = (props) => {
|
|||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
{(currentView.currentView.viewKey ||
|
{getViewAllLabel(
|
||||||
router.query.key) ==
|
currentViewState.viewKey ||
|
||||||
"awaitingSubmissionDetails" &&
|
router.query.key
|
||||||
t(
|
)}
|
||||||
"myportal:awatitingsubmission-card-title"
|
|
||||||
)}
|
|
||||||
{(currentView.currentView.viewKey ||
|
|
||||||
router.query.key) == "watchedCases" &&
|
|
||||||
t("myportal:watchedcases-card-title")}
|
|
||||||
{(currentView.currentView.viewKey ||
|
|
||||||
router.query.key) == "myCases" &&
|
|
||||||
t("myportal:mycases-card-title")}
|
|
||||||
{(currentView.currentView.viewKey ||
|
|
||||||
router.query.key) ==
|
|
||||||
"myRepresentations" &&
|
|
||||||
t(
|
|
||||||
"myportal:myrepresentations-card-title"
|
|
||||||
)}
|
|
||||||
{(currentView.currentView.viewKey ||
|
|
||||||
router.query.key) ==
|
|
||||||
"mySubmittedReps" &&
|
|
||||||
"Submitted representations"}
|
|
||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/myportal/case" && (
|
{isPath("/myportal/case") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale != "en"
|
isWelsh
|
||||||
? "/" +
|
? "/" +
|
||||||
router.locale +
|
router.locale +
|
||||||
"/fymhorth"
|
"/fymhorth"
|
||||||
@@ -561,29 +514,23 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/case/[ticketnumber]" && (
|
{isPath("/case/[ticketnumber]") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
href={{
|
href={{
|
||||||
pathname:
|
pathname:
|
||||||
(session ? "/myportal" : "") +
|
(session ? "/myportal" : "") +
|
||||||
(router.query.adv == "true"
|
(isAdv
|
||||||
? "/advancedsearchresults"
|
? "/advancedsearchresults"
|
||||||
: router.query.ads == "true"
|
: isAds
|
||||||
? "/addresssearchresults"
|
? "/addresssearchresults"
|
||||||
: "/searchresults"),
|
: "/searchresults"),
|
||||||
query: router.query
|
query: router.query
|
||||||
}}
|
}}
|
||||||
className="govuk-breadcrumbs__link"
|
className="govuk-breadcrumbs__link"
|
||||||
>
|
>
|
||||||
{router.query.ads == "true"
|
{breadcrumbLabel}
|
||||||
? t(
|
|
||||||
"common:breadcrumb-addresssearch-results"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"common:breadcrumb-search-results"
|
|
||||||
)}
|
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
@@ -592,12 +539,12 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/case/id/[incident]" && (
|
{isPath("/case/id/[incident]") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale != "en"
|
isWelsh
|
||||||
? "/" +
|
? "/" +
|
||||||
router.locale +
|
router.locale +
|
||||||
"/chwiliadcyfeiriadau"
|
"/chwiliadcyfeiriadau"
|
||||||
@@ -611,15 +558,13 @@ const Breadcrumbs = (props) => {
|
|||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale != "en"
|
isWelsh
|
||||||
? "/" +
|
? "/" +
|
||||||
router.locale +
|
router.locale +
|
||||||
"/canlyniadaucyfeiriadau?" +
|
"/canlyniadaucyfeiriadau?" +
|
||||||
props.props.search
|
nestedSearchString
|
||||||
.searchString
|
|
||||||
: "/addresssearchresults?" +
|
: "/addresssearchresults?" +
|
||||||
props.props.search
|
nestedSearchString
|
||||||
.searchString
|
|
||||||
}
|
}
|
||||||
className="govuk-breadcrumbs__link"
|
className="govuk-breadcrumbs__link"
|
||||||
>
|
>
|
||||||
@@ -634,7 +579,7 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/myportal/case/id/[incident]" && (
|
{isPath("/myportal/case/id/[incident]") && (
|
||||||
<>
|
<>
|
||||||
{" "}
|
{" "}
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
@@ -648,7 +593,7 @@ const Breadcrumbs = (props) => {
|
|||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale != "en"
|
isWelsh
|
||||||
? "/" +
|
? "/" +
|
||||||
router.locale +
|
router.locale +
|
||||||
"/fymhorth/chwiliadcyfeiriadau"
|
"/fymhorth/chwiliadcyfeiriadau"
|
||||||
@@ -662,15 +607,13 @@ const Breadcrumbs = (props) => {
|
|||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale != "en"
|
isWelsh
|
||||||
? "/" +
|
? "/" +
|
||||||
router.locale +
|
router.locale +
|
||||||
"/fymhorth/canlyniadaucyfeiriadau?" +
|
"/fymhorth/canlyniadaucyfeiriadau?" +
|
||||||
props.props.search
|
nestedSearchString
|
||||||
.searchString
|
|
||||||
: "/myportal/addresssearchresults?" +
|
: "/myportal/addresssearchresults?" +
|
||||||
props.props.search
|
nestedSearchString
|
||||||
.searchString
|
|
||||||
}
|
}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
// spinnerState();
|
// spinnerState();
|
||||||
@@ -689,7 +632,7 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/myportal/case/[ticketnumber]" && (
|
{isPath("/myportal/case/[ticketnumber]") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
@@ -713,7 +656,7 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/myportal/dnsapplications" && (
|
{isPath("/myportal/dnsapplications") && (
|
||||||
<>
|
<>
|
||||||
{" "}
|
{" "}
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
@@ -729,7 +672,7 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/myportal/dnsdetails" && (
|
{isPath("/myportal/dnsdetails") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
@@ -753,13 +696,12 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname ==
|
{isPath("/myportal/dns/[developmentName]") && (
|
||||||
"/myportal/dns/[developmentName]" && (
|
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale != "en"
|
isWelsh
|
||||||
? router.locale + "/fymhorth"
|
? router.locale + "/fymhorth"
|
||||||
: "/myportal"
|
: "/myportal"
|
||||||
}
|
}
|
||||||
@@ -782,12 +724,12 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/case" && (
|
{isPath("/case") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale != "en"
|
isWelsh
|
||||||
? router.locale +
|
? router.locale +
|
||||||
"/searchresults?q=" +
|
"/searchresults?q=" +
|
||||||
router.query.q +
|
router.query.q +
|
||||||
@@ -813,60 +755,10 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/myportal/representation" && (
|
{isPath("/myportal/representation") && (
|
||||||
<>
|
<>
|
||||||
{/* {session != null && (
|
{currentView.representationSubmit === true &&
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
currentView.representationSubmitConfirmation !==
|
||||||
<Link
|
|
||||||
href={
|
|
||||||
router.locale != "en"
|
|
||||||
? "/" +
|
|
||||||
router.locale +
|
|
||||||
"/myportal"
|
|
||||||
: "/myportal"
|
|
||||||
}
|
|
||||||
className="govuk-breadcrumbs__link"
|
|
||||||
>
|
|
||||||
{t("common:breadcrumb-my-portal")}
|
|
||||||
</Link>
|
|
||||||
</li>
|
|
||||||
)}
|
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
|
||||||
<Link
|
|
||||||
href={
|
|
||||||
router.locale != "en"
|
|
||||||
? router.locale +
|
|
||||||
"/myportal/case" +
|
|
||||||
props.props.currentView
|
|
||||||
.caseReference
|
|
||||||
.currentReference
|
|
||||||
: "/myportal/case/" +
|
|
||||||
props.props.currentView
|
|
||||||
.caseReference
|
|
||||||
.currentReference
|
|
||||||
}
|
|
||||||
className="govuk-breadcrumbs__link"
|
|
||||||
>
|
|
||||||
{
|
|
||||||
props.props.currentView
|
|
||||||
.caseReference.currentReference
|
|
||||||
}
|
|
||||||
</Link>
|
|
||||||
</li>
|
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
|
||||||
{t(
|
|
||||||
"myrepresentations:make-a-representation-for-label"
|
|
||||||
)}{" "}
|
|
||||||
{
|
|
||||||
props.props.currentView.caseReference
|
|
||||||
.currentReference
|
|
||||||
}
|
|
||||||
</li> */}
|
|
||||||
|
|
||||||
{props.currentView.representationSubmit ==
|
|
||||||
true &&
|
|
||||||
props.currentView
|
|
||||||
.representationSubmitConfirmation !=
|
|
||||||
true && (
|
true && (
|
||||||
<li className="govuk-breadcrumbs__link-item backChevron">
|
<li className="govuk-breadcrumbs__link-item backChevron">
|
||||||
<a
|
<a
|
||||||
@@ -882,10 +774,9 @@ const Breadcrumbs = (props) => {
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
)}
|
)}
|
||||||
{props.currentView.representationSubmit !=
|
{currentView.representationSubmit !== true &&
|
||||||
true &&
|
|
||||||
hasRepDetails &&
|
hasRepDetails &&
|
||||||
repDetails?.representationType !=
|
repDetails?.representationType !==
|
||||||
"Questionnaire" && (
|
"Questionnaire" && (
|
||||||
<li className="govuk-breadcrumbs__link-item backChevron">
|
<li className="govuk-breadcrumbs__link-item backChevron">
|
||||||
<a
|
<a
|
||||||
@@ -901,19 +792,18 @@ const Breadcrumbs = (props) => {
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
)}
|
)}
|
||||||
{props.currentView.representationSubmit !=
|
{currentView.representationSubmit !== true &&
|
||||||
true &&
|
|
||||||
hasRepDetails &&
|
hasRepDetails &&
|
||||||
repDetails?.representationType ==
|
repDetails?.representationType ===
|
||||||
"Questionnaire" &&
|
"Questionnaire" &&
|
||||||
props.showQuestionnaireSection > 1 && (
|
showQuestionnaireSection > 1 && (
|
||||||
<li className="govuk-breadcrumbs__link-item backChevron">
|
<li className="govuk-breadcrumbs__link-item backChevron">
|
||||||
<a
|
<a
|
||||||
className="govuk-breadcrumbs__link"
|
className="govuk-breadcrumbs__link"
|
||||||
href="#"
|
href="#"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
props.setShowQuestionnaireSection(
|
setShowQuestionnaireSection(
|
||||||
props.showQuestionnaireSection -
|
showQuestionnaireSection -
|
||||||
1
|
1
|
||||||
);
|
);
|
||||||
setRepresentationSubmit(
|
setRepresentationSubmit(
|
||||||
@@ -927,7 +817,7 @@ const Breadcrumbs = (props) => {
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/account/personaldetails" && (
|
{isPath("/account/personaldetails") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
@@ -942,14 +832,14 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/account/register" && (
|
{isPath("/account/register") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
{t("account:register-new-account-heading")}
|
{t("account:register-new-account-heading")}
|
||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/account/changepassword" && (
|
{isPath("/account/changepassword") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
@@ -964,7 +854,7 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/dns" && (
|
{isPath("/dns") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
{t("dnsCommon:service-name")}
|
{t("dnsCommon:service-name")}
|
||||||
@@ -972,19 +862,19 @@ const Breadcrumbs = (props) => {
|
|||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{router.pathname == "/dnsapplications" && (
|
{isPath("/dnsapplications") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
{t("dnsCommon:service-name")}
|
{t("dnsCommon:service-name")}
|
||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/dnsdetails" && (
|
{isPath("/dnsdetails") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale != "en"
|
isWelsh
|
||||||
? router.locale +
|
? router.locale +
|
||||||
"/dnsapplications"
|
"/dnsapplications"
|
||||||
: "/dnsapplications"
|
: "/dnsapplications"
|
||||||
@@ -1000,12 +890,12 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/dns/[developmentName]" && (
|
{isPath("/dns/[developmentName]") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale != "en"
|
isWelsh
|
||||||
? router.locale +
|
? router.locale +
|
||||||
"/dnsapplications"
|
"/dnsapplications"
|
||||||
: "/dnsapplications"
|
: "/dnsapplications"
|
||||||
@@ -1021,40 +911,40 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/dns/application-process" && (
|
{isPath("/dns/application-process") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
Guidance
|
Guidance
|
||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/dns/help" && (
|
{isPath("/dns/help") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
Help
|
Help
|
||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/dns/contact-us" && (
|
{isPath("/dns/contact-us") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
{t("common:footer-contact-us-link-label")}
|
{t("common:footer-contact-us-link-label")}
|
||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/dns/applications" && (
|
{isPath("/dns/applications") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
{t("dnsApplications:page-title")}
|
{t("dnsApplications:page-title")}
|
||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/dns/application-view" && (
|
{isPath("/dns/application-view") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
<Link
|
<Link
|
||||||
href={
|
href={
|
||||||
router.locale != "en"
|
isWelsh
|
||||||
? router.locale +
|
? router.locale +
|
||||||
"/dns/applications"
|
"/dns/applications"
|
||||||
: "/dns/applications"
|
: "/dns/applications"
|
||||||
@@ -1071,21 +961,21 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/help/cookies" && (
|
{isPath("/help/cookies") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
{t("cookies:cookie-breadcrumb")}
|
{t("cookies:cookie-breadcrumb")}
|
||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/privacy" && (
|
{isPath("/privacy") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
{t("common:footer-privacy-link-label")}
|
{t("common:footer-privacy-link-label")}
|
||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/accessibility" && (
|
{isPath("/accessibility") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
{t(
|
{t(
|
||||||
@@ -1094,28 +984,28 @@ const Breadcrumbs = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/details-about-cookies" && (
|
{isPath("/details-about-cookies") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
{t("cookies:cookie-policy-title-heading")}
|
{t("cookies:cookie-policy-title-heading")}
|
||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/auth/signin" && (
|
{isPath("/auth/signin") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
{t("auth:auth-page-title")}
|
{t("auth:auth-page-title")}
|
||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/auth/verify-request" && (
|
{isPath("/auth/verify-request") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
{t("auth:auth-check-email-page-title")}
|
{t("auth:auth-check-email-page-title")}
|
||||||
</li>
|
</li>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{router.pathname == "/auth/error" && (
|
{isPath("/auth/error") && (
|
||||||
<>
|
<>
|
||||||
<li className="govuk-breadcrumbs__list-item">
|
<li className="govuk-breadcrumbs__list-item">
|
||||||
{t("auth:auth-error-signin-error-title")}
|
{t("auth:auth-error-signin-error-title")}
|
||||||
@@ -1129,11 +1019,12 @@ const Breadcrumbs = (props) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapStateToProps = (state) => {
|
const mapStateToProps = (state) => ({
|
||||||
return {
|
currentView: state.currentView,
|
||||||
...state
|
appealType: state.appealType,
|
||||||
};
|
searchResultsObj: state.searchResultsObj,
|
||||||
};
|
search: state.search
|
||||||
|
});
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => {
|
const mapDispatchToProps = (dispatch) => {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -326,6 +326,27 @@ const CaseSummary = (props) => {
|
|||||||
|
|
||||||
const buildSearchHref = (router, session) => {
|
const buildSearchHref = (router, session) => {
|
||||||
const { va, adv, ads, key } = router.query;
|
const { va, adv, ads, key } = router.query;
|
||||||
|
console.log(router);
|
||||||
|
|
||||||
|
const isDnsRoute =
|
||||||
|
router.pathname === "/dns" ||
|
||||||
|
router.pathname.startsWith("/dns/") ||
|
||||||
|
router.pathname === "/myportal/dns" ||
|
||||||
|
router.pathname.startsWith("/myportal/dns/");
|
||||||
|
|
||||||
|
const base = session ? "/myportal" : "";
|
||||||
|
|
||||||
|
if (!va && !adv && !ads) {
|
||||||
|
return {
|
||||||
|
pathname: "/myportal"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isDnsRoute) {
|
||||||
|
return {
|
||||||
|
pathname: `${base}/dnsapplications`
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
if (va === "true") {
|
if (va === "true") {
|
||||||
return {
|
return {
|
||||||
@@ -334,8 +355,6 @@ const CaseSummary = (props) => {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const base = session ? "/myportal" : "";
|
|
||||||
|
|
||||||
if (adv === "true") {
|
if (adv === "true") {
|
||||||
return {
|
return {
|
||||||
pathname: `${base}/advancedsearchresults`,
|
pathname: `${base}/advancedsearchresults`,
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
"domain": process.env.I18N_DOMAIN,
|
"domain": process.env.I18N_DOMAIN,
|
||||||
"defaultLocale": "cy",
|
"defaultLocale": "cy",
|
||||||
"locales": ["cy"],
|
"locales": ["cy"]
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
"pages": {
|
"pages": {
|
||||||
"*": ["common", "search"],
|
"*": ["common", "search"],
|
||||||
@@ -22,18 +22,18 @@ module.exports = {
|
|||||||
"/myportal/advancedsearchresults": ["search", "myportal", "case"],
|
"/myportal/advancedsearchresults": ["search", "myportal", "case"],
|
||||||
"/myportal/searchresults": ["search", "myportal", "case"],
|
"/myportal/searchresults": ["search", "myportal", "case"],
|
||||||
"/myportal/case": ["case"],
|
"/myportal/case": ["case"],
|
||||||
"/myportal/case/[ticketnumber]": ["case"],
|
"/myportal/case/[ticketnumber]": ["case", "myportal"],
|
||||||
"/myportal/dnsapplications": [
|
"/myportal/dnsapplications": [
|
||||||
"search",
|
"search",
|
||||||
"dnsCommon",
|
"dnsCommon",
|
||||||
"dnsApplications",
|
"dnsApplications",
|
||||||
"case",
|
"case"
|
||||||
],
|
],
|
||||||
"/myportal/dnsdetails": [
|
"/myportal/dnsdetails": [
|
||||||
"case",
|
"case",
|
||||||
"search",
|
"search",
|
||||||
"dnsCommon",
|
"dnsCommon",
|
||||||
"dnsApplications",
|
"dnsApplications"
|
||||||
],
|
],
|
||||||
"/myportal/dns/*": ["dnsCommon", "case", "common"],
|
"/myportal/dns/*": ["dnsCommon", "case", "common"],
|
||||||
"/myportal/dns/[developmentName]": ["dnsCommon", "case", "common"],
|
"/myportal/dns/[developmentName]": ["dnsCommon", "case", "common"],
|
||||||
@@ -51,7 +51,7 @@ module.exports = {
|
|||||||
"case",
|
"case",
|
||||||
"myrepresentations",
|
"myrepresentations",
|
||||||
"common",
|
"common",
|
||||||
"home",
|
"home"
|
||||||
],
|
],
|
||||||
"/myportal/error": ["myportal", "common"],
|
"/myportal/error": ["myportal", "common"],
|
||||||
"/myportal/case/id/[incident]": ["case", "home"],
|
"/myportal/case/id/[incident]": ["case", "home"],
|
||||||
@@ -78,6 +78,6 @@ module.exports = {
|
|||||||
"/auth/signin": ["common", "common", "auth"],
|
"/auth/signin": ["common", "common", "auth"],
|
||||||
"/auth/verify-request": ["common", "common", "auth"],
|
"/auth/verify-request": ["common", "common", "auth"],
|
||||||
"/auth/error": ["common", "common", "auth"],
|
"/auth/error": ["common", "common", "auth"],
|
||||||
"/admin": ["case"],
|
"/admin": ["case"]
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user