From 13cd2514c707843546e5fa24cfdca804d435dfab Mon Sep 17 00:00:00 2001 From: robbond Date: Mon, 30 Mar 2026 12:34:48 +0100 Subject: [PATCH] ip app lpa ip can raise final comments --- components/case/representation/index.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/components/case/representation/index.js b/components/case/representation/index.js index 4256bcbf..a67d1e1e 100644 --- a/components/case/representation/index.js +++ b/components/case/representation/index.js @@ -213,7 +213,7 @@ let MakeRepresentation = (props) => { }; default: return { - path: `$..[?(@ && @.reference=="${caseReference}")]`, + path: `$..[?(@ && @.ticketnumber=="${ticketnumber}")]`, json: setCaseQueryObj }; } @@ -437,9 +437,14 @@ let MakeRepresentation = (props) => { const isSpecialistNonHearing = specialistProcess !== 846040001; - const isAppellant = + const involvementType = props.props?.accountDetails?.accountDetails - ?.pinswg_typeofinvolvement === 846040001; + ?.pinswg_typeofinvolvement; + + const isAppellant = involvementType === 846040001; + const isAgent = involvementType === 846040000; + const isIP = involvementType === 846040061; + //const isLPA = involvementType === 846040000; const startDate = new Date( isDNS @@ -520,11 +525,15 @@ let MakeRepresentation = (props) => { addRep("Statement"); } + const canSubmitFinalComments = isAppellant || isAgent || isIP || isLPA; + const canAddFinalComments = - isAppellant && + canSubmitFinalComments && isWithin(statementDueDate, finalCommentsDate) && (appealType !== 846040004 || isSpecialistNonHearing); + // IP and Agents and LPA can do final comments. + if (canAddFinalComments) { addRep("Final comments"); } @@ -962,7 +971,7 @@ let MakeRepresentation = (props) => { // Find correct case details let detailsObj = jsonpath({ - path: `$..[?(@ && @.pinswg_name=="${caseReference}")]`, + path: `$..[?(@ && @.ticketnumber=="${ticketnumber}")]`, json: setCaseDetailsObj, eval: true })[0];