Extract representation entry specialist rules to domain policy Related work items: #23754
18 lines
555 B
JavaScript
18 lines
555 B
JavaScript
const ADVERT_APPEAL_TYPE = 846040018;
|
|
const WRITTEN_REPS_SPECIALIST_PROCESS = 846040000;
|
|
const HEARING_SPECIALIST_PROCESS = 846040001;
|
|
|
|
export function canStartAdvertRepresentation(appealType, caseDetails, isLPA) {
|
|
if (Number(appealType) !== ADVERT_APPEAL_TYPE) {
|
|
return true;
|
|
}
|
|
|
|
const specialistProcess = caseDetails?.pinswg_speacialistcaseprocess;
|
|
|
|
return specialistProcess == WRITTEN_REPS_SPECIALIST_PROCESS && isLPA
|
|
? true
|
|
: specialistProcess == HEARING_SPECIALIST_PROCESS
|
|
? true
|
|
: false;
|
|
}
|