Merged PR 2407: Extract representation entry specialist rules to domain policy

Extract representation entry specialist rules to domain policy

Related work items: #23754
This commit is contained in:
Robert Bond
2026-06-19 11:21:17 +00:00
parent be68b987a1
commit e195e09429
4 changed files with 54 additions and 18 deletions
@@ -4,7 +4,9 @@ import {
isRepresentationWindowClosed,
canShowRepresentationButtonForAppealType,
canStartHouseholderRepresentation,
canStartCpoRepresentation
canStartCpoRepresentation,
canStartRowRepresentation,
canStartAdvertRepresentation
} from "../../../../lib/domain/representation-policy";
export function showRepsLocal(startDate, endDate) {
@@ -40,25 +42,17 @@ export function canShowRepButtonForAppealType({
return canStartHouseholderRepresentation(appealType, isLPA);
case 846040015:
return searchDetailsObj[0].value[0].pinswg_specialistcaseprocess ==
846040001
? showRepsLocal(
searchDetailsObj[0].value[0].pinswg_startdate,
searchDetailsObj[0].value[0].pinswg_finalcommentsduedate
)
: true;
return canStartRowRepresentation(
appealType,
searchDetailsObj[0].value[0]
);
case 846040018:
let shouldShow =
searchDetailsObj[0].value[0].pinswg_speacialistcaseprocess ==
846040000 && isLPA
? true
: searchDetailsObj[0].value[0]
.pinswg_speacialistcaseprocess == 846040001
? true
: false;
return shouldShow;
return canStartAdvertRepresentation(
appealType,
searchDetailsObj[0].value[0],
isLPA
);
case 846040019:
return canStartCpoRepresentation(