mutliple raise reps defects dates or button not showing
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user