Extract representation entry specialist rules to domain policy Related work items: #23754
24 lines
620 B
JavaScript
24 lines
620 B
JavaScript
import { isRepresentationWindowOpen } from "./resolveRepresentationWindow";
|
|
|
|
const ROW_APPEAL_TYPE = 846040015;
|
|
const HEARING_SPECIALIST_PROCESS = 846040001;
|
|
|
|
export function canStartRowRepresentation(
|
|
appealType,
|
|
caseDetails,
|
|
DateCtor = Date
|
|
) {
|
|
if (Number(appealType) !== ROW_APPEAL_TYPE) {
|
|
return true;
|
|
}
|
|
|
|
return caseDetails?.pinswg_specialistcaseprocess ==
|
|
HEARING_SPECIALIST_PROCESS
|
|
? isRepresentationWindowOpen(
|
|
caseDetails?.pinswg_startdate,
|
|
caseDetails?.pinswg_finalcommentsduedate,
|
|
DateCtor
|
|
)
|
|
: true;
|
|
}
|