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,
|
||||
|
||||
@@ -228,8 +228,11 @@ let RepLPA = (props) => {
|
||||
<>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
{typeof formObj.representationForm.values
|
||||
.representationType == "undefined" ? (
|
||||
{!(
|
||||
"values" in formObj.representationForm &&
|
||||
"representationType" in
|
||||
formObj.representationForm.values
|
||||
) ? (
|
||||
<>
|
||||
<h2 className="govuk-heading-m ">
|
||||
{typeof props.representationType != "undefined"
|
||||
@@ -356,6 +359,7 @@ let RepLPA = (props) => {
|
||||
{typeof props.representationType != "undefined" &&
|
||||
props.representationType == "Questionnaire" && (
|
||||
<>
|
||||
{showQuestionnaireSection}
|
||||
{showQuestionnaireSection <=
|
||||
questionnaireCount && (
|
||||
<button
|
||||
@@ -363,7 +367,9 @@ let RepLPA = (props) => {
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
>
|
||||
{t("common:continue-button")}
|
||||
{t("common:continue-button")} www
|
||||
{showQuestionnaireSection} -{" "}
|
||||
{questionnaireCount}
|
||||
</button>
|
||||
// <a
|
||||
// href="#"
|
||||
@@ -377,13 +383,15 @@ let RepLPA = (props) => {
|
||||
// Next section
|
||||
// </a>
|
||||
)}
|
||||
{showQuestionnaireSection == 9 && (
|
||||
{showQuestionnaireSection ==
|
||||
questionnaireCount && (
|
||||
<button
|
||||
type="submit"
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
>
|
||||
{t("common:continue-button")}
|
||||
{t("common:continue-button")} -{" "}
|
||||
{showQuestionnaireSection}
|
||||
</button>
|
||||
)}
|
||||
{showQuestionnaireSection > 1 && (
|
||||
@@ -408,7 +416,7 @@ let RepLPA = (props) => {
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
>
|
||||
{t("common:continue-button")}
|
||||
{t("common:continue-button")} ==
|
||||
</button>
|
||||
<a
|
||||
onClick={() => {
|
||||
|
||||
@@ -30,6 +30,7 @@ let RepLPACapacitySelection = (props) => {
|
||||
capacityOptionsArr,
|
||||
currentType,
|
||||
casesObj,
|
||||
detailsObj,
|
||||
validate,
|
||||
handleSubmit,
|
||||
} = props;
|
||||
@@ -48,6 +49,7 @@ let RepLPACapacitySelection = (props) => {
|
||||
formObj={formObj}
|
||||
currentType={currentType}
|
||||
casesObj={casesObj}
|
||||
detailsObj={detailsObj}
|
||||
caseReference={props.props.caseReference}
|
||||
searchResultsObj={props.props.searchResultsObj}
|
||||
props={props.props}
|
||||
|
||||
+5
-12
@@ -819,10 +819,9 @@ let Enforcement_Questionnaire = (props) => {
|
||||
errorMsg={t("newappeal:select-an-option-label")}
|
||||
component={RenderLPACondtionalRadioList}
|
||||
validate={[required]}
|
||||
legend={
|
||||
"a) " +
|
||||
t("myrepresentations:enf-section-question-31a")
|
||||
}
|
||||
legend={t(
|
||||
"myrepresentations:enf-section-question-31a"
|
||||
)}
|
||||
conditionalLabel={t(
|
||||
"myrepresentations:enf-section-question-31a-hint"
|
||||
)}
|
||||
@@ -832,10 +831,7 @@ let Enforcement_Questionnaire = (props) => {
|
||||
/>
|
||||
</div>
|
||||
<Field
|
||||
label={
|
||||
"b) " +
|
||||
t("myrepresentations:enf-section-question-31b")
|
||||
}
|
||||
label={t("myrepresentations:enf-section-question-31b")}
|
||||
name="developmentNotTakePlaceBiodiversity"
|
||||
id="developmentNotTakePlaceBiodiversity"
|
||||
component={RenderRadioList}
|
||||
@@ -849,10 +845,7 @@ let Enforcement_Questionnaire = (props) => {
|
||||
aria-describedby={props.name + "-hint"}
|
||||
/>
|
||||
<Field
|
||||
label={
|
||||
"c) " +
|
||||
t("myrepresentations:enf-section-question-31c")
|
||||
}
|
||||
label={t("myrepresentations:enf-section-question-31c")}
|
||||
name="developmentNotTakePlaceBroadband"
|
||||
id="developmentNotTakePlaceBroadband"
|
||||
component={RenderRadioList}
|
||||
|
||||
+6
-16
@@ -628,10 +628,7 @@ let S78_Questionnaire = (props) => {
|
||||
</div>
|
||||
|
||||
<Field
|
||||
label={
|
||||
"a) " +
|
||||
t("myrepresentations:s78-section-question-24a")
|
||||
}
|
||||
label={t("myrepresentations:s78-section-question-24a")}
|
||||
name="developmentNotBeginLaterThanFiveYears"
|
||||
id="developmentNotBeginLaterThanFiveYears"
|
||||
component={RenderRadioList}
|
||||
@@ -659,10 +656,9 @@ let S78_Questionnaire = (props) => {
|
||||
errorMsg={t("newappeal:select-an-option-label")}
|
||||
component={RenderLPACondtionalRadioList}
|
||||
validate={[required]}
|
||||
legend={
|
||||
"b) " +
|
||||
t("myrepresentations:s78-section-question-24b")
|
||||
}
|
||||
legend={t(
|
||||
"myrepresentations:s78-section-question-24b"
|
||||
)}
|
||||
conditionalLabel={t(
|
||||
"myrepresentations:s78-section-question-24b-hint"
|
||||
)}
|
||||
@@ -672,10 +668,7 @@ let S78_Questionnaire = (props) => {
|
||||
/>
|
||||
</div>
|
||||
<Field
|
||||
label={
|
||||
"c) " +
|
||||
t("myrepresentations:s78-section-question-24c")
|
||||
}
|
||||
label={t("myrepresentations:s78-section-question-24c")}
|
||||
name="developmentNotTakePlaceBiodiversity"
|
||||
id="developmentNotTakePlaceBiodiversity"
|
||||
component={RenderRadioList}
|
||||
@@ -690,10 +683,7 @@ let S78_Questionnaire = (props) => {
|
||||
validate={[required]}
|
||||
/>
|
||||
<Field
|
||||
label={
|
||||
"d) " +
|
||||
t("myrepresentations:s78-section-question-24d")
|
||||
}
|
||||
label={t("myrepresentations:s78-section-question-24d")}
|
||||
name="developmentNotTakePlaceBroadband"
|
||||
id="developmentNotTakePlaceBroadband"
|
||||
component={RenderRadioList}
|
||||
|
||||
Reference in New Issue
Block a user