reps for dns
This commit is contained in:
@@ -132,6 +132,9 @@ let MakeRepresentation = (props) => {
|
||||
case "Final comments":
|
||||
repType = "Comments";
|
||||
break;
|
||||
case "Local Impact Report":
|
||||
repType = "Impact";
|
||||
break;
|
||||
|
||||
case "Other":
|
||||
repType = "OTHER";
|
||||
@@ -224,22 +227,59 @@ let MakeRepresentation = (props) => {
|
||||
|
||||
let todaysDate = new Date();
|
||||
|
||||
let startDate = new Date(detailsObj.pinswg_startdate);
|
||||
let questionnaireDate = new Date(
|
||||
detailsObj.pinswg_questionnaireduedate
|
||||
);
|
||||
let finalCommentsDate = new Date(
|
||||
detailsObj.pinswg_finalcommentsduedate
|
||||
);
|
||||
let statementDueDate = new Date(detailsObj.pinswg_statementduedate);
|
||||
const isDNS = currentView.caseReference.appealType == 846040011;
|
||||
|
||||
let startDate;
|
||||
let questionnaireDate;
|
||||
let finalCommentsDate;
|
||||
let statementDueDate;
|
||||
|
||||
isDNS
|
||||
? ((startDate = new Date(
|
||||
detailsObj.pinswg_applicationacceptedasvalid
|
||||
)),
|
||||
(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
|
||||
)));
|
||||
|
||||
isLPA &&
|
||||
currentView.caseReference.appealType != 846040019 &&
|
||||
currentView.caseReference.appealType != 846040011 &&
|
||||
todaysDate >= startDate &&
|
||||
todaysDate <= questionnaireDate &&
|
||||
buildArr.push("Questionnaire");
|
||||
|
||||
todaysDate >= startDate &&
|
||||
isLPA &&
|
||||
isDNS &&
|
||||
currentView.caseReference.appealType != 846040019 &&
|
||||
todaysDate >= startDate &&
|
||||
todaysDate <= questionnaireDate &&
|
||||
buildArr.push("Local Impact Report");
|
||||
|
||||
!isDNS &&
|
||||
todaysDate >= startDate &&
|
||||
todaysDate <= statementDueDate &&
|
||||
buildArr.push("Statement");
|
||||
|
||||
isDNS &&
|
||||
!isLPA &&
|
||||
todaysDate >= startDate &&
|
||||
todaysDate <= statementDueDate &&
|
||||
buildArr.push("Statement");
|
||||
|
||||
@@ -909,18 +949,29 @@ let MakeRepresentation = (props) => {
|
||||
<h2 className="govuk-heading-s">
|
||||
{t(
|
||||
"myrepresentations:timetable-title"
|
||||
)}
|
||||
)}{" "}
|
||||
{currentView.caseReference
|
||||
.appealType ==
|
||||
846040011}
|
||||
</h2>
|
||||
<div className="govuk-summary-list">
|
||||
<div className="govuk-body-s">
|
||||
{t(
|
||||
"myrepresentations:questionnaire-due-label"
|
||||
)}
|
||||
{currentView
|
||||
.caseReference
|
||||
.appealType ==
|
||||
846040011
|
||||
? t(
|
||||
"myrepresentations:local-impact-report"
|
||||
)
|
||||
: t(
|
||||
"myrepresentations:questionnaire-due-label"
|
||||
)}
|
||||
:
|
||||
<span className="govuk-body-s">
|
||||
{" "}
|
||||
{formatDates(
|
||||
detailsObj.pinswg_questionnaireduedate
|
||||
detailsObj.pinswg_questionnaireduedate ||
|
||||
detailsObj.pinswg_endofrepresentationperiod
|
||||
)}
|
||||
</span>
|
||||
</div>
|
||||
@@ -933,22 +984,27 @@ let MakeRepresentation = (props) => {
|
||||
{" "}
|
||||
{formatDates(
|
||||
detailsObj.pinswg_statementduedate ||
|
||||
detailsObj.pinswg_statementsduedate
|
||||
detailsObj.pinswg_statementsduedate ||
|
||||
detailsObj.pinswg_endofrepresentationperiod
|
||||
)}
|
||||
</span>
|
||||
</div>
|
||||
<div className="govuk-body-s">
|
||||
{t(
|
||||
"myrepresentations:final-comments-due-label"
|
||||
)}
|
||||
:
|
||||
<span className="govuk-body-s">
|
||||
{" "}
|
||||
{formatDates(
|
||||
detailsObj.pinswg_finalcommentsduedate
|
||||
{currentView.caseReference
|
||||
.appealType !=
|
||||
846040011 && (
|
||||
<div className="govuk-body-s">
|
||||
{t(
|
||||
"myrepresentations:final-comments-due-label"
|
||||
)}
|
||||
</span>
|
||||
</div>
|
||||
:
|
||||
<span className="govuk-body-s">
|
||||
{" "}
|
||||
{formatDates(
|
||||
detailsObj.pinswg_finalcommentsduedate
|
||||
)}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>{" "}
|
||||
|
||||
Reference in New Issue
Block a user