reps defect 43 - also handles not submitting reps when date passed
This commit is contained in:
@@ -271,12 +271,24 @@ let MakeRepresentation = (props) => {
|
||||
|
||||
resultsObj = resultsObj[0];
|
||||
|
||||
detailsObj = jsonpath(
|
||||
'$..[?(@.pinswg_name=="' +
|
||||
currentView.caseReference.currentReference +
|
||||
'")]',
|
||||
setCaseDetailsObj
|
||||
);
|
||||
detailsObj = router.query.hasOwnProperty("state")
|
||||
? router.query.state == "edit"
|
||||
? jsonpath(
|
||||
'$..[?(@.repfile_name =="' + router.query.created + '")]',
|
||||
setCaseDetailsObj
|
||||
)
|
||||
: jsonpath(
|
||||
'$..[?(@.pinswg_name =="' +
|
||||
currentView.caseReference.currentReference +
|
||||
'")]',
|
||||
setCaseDetailsObj
|
||||
)
|
||||
: jsonpath(
|
||||
'$..[?(@.pinswg_name =="' +
|
||||
currentView.caseReference.currentReference +
|
||||
'")]',
|
||||
setCaseDetailsObj
|
||||
);
|
||||
|
||||
detailsObj = detailsObj[0];
|
||||
|
||||
@@ -409,12 +421,11 @@ let MakeRepresentation = (props) => {
|
||||
const whichControl = () => {
|
||||
if (
|
||||
isLPA &&
|
||||
_.isEmpty(
|
||||
currentView.representationCapacity ||
|
||||
(currentView.caseReference.hasOwnProperty("repDetails") &&
|
||||
currentView.caseReference.repDetails
|
||||
.representationCapacity)
|
||||
)
|
||||
_.isEmpty(currentView.representationCapacity)
|
||||
// ||
|
||||
// (isLPA &&
|
||||
// currentView.caseReference.hasOwnProperty("repDetails") &&
|
||||
// !currentView.caseReference.repDetails.representationCapacity)
|
||||
) {
|
||||
return (
|
||||
//setRepresentationCapacity("LPA"),
|
||||
@@ -502,7 +513,7 @@ let MakeRepresentation = (props) => {
|
||||
// setRepresentationCapacity("LPA");
|
||||
// }, []);
|
||||
|
||||
// console.log(currentView.caseReference.appealType);
|
||||
console.log(currentView.caseReference.appealType);
|
||||
return (
|
||||
<RepLPA
|
||||
formObj={formObj}
|
||||
@@ -789,10 +800,14 @@ let MakeRepresentation = (props) => {
|
||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
"_pinswg_localplanningauthority_value":
|
||||
detailsObj["_pinswg_localplanningauthority_value"],
|
||||
detailsObj["_pinswg_localplanningauthority_value"] ||
|
||||
detailsObj["_pinswg_associatedlpa_value"],
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue":
|
||||
detailsObj[
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
detailsObj[
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
"representationCapacity": router.query.hasOwnProperty("state")
|
||||
? router.query.state == "edit"
|
||||
@@ -970,10 +985,14 @@ let MakeRepresentation = (props) => {
|
||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
"_pinswg_localplanningauthority_value":
|
||||
detailsObj["_pinswg_localplanningauthority_value"],
|
||||
detailsObj["_pinswg_localplanningauthority_value"] ||
|
||||
detailsObj["_pinswg_associatedlpa_value"],
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue":
|
||||
detailsObj[
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
detailsObj[
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
"representationCapacity": router.query.hasOwnProperty("state")
|
||||
? router.query.state == "edit"
|
||||
|
||||
Reference in New Issue
Block a user