From 7b6af580659024dbbdb3a7befb96204d18566211 Mon Sep 17 00:00:00 2001 From: Robert Bond Date: Mon, 29 Jun 2026 08:39:39 +0000 Subject: [PATCH] Merged PR 2441: electricity shouldnt be showing reps available electricity shouldnt be showing reps available Related work items: #24008 --- .../case/summary/utils/representationEntry.js | 3 ++ components/search/repsonresults.js | 40 ++++++------------- 2 files changed, 16 insertions(+), 27 deletions(-) diff --git a/components/case/summary/utils/representationEntry.js b/components/case/summary/utils/representationEntry.js index 4e06168f..ec65162c 100644 --- a/components/case/summary/utils/representationEntry.js +++ b/components/case/summary/utils/representationEntry.js @@ -72,6 +72,9 @@ export function getEntryCtaLabelKey(appealType) { } export function shouldSuppressBlockedMessage({ appealType, isLPA }) { + if (!canShowRepresentationButtonForAppealType(appealType)) { + return true; + } return !isLPA && appealType == 846040004; } diff --git a/components/search/repsonresults.js b/components/search/repsonresults.js index b145f2b3..0853548e 100644 --- a/components/search/repsonresults.js +++ b/components/search/repsonresults.js @@ -24,6 +24,7 @@ const RepsOnResults = (props) => { Object.prototype.hasOwnProperty.call(obj || {}, key); function showRepButton(appealType) { + appealType = Number(appealType); if (!canShowRepresentationButtonForAppealType(appealType)) { return false; } @@ -90,33 +91,18 @@ const RepsOnResults = (props) => { detailsObj.pinswg_consultationclose )) && ( <> - {showRepButton(detailsObj.appealType) ? ( - <> - {/* - {t( - "case:summary-make-representation-label" - )} - */} -
- {appealType == 846040002 - ? t( - "case:summary-consultation-open-label" - ) - : t( - "case:summary-representation-open-label" - )}{" "} -
- - ) : !isLPA && appealType == 846040004 ? ( + {showRepButton(Number(appealType)) ? ( +
+ {appealType == 846040002 + ? t("case:summary-consultation-open-label") + : t( + "case:summary-representation-open-label" + )}{" "} +
+ ) : !canShowRepresentationButtonForAppealType( + appealType + ) || + (!isLPA && appealType == 846040004) ? ( "" ) : ( <>