dns url redirects to case

This commit is contained in:
2022-02-24 14:38:54 +00:00
parent eb1f934969
commit 2d97d6a1ce
10 changed files with 341 additions and 31 deletions
+33 -12
View File
@@ -13,6 +13,8 @@ const Breadcrumbs = (props) => {
let { t } = useTranslation();
console.log("asdadad", slug);
function Breadcrumb() {
if (slug) {
var coursePageURL = appealType + "/" + slug;
@@ -64,17 +66,9 @@ const Breadcrumbs = (props) => {
</Link>
</li> */}
<li className="govuk-breadcrumbs__list-item">
<Link
href={
router.pathname.includes("/dns/")
? "/dns"
: "/"
}
>
<Link href={"/"}>
<a className="govuk-breadcrumbs__link">
{router.pathname.includes("/dns/")
? t("dnsCommon:service-name")
: t("common:service-name-breadcrumb")}
{t("common:service-name-breadcrumb")}
</a>
</Link>
</li>
@@ -493,6 +487,33 @@ const Breadcrumbs = (props) => {
) : (
""
)}
{router.pathname == "/dns/[developmentName]" ? (
<>
<li className="govuk-breadcrumbs__list-item">
<Link
href={
router.locale == "en"
? router.locale +
"/../../dnsapplications"
: "/../../dnsapplications"
}
>
<a className="govuk-breadcrumbs__link">
{t("dnsCommon:service-name")}
</a>
</Link>
</li>
<li className="govuk-breadcrumbs__list-item">
{t("common:breadcrumb-case-reference")}:{" "}
{
props.props.currentView.caseReference
.currentReference
}
</li>
</>
) : (
""
)}
{router.pathname == "/dnsapplications" ? (
<>
<li className="govuk-breadcrumbs__list-item">
@@ -628,7 +649,7 @@ const Breadcrumbs = (props) => {
) : (
""
)}
{!_.isEmpty(slug) ? (
{/* {!_.isEmpty(slug) ? (
<>
<li className="govuk-breadcrumbs__list-item">
<Link
@@ -662,7 +683,7 @@ const Breadcrumbs = (props) => {
</>
) : (
""
)}
)} */}
<Breadcrumb />
</ol>
+5 -1
View File
@@ -63,7 +63,11 @@ const CaseSummary = (props) => {
setCurrentReference,
} = props;
const noRepresentationLink = ["/case", "/dnsdetails"];
const noRepresentationLink = [
"/case",
"/dnsdetails",
"/dns/[developmentName]",
];
let setCaseQueryObj = props[currentType];
let setCaseDetailsObj = props[currentType + "Details"];