lpa rep pdf tweaks
This commit is contained in:
@@ -393,6 +393,55 @@ let MakeRepresentation = (props) => {
|
||||
const buildFileArray = [];
|
||||
setSavingStatus(useSaveStatus);
|
||||
|
||||
Object.assign(values, {
|
||||
"containerID": props.props.accountDetails.containerID,
|
||||
"appealType": props.props.currentView.caseReference.appealType,
|
||||
"incidentID": props.props.currentView.caseReference.incidentid,
|
||||
"caseRef": props.props.currentView.caseReference.currentReference,
|
||||
"pinswg_questionnaireduedate":
|
||||
detailsObj.pinswg_questionnaireduedate,
|
||||
"pinswg_statementduedate": detailsObj.pinswg_statementduedate,
|
||||
"pinswg_finalcommentsduedate":
|
||||
detailsObj.pinswg_finalcommentsduedate,
|
||||
"pinswg_name":
|
||||
props.props.currentView.caseReference.currentReference,
|
||||
"firstname": props.props.accountDetails.accountDetails.firstname,
|
||||
"lastname": props.props.accountDetails.accountDetails.lastname,
|
||||
"emailAddress":
|
||||
props.props.accountDetails.accountDetails.emailaddress1,
|
||||
"siteAddress":
|
||||
detailsObj.pinswg_siteaddressline1 +
|
||||
" " +
|
||||
detailsObj.pinswg_siteaddressline2 +
|
||||
" " +
|
||||
detailsObj.pinswg_siteaddresstown +
|
||||
" " +
|
||||
detailsObj.pinswg_siteaddresspostcode,
|
||||
"pinswg_siteaddressline1": detailsObj.pinswg_siteaddressline1,
|
||||
"pinswg_siteaddressline2": detailsObj.pinswg_siteaddressline2,
|
||||
"pinswg_siteaddresstown": detailsObj.pinswg_siteaddresstown,
|
||||
"pinswg_siteaddresspostcode": detailsObj.pinswg_siteaddresspostcode,
|
||||
"_pinswg_appellant_value": detailsObj["_pinswg_appellant_value"],
|
||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue":
|
||||
detailsObj[
|
||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
"_pinswg_localplanningauthority_value":
|
||||
detailsObj["_pinswg_localplanningauthority_value"],
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue":
|
||||
detailsObj[
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
"representationCapacity": router.query.hasOwnProperty("state")
|
||||
? router.query.state == "edit"
|
||||
? props.props.currentView.representationCapacity
|
||||
: values.representationCapacity
|
||||
: isLPA
|
||||
? "lpa"
|
||||
: values.representationCapacity,
|
||||
"locale": router.locale,
|
||||
});
|
||||
|
||||
// "pinswg_name": "2022-11-29-IP-REP_BOND_1",
|
||||
|
||||
const repDate = new Date();
|
||||
@@ -525,7 +574,7 @@ let MakeRepresentation = (props) => {
|
||||
|
||||
router.query.hasOwnProperty("state") &&
|
||||
router.query.state == "edit" &&
|
||||
setRepresentationSubmit(true);
|
||||
setRepresentationSubmit(false);
|
||||
|
||||
var detailsObj = {};
|
||||
|
||||
@@ -609,7 +658,8 @@ let MakeRepresentation = (props) => {
|
||||
)
|
||||
: questionnaireCount != 0 &&
|
||||
showQuestionnaireSection < questionnaireCount
|
||||
? setShowQuestionnaireSection(showQuestionnaireSection + 1)
|
||||
? (setShowQuestionnaireSection(showQuestionnaireSection + 1),
|
||||
updateRepresentation(values, false, false))
|
||||
: setRepresentationSubmit(true)
|
||||
: currentView.representationSubmit == true
|
||||
? (console.log("capacity", currentView.representationCapacity),
|
||||
@@ -627,6 +677,10 @@ let MakeRepresentation = (props) => {
|
||||
Object.assign(values, {
|
||||
"filesList": buildFileArray,
|
||||
})),
|
||||
console.log(
|
||||
"====================== rep lpa payload:\n",
|
||||
JSON.stringify(values)
|
||||
),
|
||||
generateRepPDF(
|
||||
values,
|
||||
props.props.accountDetails.containerID,
|
||||
|
||||
Reference in New Issue
Block a user