diff --git a/actions/azurestorage.js b/actions/azurestorage.js index c6b100ff..7a86779f 100644 --- a/actions/azurestorage.js +++ b/actions/azurestorage.js @@ -419,16 +419,16 @@ export const createRepPDFBlob = async ( let whichLocation = repName.indexOf("_IP_") > 0 - ? "Interested Party Representations" + ? "846040005" : repName.indexOf("_Statement_") > 0 - ? "Main Party Statements" + ? "846040002" : repName.indexOf("_Questionnaire_") > 0 - ? "Main Party Questionnaire" + ? "846040001" : repName.indexOf("_Comments") > 0 - ? "Main Party Comments" + ? "846040003" : repName.indexOf("_Impact") > 0 - ? "Main Party Comments" - : "default"; + ? "846040001" + : "846040002"; const tags = { containerid: containerName, @@ -552,18 +552,18 @@ export const uploadFile = async (formContent, containerName, foldername) => { files[prop][0].fieldName.indexOf( "_-_S106_Agreement_or_Unilateral_Undertaking" > 0 ) - ? "Main Party Submission" + ? "846040000" : files[prop][0].fieldName.indexOf("_IP_") > 0 - ? "Interested Party Representations" + ? "846040005" : files[prop][0].fieldName.indexOf("_Statement_") > 0 - ? "Main Party Statements" + ? "846040002" : files[prop][0].fieldName.indexOf("_Questionnaire_") > 0 - ? "Main Party Questionnaire" + ? "846040001" : files[prop][0].fieldName.indexOf("_Comments_") > 0 - ? "Main Party Comments" + ? "846040003" : files[prop][0].fieldName.indexOf("_Impact_") > 0 - ? "Main Party Comments" - : "default"; + ? "846040001" + : "846040000"; const tags = { containerid: containerName, diff --git a/components/case/representation/index.js b/components/case/representation/index.js index b0669828..12f10348 100644 --- a/components/case/representation/index.js +++ b/components/case/representation/index.js @@ -241,29 +241,62 @@ let MakeRepresentation = (props) => { let statementDueDate; isDNS - ? ((startDate = new Date( - detailsObj.pinswg_applicationacceptedasvalid + ? (startDate = new Date( + new Date( + detailsObj.pinswg_applicationacceptedasvalid + ).setHours(23, 59, 59, 999) + ))( + (questionnaireDate = new Date( + new Date( + detailsObj.pinswg_endofrepresentationperiod + ).setHours(23, 59, 59, 999) + )) + )( + (finalCommentsDate = new Date( + new Date(detailsObj.pinswg_finalcommentsduedate).setHours( + 23, + 59, + 59, + 999 + ) + )) + )( + (statementDueDate = new Date( + new Date( + detailsObj.pinswg_endofrepresentationperiod + ).setHours(23, 59, 59, 999) + )) + ) + : (startDate = new Date( + new Date(detailsObj.pinswg_startdate).setHours( + 23, + 59, + 59, + 999 + ) )), - (questionnaireDate = new Date( - detailsObj.pinswg_endofrepresentationperiod - )), - (finalCommentsDate = new Date( - detailsObj.pinswg_finalcommentsduedate - )), - (statementDueDate = new Date( - detailsObj.pinswg_endofrepresentationperiod - ))) - : ((startDate = new Date(detailsObj.pinswg_startdate)), - (questionnaireDate = new Date( - detailsObj.pinswg_questionnaireduedate - )), - (finalCommentsDate = new Date( - detailsObj.pinswg_finalcommentsduedate - )), - (statementDueDate = new Date( - detailsObj.pinswg_statementduedate || - detailsObj.pinswg_statementsduedate - ))); + (questionnaireDate = new Date( + new Date(detailsObj.pinswg_questionnaireduedate).setHours( + 23, + 59, + 59, + 999 + ) + )), + (finalCommentsDate = new Date( + new Date(detailsObj.pinswg_finalcommentsduedate).setHours( + 23, + 59, + 59, + 999 + ) + )), + (statementDueDate = new Date( + new Date( + detailsObj.pinswg_statementduedate || + detailsObj.pinswg_statementsduedate + ).setHours(23, 59, 59, 999) + )); isLPA && currentView.caseReference.appealType != 846040019 && diff --git a/components/case/representation/representationLPA.js b/components/case/representation/representationLPA.js index 5c726306..e65c5d7c 100644 --- a/components/case/representation/representationLPA.js +++ b/components/case/representation/representationLPA.js @@ -100,6 +100,7 @@ let RepLPA = (props) => { case 846040003: case 846040009: case 846040008: + case 846040017: updateQuestionnaireCount(); return (