correctly go back to the previous page search results
This commit is contained in:
+225
-236
@@ -786,235 +786,241 @@ const CaseSummary = (props) => {
|
||||
<>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
<div className="govuk-button-group">
|
||||
{getFormCollectionByID(
|
||||
appealTypeID
|
||||
).PrimaryIdAttribute ==
|
||||
"pinswg_sipscase" &&
|
||||
showReps(
|
||||
detailsObj.pinswg_consultationopen,
|
||||
detailsObj.pinswg_consultationclose
|
||||
) && (
|
||||
<>
|
||||
{showRepButton(
|
||||
props
|
||||
.currentView
|
||||
.caseReference
|
||||
.appealType
|
||||
) ? (
|
||||
<>
|
||||
<Link
|
||||
href={{
|
||||
pathname:
|
||||
"/myportal/representation",
|
||||
query: {
|
||||
case:
|
||||
currentType ==
|
||||
"searchResultsObj"
|
||||
? detailsObj.pinswg_name
|
||||
: currentType ==
|
||||
"watchedCases"
|
||||
? casesObj.pinswg_title
|
||||
: currentType ==
|
||||
"directResultsObj"
|
||||
<div className="">
|
||||
<div className="govuk-button-group">
|
||||
{getFormCollectionByID(
|
||||
appealTypeID
|
||||
).PrimaryIdAttribute ==
|
||||
"pinswg_sipscase" &&
|
||||
showReps(
|
||||
detailsObj.pinswg_consultationopen,
|
||||
detailsObj.pinswg_consultationclose
|
||||
) && (
|
||||
<>
|
||||
{showRepButton(
|
||||
props
|
||||
.currentView
|
||||
.caseReference
|
||||
.appealType
|
||||
) ? (
|
||||
<>
|
||||
<Link
|
||||
href={{
|
||||
pathname:
|
||||
"/myportal/representation",
|
||||
query: {
|
||||
case:
|
||||
currentType ==
|
||||
"searchResultsObj"
|
||||
? detailsObj.pinswg_name
|
||||
: casesObj.reference
|
||||
}
|
||||
}}
|
||||
className="govuk-button"
|
||||
>
|
||||
{props
|
||||
.currentView
|
||||
.caseReference
|
||||
.appealType ==
|
||||
846040002
|
||||
? t(
|
||||
"case:summary-make-consultation-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-make-representation-label"
|
||||
)}
|
||||
</Link>
|
||||
|
||||
<a
|
||||
onClick={() => {
|
||||
//spinnerState();
|
||||
router.back();
|
||||
}}
|
||||
className="govuk-button govuk-button--secondary"
|
||||
>
|
||||
{t(
|
||||
"case:summary-back-button-label"
|
||||
)}
|
||||
</a>
|
||||
</>
|
||||
) : !isLPA &&
|
||||
props.currentView
|
||||
.caseReference
|
||||
.appealType ==
|
||||
846040004 ? (
|
||||
""
|
||||
) : (
|
||||
<>
|
||||
<div className="govuk-grid-column-full govuk-!-padding-left-0">
|
||||
<div className="govuk-button-group">
|
||||
<p className="govuk-body">
|
||||
{t(
|
||||
"case:representation-date-passed-label",
|
||||
{
|
||||
startDate:
|
||||
formatDates(
|
||||
detailsObj.pinswg_consultationopen
|
||||
),
|
||||
endDate:
|
||||
formatDates(
|
||||
detailsObj.pinswg_consultationclose
|
||||
: currentType ==
|
||||
"watchedCases"
|
||||
? casesObj.pinswg_title
|
||||
: currentType ==
|
||||
"directResultsObj"
|
||||
? detailsObj.pinswg_name
|
||||
: casesObj.reference
|
||||
}
|
||||
}}
|
||||
className="govuk-button"
|
||||
>
|
||||
{props
|
||||
.currentView
|
||||
.caseReference
|
||||
.appealType ==
|
||||
846040002
|
||||
? t(
|
||||
"case:summary-make-consultation-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-make-representation-label"
|
||||
)}
|
||||
</Link>
|
||||
</>
|
||||
) : !isLPA &&
|
||||
props
|
||||
.currentView
|
||||
.caseReference
|
||||
.appealType ==
|
||||
846040004 ? (
|
||||
""
|
||||
) : (
|
||||
<>
|
||||
<div className="govuk-grid-column-full govuk-!-padding-left-0">
|
||||
<div className="govuk-button-group">
|
||||
<p className="govuk-body">
|
||||
{t(
|
||||
"case:representation-date-passed-label",
|
||||
{
|
||||
startDate:
|
||||
formatDates(
|
||||
detailsObj.pinswg_consultationopen
|
||||
),
|
||||
endDate:
|
||||
formatDates(
|
||||
detailsObj.pinswg_consultationclose
|
||||
)
|
||||
}
|
||||
)}
|
||||
<br />{" "}
|
||||
{t(
|
||||
"case:representation-date-passed-additional-label"
|
||||
)}{" "}
|
||||
<Link
|
||||
href={
|
||||
"mailto:" +
|
||||
t(
|
||||
"home:login-contact-email"
|
||||
)
|
||||
}
|
||||
)}
|
||||
<br />{" "}
|
||||
{t(
|
||||
"case:representation-date-passed-additional-label"
|
||||
)}{" "}
|
||||
<Link
|
||||
href={
|
||||
"mailto:" +
|
||||
t(
|
||||
}
|
||||
>
|
||||
{t(
|
||||
"home:login-contact-email"
|
||||
)
|
||||
}
|
||||
>
|
||||
{t(
|
||||
"home:login-contact-email"
|
||||
)}
|
||||
</Link>
|
||||
</p>
|
||||
)}
|
||||
</Link>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
{(_.has(
|
||||
detailsObj,
|
||||
"pinswg_startdate"
|
||||
) ||
|
||||
_.has(
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
{(_.has(
|
||||
detailsObj,
|
||||
"pinswg_applicationacceptedasvalid"
|
||||
"pinswg_startdate"
|
||||
) ||
|
||||
_.has(
|
||||
detailsObj,
|
||||
"pinswg_startdates"
|
||||
)) &&
|
||||
showReps(
|
||||
detailsObj.pinswg_startdate ||
|
||||
detailsObj.pinswg_startdates ||
|
||||
detailsObj.pinswg_applicationacceptedasvalid,
|
||||
detailsObj.pinswg_finalcommentsduedate ||
|
||||
detailsObj.pinswg_endofrepresentationperiod
|
||||
) && (
|
||||
<>
|
||||
{showRepButton(
|
||||
props
|
||||
.currentView
|
||||
.caseReference
|
||||
.appealType
|
||||
) ? (
|
||||
<>
|
||||
<Link
|
||||
href={{
|
||||
pathname:
|
||||
"/myportal/representation",
|
||||
query: {
|
||||
case:
|
||||
currentType ==
|
||||
"searchResultsObj"
|
||||
? detailsObj.ticketnumber
|
||||
: currentType ==
|
||||
"watchedCases"
|
||||
? casesObj.pinswg_title
|
||||
: currentType ==
|
||||
"directResultsObj"
|
||||
_.has(
|
||||
detailsObj,
|
||||
"pinswg_applicationacceptedasvalid"
|
||||
) ||
|
||||
_.has(
|
||||
detailsObj,
|
||||
"pinswg_startdates"
|
||||
)) &&
|
||||
showReps(
|
||||
detailsObj.pinswg_startdate ||
|
||||
detailsObj.pinswg_startdates ||
|
||||
detailsObj.pinswg_applicationacceptedasvalid,
|
||||
detailsObj.pinswg_finalcommentsduedate ||
|
||||
detailsObj.pinswg_endofrepresentationperiod
|
||||
) && (
|
||||
<>
|
||||
{showRepButton(
|
||||
props
|
||||
.currentView
|
||||
.caseReference
|
||||
.appealType
|
||||
) ? (
|
||||
<>
|
||||
<Link
|
||||
href={{
|
||||
pathname:
|
||||
"/myportal/representation",
|
||||
query: {
|
||||
case:
|
||||
currentType ==
|
||||
"searchResultsObj"
|
||||
? detailsObj.ticketnumber
|
||||
: casesObj.reference
|
||||
}
|
||||
}}
|
||||
className="govuk-button"
|
||||
>
|
||||
{t(
|
||||
"case:summary-make-representation-label"
|
||||
)}
|
||||
</Link>
|
||||
|
||||
<a
|
||||
onClick={() => {
|
||||
//spinnerState();
|
||||
router.back();
|
||||
}}
|
||||
className="govuk-button govuk-button--secondary"
|
||||
>
|
||||
{t(
|
||||
"case:summary-back-button-label"
|
||||
)}
|
||||
</a>
|
||||
</>
|
||||
) : !isLPA &&
|
||||
props.currentView
|
||||
.caseReference
|
||||
.appealType ==
|
||||
846040004 ? (
|
||||
""
|
||||
) : (
|
||||
<>
|
||||
<div className="govuk-grid-column-full govuk-!-padding-left-0">
|
||||
<div className="govuk-button-group">
|
||||
<p className="govuk-body">
|
||||
{t(
|
||||
"case:representation-date-passed-label",
|
||||
{
|
||||
startDate:
|
||||
formatDates(
|
||||
detailsObj.pinswg_startdate
|
||||
),
|
||||
endDate:
|
||||
props
|
||||
.currentView
|
||||
.caseReference
|
||||
.appealType ==
|
||||
846040019
|
||||
? formatDates(
|
||||
detailsObj.pinswg_statementduedate
|
||||
)
|
||||
: formatDates(
|
||||
detailsObj.pinswg_finalcommentsduedate
|
||||
)
|
||||
}
|
||||
)}
|
||||
<br />{" "}
|
||||
{t(
|
||||
"case:representation-date-passed-additional-label"
|
||||
)}{" "}
|
||||
<Link
|
||||
href={
|
||||
"mailto:" +
|
||||
t(
|
||||
"home:login-contact-email"
|
||||
)
|
||||
}
|
||||
>
|
||||
: currentType ==
|
||||
"watchedCases"
|
||||
? casesObj.pinswg_title
|
||||
: currentType ==
|
||||
"directResultsObj"
|
||||
? detailsObj.ticketnumber
|
||||
: casesObj.reference
|
||||
}
|
||||
}}
|
||||
className="govuk-button"
|
||||
>
|
||||
{t(
|
||||
"case:summary-make-representation-label"
|
||||
)}
|
||||
</Link>
|
||||
</>
|
||||
) : !isLPA &&
|
||||
props
|
||||
.currentView
|
||||
.caseReference
|
||||
.appealType ==
|
||||
846040004 ? (
|
||||
""
|
||||
) : (
|
||||
<>
|
||||
<div className="govuk-grid-column-full govuk-!-padding-left-0">
|
||||
<div className="govuk-button-group">
|
||||
<p className="govuk-body">
|
||||
{t(
|
||||
"home:login-contact-email"
|
||||
"case:representation-date-passed-label",
|
||||
{
|
||||
startDate:
|
||||
formatDates(
|
||||
detailsObj.pinswg_startdate
|
||||
),
|
||||
endDate:
|
||||
props
|
||||
.currentView
|
||||
.caseReference
|
||||
.appealType ==
|
||||
846040019
|
||||
? formatDates(
|
||||
detailsObj.pinswg_statementduedate
|
||||
)
|
||||
: formatDates(
|
||||
detailsObj.pinswg_finalcommentsduedate
|
||||
)
|
||||
}
|
||||
)}
|
||||
</Link>
|
||||
</p>
|
||||
<br />{" "}
|
||||
{t(
|
||||
"case:representation-date-passed-additional-label"
|
||||
)}{" "}
|
||||
<Link
|
||||
href={
|
||||
"mailto:" +
|
||||
t(
|
||||
"home:login-contact-email"
|
||||
)
|
||||
}
|
||||
>
|
||||
{t(
|
||||
"home:login-contact-email"
|
||||
)}
|
||||
</Link>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
<div className="govuk-body">
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
|
||||
<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
|
||||
}}
|
||||
>
|
||||
{" "}
|
||||
{t(
|
||||
"case:summary-back-button-label"
|
||||
)}
|
||||
</Link>
|
||||
</div>
|
||||
<div className="govuk-button-group">
|
||||
{session &&
|
||||
(isWatchedCase(
|
||||
props.currentView
|
||||
@@ -1245,13 +1251,6 @@ const CaseSummary = (props) => {
|
||||
"case:send-email-notifications"
|
||||
)}
|
||||
</button>
|
||||
{/* <button
|
||||
onClick={
|
||||
handleOpenModal
|
||||
}
|
||||
>
|
||||
Open Modal
|
||||
</button> */}
|
||||
</>
|
||||
))}
|
||||
{!session && (
|
||||
@@ -1939,16 +1938,6 @@ const CaseSummary = (props) => {
|
||||
)}
|
||||
</Link>
|
||||
)}
|
||||
|
||||
<a
|
||||
onClick={() => {
|
||||
// spinnerState();
|
||||
router.back();
|
||||
}}
|
||||
className="govuk-button govuk-button--secondary"
|
||||
>
|
||||
{t("case:summary-back-button-label")}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user