Merged PR 1146: lpa rep pdf tweaks

lpa rep pdf tweaks

Related work items: #8422
This commit is contained in:
Robert Bond
2024-05-09 17:43:33 +00:00
10 changed files with 139 additions and 105 deletions
+56 -2
View File
@@ -393,6 +393,55 @@ let MakeRepresentation = (props) => {
const buildFileArray = []; const buildFileArray = [];
setSavingStatus(useSaveStatus); 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", // "pinswg_name": "2022-11-29-IP-REP_BOND_1",
const repDate = new Date(); const repDate = new Date();
@@ -525,7 +574,7 @@ let MakeRepresentation = (props) => {
router.query.hasOwnProperty("state") && router.query.hasOwnProperty("state") &&
router.query.state == "edit" && router.query.state == "edit" &&
setRepresentationSubmit(true); setRepresentationSubmit(false);
var detailsObj = {}; var detailsObj = {};
@@ -609,7 +658,8 @@ let MakeRepresentation = (props) => {
) )
: questionnaireCount != 0 && : questionnaireCount != 0 &&
showQuestionnaireSection < questionnaireCount showQuestionnaireSection < questionnaireCount
? setShowQuestionnaireSection(showQuestionnaireSection + 1) ? (setShowQuestionnaireSection(showQuestionnaireSection + 1),
updateRepresentation(values, false, false))
: setRepresentationSubmit(true) : setRepresentationSubmit(true)
: currentView.representationSubmit == true : currentView.representationSubmit == true
? (console.log("capacity", currentView.representationCapacity), ? (console.log("capacity", currentView.representationCapacity),
@@ -627,6 +677,10 @@ let MakeRepresentation = (props) => {
Object.assign(values, { Object.assign(values, {
"filesList": buildFileArray, "filesList": buildFileArray,
})), })),
console.log(
"====================== rep lpa payload:\n",
JSON.stringify(values)
),
generateRepPDF( generateRepPDF(
values, values,
props.props.accountDetails.containerID, props.props.accountDetails.containerID,
@@ -228,8 +228,11 @@ let RepLPA = (props) => {
<> <>
<div className="govuk-grid-row"> <div className="govuk-grid-row">
<div className="govuk-form-group"> <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 "> <h2 className="govuk-heading-m ">
{typeof props.representationType != "undefined" {typeof props.representationType != "undefined"
@@ -356,6 +359,7 @@ let RepLPA = (props) => {
{typeof props.representationType != "undefined" && {typeof props.representationType != "undefined" &&
props.representationType == "Questionnaire" && ( props.representationType == "Questionnaire" && (
<> <>
{showQuestionnaireSection}
{showQuestionnaireSection <= {showQuestionnaireSection <=
questionnaireCount && ( questionnaireCount && (
<button <button
@@ -363,7 +367,9 @@ let RepLPA = (props) => {
className="govuk-button" className="govuk-button"
data-module="govuk-button" data-module="govuk-button"
> >
{t("common:continue-button")} {t("common:continue-button")} www
{showQuestionnaireSection} -{" "}
{questionnaireCount}
</button> </button>
// <a // <a
// href="#" // href="#"
@@ -377,13 +383,15 @@ let RepLPA = (props) => {
// Next section // Next section
// </a> // </a>
)} )}
{showQuestionnaireSection == 9 && ( {showQuestionnaireSection ==
questionnaireCount && (
<button <button
type="submit" type="submit"
className="govuk-button" className="govuk-button"
data-module="govuk-button" data-module="govuk-button"
> >
{t("common:continue-button")} {t("common:continue-button")} -{" "}
{showQuestionnaireSection}
</button> </button>
)} )}
{showQuestionnaireSection > 1 && ( {showQuestionnaireSection > 1 && (
@@ -408,7 +416,7 @@ let RepLPA = (props) => {
className="govuk-button" className="govuk-button"
data-module="govuk-button" data-module="govuk-button"
> >
{t("common:continue-button")} {t("common:continue-button")} ==
</button> </button>
<a <a
onClick={() => { onClick={() => {
@@ -30,6 +30,7 @@ let RepLPACapacitySelection = (props) => {
capacityOptionsArr, capacityOptionsArr,
currentType, currentType,
casesObj, casesObj,
detailsObj,
validate, validate,
handleSubmit, handleSubmit,
} = props; } = props;
@@ -48,6 +49,7 @@ let RepLPACapacitySelection = (props) => {
formObj={formObj} formObj={formObj}
currentType={currentType} currentType={currentType}
casesObj={casesObj} casesObj={casesObj}
detailsObj={detailsObj}
caseReference={props.props.caseReference} caseReference={props.props.caseReference}
searchResultsObj={props.props.searchResultsObj} searchResultsObj={props.props.searchResultsObj}
props={props.props} props={props.props}
@@ -819,10 +819,9 @@ let Enforcement_Questionnaire = (props) => {
errorMsg={t("newappeal:select-an-option-label")} errorMsg={t("newappeal:select-an-option-label")}
component={RenderLPACondtionalRadioList} component={RenderLPACondtionalRadioList}
validate={[required]} validate={[required]}
legend={ legend={t(
"a) " + "myrepresentations:enf-section-question-31a"
t("myrepresentations:enf-section-question-31a") )}
}
conditionalLabel={t( conditionalLabel={t(
"myrepresentations:enf-section-question-31a-hint" "myrepresentations:enf-section-question-31a-hint"
)} )}
@@ -832,10 +831,7 @@ let Enforcement_Questionnaire = (props) => {
/> />
</div> </div>
<Field <Field
label={ label={t("myrepresentations:enf-section-question-31b")}
"b) " +
t("myrepresentations:enf-section-question-31b")
}
name="developmentNotTakePlaceBiodiversity" name="developmentNotTakePlaceBiodiversity"
id="developmentNotTakePlaceBiodiversity" id="developmentNotTakePlaceBiodiversity"
component={RenderRadioList} component={RenderRadioList}
@@ -849,10 +845,7 @@ let Enforcement_Questionnaire = (props) => {
aria-describedby={props.name + "-hint"} aria-describedby={props.name + "-hint"}
/> />
<Field <Field
label={ label={t("myrepresentations:enf-section-question-31c")}
"c) " +
t("myrepresentations:enf-section-question-31c")
}
name="developmentNotTakePlaceBroadband" name="developmentNotTakePlaceBroadband"
id="developmentNotTakePlaceBroadband" id="developmentNotTakePlaceBroadband"
component={RenderRadioList} component={RenderRadioList}
@@ -628,10 +628,7 @@ let S78_Questionnaire = (props) => {
</div> </div>
<Field <Field
label={ label={t("myrepresentations:s78-section-question-24a")}
"a) " +
t("myrepresentations:s78-section-question-24a")
}
name="developmentNotBeginLaterThanFiveYears" name="developmentNotBeginLaterThanFiveYears"
id="developmentNotBeginLaterThanFiveYears" id="developmentNotBeginLaterThanFiveYears"
component={RenderRadioList} component={RenderRadioList}
@@ -659,10 +656,9 @@ let S78_Questionnaire = (props) => {
errorMsg={t("newappeal:select-an-option-label")} errorMsg={t("newappeal:select-an-option-label")}
component={RenderLPACondtionalRadioList} component={RenderLPACondtionalRadioList}
validate={[required]} validate={[required]}
legend={ legend={t(
"b) " + "myrepresentations:s78-section-question-24b"
t("myrepresentations:s78-section-question-24b") )}
}
conditionalLabel={t( conditionalLabel={t(
"myrepresentations:s78-section-question-24b-hint" "myrepresentations:s78-section-question-24b-hint"
)} )}
@@ -672,10 +668,7 @@ let S78_Questionnaire = (props) => {
/> />
</div> </div>
<Field <Field
label={ label={t("myrepresentations:s78-section-question-24c")}
"c) " +
t("myrepresentations:s78-section-question-24c")
}
name="developmentNotTakePlaceBiodiversity" name="developmentNotTakePlaceBiodiversity"
id="developmentNotTakePlaceBiodiversity" id="developmentNotTakePlaceBiodiversity"
component={RenderRadioList} component={RenderRadioList}
@@ -690,10 +683,7 @@ let S78_Questionnaire = (props) => {
validate={[required]} validate={[required]}
/> />
<Field <Field
label={ label={t("myrepresentations:s78-section-question-24d")}
"d) " +
t("myrepresentations:s78-section-question-24d")
}
name="developmentNotTakePlaceBroadband" name="developmentNotTakePlaceBroadband"
id="developmentNotTakePlaceBroadband" id="developmentNotTakePlaceBroadband"
component={RenderRadioList} component={RenderRadioList}
+36 -55
View File
@@ -96,7 +96,6 @@ const styles = StyleSheet.create({
richArea: { richArea: {
fontSize: 12, fontSize: 12,
color: "red",
flexDirection: "column", flexDirection: "column",
}, },
}); });
@@ -113,7 +112,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
return dd + "/" + mm + "/" + yyyy; return dd + "/" + mm + "/" + yyyy;
} }
let values = docProps; let values = docProps;
console.log("//////////////////////\n docprops:".docProps); console.log("//////////////////////\n docprops:", docProps);
let appealTypeValue = getFormCollectionByID(values.appealType); let appealTypeValue = getFormCollectionByID(values.appealType);
console.log("sdffhjdhjdjdgkj: ", values.procedureType); console.log("sdffhjdhjdjdgkj: ", values.procedureType);
@@ -156,7 +155,6 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
alt="PEDW Logo" alt="PEDW Logo"
/> />
</View> </View>
<View> <View>
<Text style={{ marginTop: 10, fontSize: 14 }}> <Text style={{ marginTop: 10, fontSize: 14 }}>
{getTrans(docProps.locale, "s78-heading-para-two")} {getTrans(docProps.locale, "s78-heading-para-two")}
@@ -388,9 +386,8 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
"Yes" && ( "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{ {values.enterNeighbouringLandAccessRequiredEvidence ||
values.enterNeighbouringLandAccessRequiredEvidence ""}
}
</Html> </Html>
</View> </View>
)} )}
@@ -423,9 +420,8 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
{values.healthAndSafetyIssues == "Yes" && ( {values.healthAndSafetyIssues == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{ {values.healthAndSafetyIssuesEvidence ||
values.healthAndSafetyIssuesEvidence ""}
}
</Html> </Html>
</View> </View>
)} )}
@@ -461,6 +457,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
</View> </View>
</View> </View>
</View> </View>
<View> <View>
<View <View
style={{ style={{
@@ -617,7 +614,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
{values.ROW == "Yes" && ( {values.ROW == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.ROWEvidence} {values.ROWEvidence || ""}
</Html> </Html>
</View> </View>
)} )}
@@ -650,7 +647,8 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
{values.conservationArea == "Yes" && ( {values.conservationArea == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.conservationAreaEvidence} {values.conservationAreaEvidence ||
""}
</Html> </Html>
</View> </View>
)} )}
@@ -683,9 +681,8 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
{values.affectListedBuilding == "Yes" && ( {values.affectListedBuilding == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{ {values.affectListedBuildingEvidence ||
values.affectListedBuildingEvidence ""}
}
</Html> </Html>
</View> </View>
)} )}
@@ -718,7 +715,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
{values.TPO == "Yes" && ( {values.TPO == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.TPOEvidence} {values.TPOEvidence || ""}
</Html> </Html>
</View> </View>
)} )}
@@ -751,9 +748,8 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
{values.natureConservationSite == "Yes" && ( {values.natureConservationSite == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{ {values.natureConservationSiteEvidence ||
values.natureConservationSiteEvidence ""}
}
</Html> </Html>
</View> </View>
)} )}
@@ -786,7 +782,8 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
{values.protectedSpecies == "Yes" && ( {values.protectedSpecies == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.protectedSpeciesEvidence} {values.protectedSpeciesEvidence ||
""}
</Html> </Html>
</View> </View>
)} )}
@@ -838,9 +835,8 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
"Yes" && ( "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{ {values.governmentDepartmentCommentsEvidence ||
values.governmentDepartmentCommentsEvidence ""}
}
</Html> </Html>
</View> </View>
)} )}
@@ -928,9 +924,8 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
"Yes" && ( "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{ {values.developmentCarriedOutInAccordanceEvidence ||
values.developmentCarriedOutInAccordanceEvidence ""}
}
</Html> </Html>
</View> </View>
)} )}
@@ -1000,9 +995,8 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
"Yes" && ( "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{ {values.developmentAnyOtherConditionsEvidence ||
values.developmentAnyOtherConditionsEvidence ""}
}
</Html> </Html>
</View> </View>
)} )}
@@ -1051,13 +1045,11 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
</View> </View>
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{ {values.copyOfApplicantsCertificateEvidence ||
values.copyOfApplicantsCertificateEvidence ""}
}
</Html> </Html>
</View> </View>
</View> </View>
<View <View
style={{ style={{
flexDirection: "column", flexDirection: "column",
@@ -1086,11 +1078,10 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.advertismentGivenEvidence} {values.advertismentGivenEvidence || ""}
</Html> </Html>
</View> </View>
</View> </View>
<View <View
style={{ style={{
flexDirection: "column", flexDirection: "column",
@@ -1120,13 +1111,11 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
</View> </View>
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{ {values.copyOfLetterOfAppealNotificationEvidence ||
values.copyOfLetterOfAppealNotificationEvidence ""}
}
</Html> </Html>
</View> </View>
</View> </View>
<View <View
style={{ style={{
flexDirection: "column", flexDirection: "column",
@@ -1155,12 +1144,11 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
{values.lpaEIAOS == "Yes" && ( {values.lpaEIAOS == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{values.lpaEIAOSEvidence} {values.lpaEIAOSEvidence || ""}
</Html> </Html>
</View> </View>
)} )}
</View> </View>
<View <View
style={{ style={{
flexDirection: "column", flexDirection: "column",
@@ -1192,14 +1180,12 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
"Yes" && ( "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{ {values.advertismentConsentDiscontinuanceNoticeEvidence ||
values.advertismentConsentDiscontinuanceNoticeEvidence ""}
}
</Html> </Html>
</View> </View>
)} )}
</View> </View>
<View <View
style={{ style={{
flexDirection: "column", flexDirection: "column",
@@ -1228,14 +1214,12 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
{values.detailsOfOtherAppeals == "Yes" && ( {values.detailsOfOtherAppeals == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{ {values.detailsOfOtherAppealsEvidence ||
values.detailsOfOtherAppealsEvidence ""}
}
</Html> </Html>
</View> </View>
)} )}
</View> </View>
<View <View
style={{ style={{
flexDirection: "column", flexDirection: "column",
@@ -1264,14 +1248,12 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
{values.detailsOfPreviousAppeals == "Yes" && ( {values.detailsOfPreviousAppeals == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{ {values.detailsOfPreviousAppealsEvidence ||
values.detailsOfPreviousAppealsEvidence ""}
}
</Html> </Html>
</View> </View>
)} )}
</View> </View>
<View <View
style={{ style={{
flexDirection: "column", flexDirection: "column",
@@ -1300,9 +1282,8 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
{values.otherRelevantInformation == "Yes" && ( {values.otherRelevantInformation == "Yes" && (
<View style={styles.questionAnswerWide}> <View style={styles.questionAnswerWide}>
<Html style={styles.richArea}> <Html style={styles.richArea}>
{ {values.otherRelevantInformationEvidence ||
values.otherRelevantInformationEvidence ""}
}
</Html> </Html>
</View> </View>
)} )}
@@ -8,7 +8,6 @@ import ReactPDF, {
PDFViewer, PDFViewer,
Font, Font,
} from "@react-pdf/renderer"; } from "@react-pdf/renderer";
import { createElement } from "react";
import Html from "react-pdf-html"; import Html from "react-pdf-html";
import { getFormCollectionByID, bytesToSize } from "../utils"; import { getFormCollectionByID, bytesToSize } from "../utils";
import fs from "fs"; import fs from "fs";
+1
View File
@@ -97,6 +97,7 @@
"s78-section-question-32-hint": "Os Oes, rhowch y rhif(au) cyfeirnod ar cyfeiriad(au) ac atodwch neu mewnosodwch ddolenni ir penderfyniad(au) ac unrhyw ddogfennau cais perthnasol", "s78-section-question-32-hint": "Os Oes, rhowch y rhif(au) cyfeirnod ar cyfeiriad(au) ac atodwch neu mewnosodwch ddolenni ir penderfyniad(au) ac unrhyw ddogfennau cais perthnasol",
"s78-section-question-33": "Unrhyw wybodaeth berthnasol arall y dylem wybod amdani?", "s78-section-question-33": "Unrhyw wybodaeth berthnasol arall y dylem wybod amdani?",
"s78-section-question-33-hint": "Os Oes, rhowch ddisgrifiad byr ac atodwch neu mewnosodwch ddolenni i'r manylion perthnasol", "s78-section-question-33-hint": "Os Oes, rhowch ddisgrifiad byr ac atodwch neu mewnosodwch ddolenni i'r manylion perthnasol",
"s78-section-heading-six": "Ychwanegu eich ffeiliau",
"s78-section-heading-seven": "Datganiad", "s78-section-heading-seven": "Datganiad",
"s78-section-question-signed": "Llofnodwyd", "s78-section-question-signed": "Llofnodwyd",
"s78-section-question-onbehalf": "Ar ran", "s78-section-question-onbehalf": "Ar ran",
+2 -1
View File
@@ -87,7 +87,7 @@
"s78-section-question-27-hint": "Insert weblink here if available online. If No, give reasons", "s78-section-question-27-hint": "Insert weblink here if available online. If No, give reasons",
"s78-section-question-28": "A copy of the letter with which you notified people of the appeal AND a list of the people you notified?", "s78-section-question-28": "A copy of the letter with which you notified people of the appeal AND a list of the people you notified?",
"s78-section-question-28-hint": "Insert weblink here if available online. If No, give reasons", "s78-section-question-28-hint": "Insert weblink here if available online. If No, give reasons",
"s78-section-question-29": "he LPAs Environmental Impact Assessment Screening Opinion, if applicable?", "s78-section-question-29": "The LPAs Environmental Impact Assessment Screening Opinion, if applicable?",
"s78-section-question-29-hint": "Insert weblink here if available online. If No, give reasons", "s78-section-question-29-hint": "Insert weblink here if available online. If No, give reasons",
"s78-section-question-30": "Advertisement consent proposals only: A true copy of the Discontinuance Notice (if one has been issued)?", "s78-section-question-30": "Advertisement consent proposals only: A true copy of the Discontinuance Notice (if one has been issued)?",
"s78-section-question-30-hint": "If Yes, state how the use of the site or the display of the advertisement(s) enjoys the benefit of deemed consent", "s78-section-question-30-hint": "If Yes, state how the use of the site or the display of the advertisement(s) enjoys the benefit of deemed consent",
@@ -97,6 +97,7 @@
"s78-section-question-32-hint": "If Yes, provide the reference number(s) and address(es) and attach or insert links to the decision(s) and any relevant application documents", "s78-section-question-32-hint": "If Yes, provide the reference number(s) and address(es) and attach or insert links to the decision(s) and any relevant application documents",
"s78-section-question-33": "Any other relevant information that we should know about?", "s78-section-question-33": "Any other relevant information that we should know about?",
"s78-section-question-33-hint": "If Yes, provide a brief description and attach or insert links to the relevant details", "s78-section-question-33-hint": "If Yes, provide a brief description and attach or insert links to the relevant details",
"s78-section-heading-six": "Add your files",
"s78-section-heading-seven": "Declaration", "s78-section-heading-seven": "Declaration",
"s78-section-question-signed": "Signed", "s78-section-question-signed": "Signed",
"s78-section-question-onbehalf": "On behalf of", "s78-section-question-onbehalf": "On behalf of",
+17 -12
View File
@@ -116,7 +116,7 @@ export default async function handler(req, res) {
); );
console.log( console.log(
"//////////////////////\nreqBodyobj" + "//////////////////////\nreqBodyobj" +
req.body + JSON.stringify(req.body) +
"\n//////////////////////\n" "\n//////////////////////\n"
); );
@@ -227,16 +227,21 @@ export default async function handler(req, res) {
containerID, containerID,
caseRef, caseRef,
reqBodyobj.repfile_name reqBodyobj.repfile_name
).then((data) => { )
console.log( .then((data) => {
"///////////////////////////////////\nrep pdf file created: " + console.log(
`${caseRef}/files/${reqBodyobj.repfile_name}.pdf`, "///////////////////////////////////\nrep pdf file created: " +
"\n/////////////////////////" `${caseRef}/files/${reqBodyobj.repfile_name}.pdf`,
); "\n/////////////////////////"
return res.status(200).json({ );
status: "success", return res.status(200).json({
data: data, status: "success",
path: `${caseRef}/${reqBodyobj.repfile_name}/files/${reqBodyobj.repfile_name}.pdf`, data: data,
path: `${caseRef}/${reqBodyobj.repfile_name}/files/${reqBodyobj.repfile_name}.pdf`,
});
})
.catch((err) => {
console.log(consoleLogger(err));
res.status(400).json(err);
}); });
});
} }