mutliple raise reps defects dates or button not showing
This commit is contained in:
@@ -220,6 +220,8 @@ let MakeRepresentation = (props) => {
|
||||
const buildRepsArr = (detailsObj) => {
|
||||
let buildArr = [];
|
||||
|
||||
console.log(currentView.caseReference.appealType);
|
||||
|
||||
let todaysDate = new Date();
|
||||
|
||||
let startDate = new Date(detailsObj.pinswg_startdate);
|
||||
@@ -240,7 +242,8 @@ let MakeRepresentation = (props) => {
|
||||
todaysDate <= statementDueDate &&
|
||||
buildArr.push("Statement");
|
||||
|
||||
todaysDate >= statementDueDate &&
|
||||
currentView.caseReference.appealType != 846040004 &&
|
||||
todaysDate >= statementDueDate &&
|
||||
todaysDate <= finalCommentsDate &&
|
||||
buildArr.push("Final comments");
|
||||
|
||||
@@ -920,7 +923,8 @@ let MakeRepresentation = (props) => {
|
||||
<span className="govuk-body-s">
|
||||
{" "}
|
||||
{formatDates(
|
||||
detailsObj.pinswg_statementduedate
|
||||
detailsObj.pinswg_statementduedate ||
|
||||
detailsObj.pinswg_statementsduedate
|
||||
)}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -86,6 +86,13 @@ const CaseSummary = (props) => {
|
||||
|
||||
const cookies = parseCookies();
|
||||
|
||||
const isLPA =
|
||||
props.accountDetails.accountDetails[
|
||||
"pinswg_typeofinvolvement@OData.Community.Display.V1.FormattedValue"
|
||||
] == "LPA"
|
||||
? true
|
||||
: false;
|
||||
|
||||
const selectWatchedCase = (loggedInUser, incidentID, appealType) => {
|
||||
let updateBody = {
|
||||
"pinswg_WatchedCase@odata.bind": "/incidents(" + incidentID + ")",
|
||||
@@ -411,10 +418,16 @@ const CaseSummary = (props) => {
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
<div className="govuk-button-group">
|
||||
{_.has(detailsObj, "pinswg_startdate") &&
|
||||
{(_.has(detailsObj, "pinswg_startdate") ||
|
||||
_.has(
|
||||
detailsObj,
|
||||
"pinswg_applicationacceptedasvalid"
|
||||
)) &&
|
||||
showReps(
|
||||
detailsObj.pinswg_startdate,
|
||||
detailsObj.pinswg_finalcommentsduedate
|
||||
detailsObj.pinswg_startdate ||
|
||||
detailsObj.pinswg_applicationacceptedasvalid,
|
||||
detailsObj.pinswg_finalcommentsduedate ||
|
||||
detailsObj.pinswg_endofrepresentationperiod
|
||||
) && (
|
||||
<>
|
||||
{showRepButton(
|
||||
@@ -457,6 +470,12 @@ const CaseSummary = (props) => {
|
||||
)}
|
||||
</a>
|
||||
</>
|
||||
) : !isLPA &&
|
||||
props.currentView
|
||||
.caseReference
|
||||
.appealType ==
|
||||
846040004 ? (
|
||||
""
|
||||
) : (
|
||||
<>
|
||||
<div className="govuk-grid-column-full govuk-!-padding-left-0">
|
||||
@@ -1054,20 +1073,24 @@ const CaseSummary = (props) => {
|
||||
}
|
||||
|
||||
function showRepButton(appealType) {
|
||||
console.log(appealType);
|
||||
switch (appealType) {
|
||||
case 846040012:
|
||||
case 846040013:
|
||||
case 846040014:
|
||||
case 846040015:
|
||||
//for ROW case 846040015:
|
||||
case 846040020:
|
||||
case 846040021:
|
||||
case 846040023:
|
||||
case 846040024:
|
||||
return false;
|
||||
case 846040004:
|
||||
return isLPA ? true : false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function showRepsEnded(startDate, endDate) {
|
||||
let date = new Date();
|
||||
date = new Date(date.toDateString());
|
||||
|
||||
@@ -314,13 +314,13 @@ const Pinswg_commonlandid = (props) => {
|
||||
<dd className="govuk-summary-list__value">
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_statementduedate"
|
||||
"pinswg_statementsduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_statementduedate
|
||||
detailsObj.pinswg_statementsduedate
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_statementduedate
|
||||
detailsObj.pinswg_statementsduedate
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
|
||||
Reference in New Issue
Block a user