Merged PR 2441: electricity shouldnt be showing reps available

electricity shouldnt be showing reps available

Related work items: #24008
This commit is contained in:
Robert Bond
2026-06-29 08:39:39 +00:00
parent 001c7ad6fa
commit 7b6af58065
2 changed files with 16 additions and 27 deletions
@@ -72,6 +72,9 @@ export function getEntryCtaLabelKey(appealType) {
} }
export function shouldSuppressBlockedMessage({ appealType, isLPA }) { export function shouldSuppressBlockedMessage({ appealType, isLPA }) {
if (!canShowRepresentationButtonForAppealType(appealType)) {
return true;
}
return !isLPA && appealType == 846040004; return !isLPA && appealType == 846040004;
} }
+7 -21
View File
@@ -24,6 +24,7 @@ const RepsOnResults = (props) => {
Object.prototype.hasOwnProperty.call(obj || {}, key); Object.prototype.hasOwnProperty.call(obj || {}, key);
function showRepButton(appealType) { function showRepButton(appealType) {
appealType = Number(appealType);
if (!canShowRepresentationButtonForAppealType(appealType)) { if (!canShowRepresentationButtonForAppealType(appealType)) {
return false; return false;
} }
@@ -90,33 +91,18 @@ const RepsOnResults = (props) => {
detailsObj.pinswg_consultationclose detailsObj.pinswg_consultationclose
)) && ( )) && (
<> <>
{showRepButton(detailsObj.appealType) ? ( {showRepButton(Number(appealType)) ? (
<>
{/* <Link
href={{
pathname:
"/myportal/representation",
query: {
case: detailsObj.pinswg_name,
},
}}
className="govuk-button"
>
{t(
"case:summary-make-representation-label"
)}
</Link> */}
<div className="govuk-body govuk-!-font-size-14"> <div className="govuk-body govuk-!-font-size-14">
{appealType == 846040002 {appealType == 846040002
? t( ? t("case:summary-consultation-open-label")
"case:summary-consultation-open-label"
)
: t( : t(
"case:summary-representation-open-label" "case:summary-representation-open-label"
)}{" "} )}{" "}
</div> </div>
</> ) : !canShowRepresentationButtonForAppealType(
) : !isLPA && appealType == 846040004 ? ( appealType
) ||
(!isLPA && appealType == 846040004) ? (
"" ""
) : ( ) : (
<> <>