From 87019693e2f38b8d199ee8e944623f00c000b912 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Fri, 2 Feb 2024 12:30:18 +0000 Subject: [PATCH] linked watched cases for all personnas --- .env.local | 2 +- components/case/representation/index.js | 19 +- .../representation/representationAgent.js | 24 +- .../representation/representationAppellant.js | 24 +- .../representation/representationDetails.js | 16 +- .../representation/representationElements.js | 9 - .../representationInterestedPartyPerson.js | 11 +- .../case/representation/representationLPA.js | 78 ++++-- .../representationLPADetails.js | 13 +- .../representation/representationLandowner.js | 24 -- .../representationLPAQuestionnaire_s78.js | 24 +- components/case/summary.js | 128 +++------- components/myportal.js | 231 +++++++++--------- components/myportal/topthree.js | 2 + components/myportal/watchedcases.js | 2 + components/pdftemplates/enforcement_pdf.js | 1 + .../pdftemplates/lpaQuestionnaire_pdf.js | 1 + locales/cy/myrepresentations.json | 3 + locales/en/myrepresentations.json | 4 + pages/api/file/generatepdf.js | 2 +- pages/case/index.js | 1 + pages/myportal/case.js | 4 +- pages/myportal/index.js | 3 + 23 files changed, 273 insertions(+), 353 deletions(-) diff --git a/.env.local b/.env.local index c66bb39a..648b6c0f 100644 --- a/.env.local +++ b/.env.local @@ -39,7 +39,7 @@ RELAYPATH = "dev-pedw-hc" GOOGLE_TAG_MANAGER = GTM-T78CBC3 -SHOWLOGIN = false +SHOWLOGIN = true SHOWREPRESENTATIONS = false SHOWFILEUPLOAD = "false" SHOWMAPS = "false" diff --git a/components/case/representation/index.js b/components/case/representation/index.js index 6f1e72e5..eeaaac86 100644 --- a/components/case/representation/index.js +++ b/components/case/representation/index.js @@ -75,6 +75,7 @@ let MakeRepresentation = (props) => { var casesObj = {}; const [showQuestionnaireSection, setShowQuestionnaireSection] = useState(1); + const [questionnaireCount, setQuestionnaireCount] = useState(0); const isLPA = props.props.accountDetails.accountDetails[ @@ -107,6 +108,8 @@ let MakeRepresentation = (props) => { ? router.query.state == "edit" ? props.props.myRepresentations.myRepresentations : props.props.searchResultsObj.searchDetailsObj + : props.currentType == "watchedCases" + ? props.props.watchedCases.watchedCasesDetails : props.props.searchResultsObj.searchDetailsObj; var detailsObj = {}; @@ -240,6 +243,8 @@ let MakeRepresentation = (props) => { setShowQuestionnaireSection } showQuestionnaireSection={showQuestionnaireSection} + setQuestionnaireCount={setQuestionnaireCount} + questionnaireCount={questionnaireCount} /> ); break; @@ -347,6 +352,8 @@ let MakeRepresentation = (props) => { setShowQuestionnaireSection={ setShowQuestionnaireSection } + setQuestionnaireCount={setQuestionnaireCount} + questionnaireCount={questionnaireCount} /> ); break; @@ -363,6 +370,8 @@ let MakeRepresentation = (props) => { setShowQuestionnaireSection={ setShowQuestionnaireSection } + setQuestionnaireCount={setQuestionnaireCount} + questionnaireCount={questionnaireCount} /> ); break; @@ -555,7 +564,7 @@ let MakeRepresentation = (props) => { : isLPA ? "lpa" : values.representationCapacity, - "locale": locale, + "locale": router.locale, })); currentView.representationSubmit != true ? _.isEmpty(currentView.representationCapacity) @@ -566,10 +575,14 @@ let MakeRepresentation = (props) => { .replace(/(\band|[\s\-\+\(\)\,\&])/g, "") .toLowerCase() ) + : questionnaireCount != 0 && + showQuestionnaireSection < questionnaireCount + ? setShowQuestionnaireSection(showQuestionnaireSection + 1) : setRepresentationSubmit(true) : currentView.representationSubmit == true ? (console.log("capacity", currentView.representationCapacity), console.log("has errors:", props.invalid), + Object.assign(values, { "locale": router.locale }), props.invalid == false && updateRepresentation(values, false, false), values.hasOwnProperty("representationDocuments") && @@ -579,7 +592,9 @@ let MakeRepresentation = (props) => { "size": Blob.size, }) ), - Object.assign(values, { "filesList": buildFileArray })), + Object.assign(values, { + "filesList": buildFileArray, + })), generateRepPDF( values, props.props.accountDetails.containerID, diff --git a/components/case/representation/representationAgent.js b/components/case/representation/representationAgent.js index 7bb7b1c3..8505ba82 100644 --- a/components/case/representation/representationAgent.js +++ b/components/case/representation/representationAgent.js @@ -76,20 +76,7 @@ const RepAgent = (props) => { )} - {/*
-
- -
-
*/} +
{ > {t("common:continue-button")}{" "} - {/* { - setRepresentationSubmit(true); - }} - className="govuk-button" - > - {t("common:continue-button")} ww - */} + { setRepresentationCapacity(); diff --git a/components/case/representation/representationAppellant.js b/components/case/representation/representationAppellant.js index 59629894..c303ee8c 100644 --- a/components/case/representation/representationAppellant.js +++ b/components/case/representation/representationAppellant.js @@ -78,21 +78,6 @@ const RepAppellant = (props) => {
- {/*
-
- -
-
*/} - {(typeof props.representationType != "undefined" || typeof formObj.representationForm.values.representationType != "undefined") && ( @@ -199,14 +184,7 @@ const RepAppellant = (props) => { > {t("common:continue-button")} - {/*
{ - setRepresentationSubmit(true); - }} - className="govuk-button" - > - {t("common:continue-button")} ww - */} + { setRepresentationCapacity(); diff --git a/components/case/representation/representationDetails.js b/components/case/representation/representationDetails.js index 3cd8518f..62afc854 100644 --- a/components/case/representation/representationDetails.js +++ b/components/case/representation/representationDetails.js @@ -19,7 +19,9 @@ const RepDetails = (props) => { ? router.query.state == "edit" ? props.myRepresentations.myRepresentations : props.searchResultsObj.searchDetailsObj - : props.searchResultsObj.searchDetailsObj; + : props.currentType == "watchedCases" + ? props.props.props.watchedCases.watchedCasesDetails + : props.props.searchResultsObj.searchDetailsObj; var detailsObj = {}; @@ -53,19 +55,9 @@ const RepDetails = (props) => { "_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue" ] } - {/* {detailsObj.firstName + - " " + - detailsObj.lastName || "not entered"} */} - {/*
-
- {t("case:summary-agent-label")} -
-
- Mr A Agent -
-
*/} +
{t("case:summary-site-address-label")} diff --git a/components/case/representation/representationElements.js b/components/case/representation/representationElements.js index a9f94619..cc55e3b1 100644 --- a/components/case/representation/representationElements.js +++ b/components/case/representation/representationElements.js @@ -645,11 +645,6 @@ export const RenderDatePicker = ({ )} - {/* {value} -
- {moment(value).format("DD/MM/YY")} -
*/} - { > {({ getRootProps, getInputProps }) => ( <> - {/* {field.hint != false && ( -
ss{t(field.hint)}
- )} -
*/}
{" "} diff --git a/components/case/representation/representationInterestedPartyPerson.js b/components/case/representation/representationInterestedPartyPerson.js index 6fde5f43..55cbf26a 100644 --- a/components/case/representation/representationInterestedPartyPerson.js +++ b/components/case/representation/representationInterestedPartyPerson.js @@ -151,16 +151,7 @@ const RepInterestedPartyPerson = (props) => { > {t("common:continue-button")} - {/* - { - setRepresentationSubmit(true); - }} - className="govuk-button" - > - {t("common:continue-button")} - - */} + { setRepresentationCapacity(); diff --git a/components/case/representation/representationLPA.js b/components/case/representation/representationLPA.js index 2f1ec009..b3ef0a9f 100644 --- a/components/case/representation/representationLPA.js +++ b/components/case/representation/representationLPA.js @@ -24,7 +24,7 @@ import { select } from "xpath"; import jsonpath from "jsonpath"; import { useState } from "react"; import Enforcement_Questionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_enforcement"; -import S78_Qquestionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_s78"; +import S78_Questionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_s78"; import RepresentationProgress_s78 from "./representationProgress/representationProgress_s78"; import RepresentationProgress_enforcement from "./representationProgress/representationProgress_enforcement"; import transLookup from "../../../data/lookuptranslations.json"; @@ -35,6 +35,8 @@ let RepLPA = (props) => { const router = useRouter(); const { locale } = router; const { + onSubmit, + handleSubmit, formObj, appellantApplicantRepresentationArr, setRepresentationCapacity, @@ -44,6 +46,8 @@ let RepLPA = (props) => { onBehalfOfLPA, setShowQuestionnaireSection, showQuestionnaireSection, + questionnaireCount, + setQuestionnaireCount, } = props; const { acceptedFiles, getRootProps, getInputProps } = useDropzone(); const files = acceptedFiles.map((file) => ( @@ -53,6 +57,34 @@ let RepLPA = (props) => { )); const required = (value) => (value ? undefined : "Required"); + const updateQuestionnaireCount = () => { + { + switch (currentView.caseReference.appealType) { + case 846040000: + case 846040001: + case 846040006: + case 846040025: + case 846040004: + case 846040018: + case 846040003: + case 846040009: + case 846040008: + setQuestionnaireCount(7); + break; + + case 846040005: + case 846040006: + case 846040007: + setQuestionnaireCount(9); + + break; + default: + setQuestionnaireCount(7); + + break; + } + } + }; const whichQuestionnaire = () => { { switch (currentView.caseReference.appealType) { @@ -65,8 +97,9 @@ let RepLPA = (props) => { case 846040003: case 846040009: case 846040008: + updateQuestionnaireCount(); return ( - { setShowQuestionnaireSection={ setShowQuestionnaireSection } + questionnaireCount={questionnaireCount} /> ); break; @@ -83,6 +117,7 @@ let RepLPA = (props) => { case 846040005: case 846040006: case 846040007: + updateQuestionnaireCount(); return ( { setShowQuestionnaireSection={ setShowQuestionnaireSection } + questionnaireCount={questionnaireCount} /> ); break; @@ -235,7 +271,6 @@ let RepLPA = (props) => {
)}
-
{typeof props.representationType != "undefined" && @@ -306,18 +341,26 @@ let RepLPA = (props) => { {typeof props.representationType != "undefined" && props.representationType == "Questionnaire" && ( <> - {showQuestionnaireSection < 7 && ( - { - setShowQuestionnaireSection( - showQuestionnaireSection + 1 - ); - }} + {showQuestionnaireSection <= + questionnaireCount && ( + + // { + // setShowQuestionnaireSection( + // showQuestionnaireSection + 1 + // ); + // }} + // className="govuk-button" + // > + // Next section + // )} {showQuestionnaireSection == 9 && ( - {/* { - - setRepresentationSubmit(false); - }} - className="govuk-button" - > - {t("common:continue-button")} - */} { //setRepresentationCapacity(); diff --git a/components/case/representation/representationLPADetails.js b/components/case/representation/representationLPADetails.js index 84038a4a..dbfbf3e0 100644 --- a/components/case/representation/representationLPADetails.js +++ b/components/case/representation/representationLPADetails.js @@ -16,7 +16,9 @@ const RepLPADetails = (props) => { let setCaseDetailsObj = router.query.hasOwnProperty("state") ? router.query.state == "edit" ? props.props.myRepresentations.myRepresentations - : props.props.searchResultsObj.searchDetailsObj + : props.searchResultsObj.searchDetailsObj + : props.currentType == "watchedCases" + ? props.props.props.watchedCases.watchedCasesDetails : props.props.searchResultsObj.searchDetailsObj; var detailsObj = {}; @@ -45,14 +47,7 @@ const RepLPADetails = (props) => { ] || "not entered"}
- {/*
-
- {t("case:summary-agent-label")} -
-
- Mr A Agent -
-
*/} +
{t("case:summary-site-address-label")} diff --git a/components/case/representation/representationLandowner.js b/components/case/representation/representationLandowner.js index b72d924d..57e28309 100644 --- a/components/case/representation/representationLandowner.js +++ b/components/case/representation/representationLandowner.js @@ -60,20 +60,6 @@ const RepLandOwner = (props) => { />
- {/*
-
- -
-
*/}
@@ -128,16 +114,6 @@ const RepLandOwner = (props) => { > {t("common:continue-button")} - {/* - { - setRepresentationSubmit(true); - }} - className="govuk-button" - > - {t("common:continue-button")} - - */} { setRepresentationCapacity(); diff --git a/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_s78.js b/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_s78.js index e57a8c00..0575ee84 100644 --- a/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_s78.js +++ b/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_s78.js @@ -23,10 +23,10 @@ import { select } from "xpath"; import jsonpath from "jsonpath"; import { getFormCollectionByID } from "../../../../components/utils"; -let S78_Questionnaire = async (props) => { - //let { t } = useTranslation(); +let S78_Questionnaire = (props) => { + let { t } = useTranslation(); - let t = await getT(props.reqQuery.__nextLocale, "common"); + //let t = await getT(props.reqQuery.__nextLocale, "common"); const router = useRouter(); const { locale } = router; @@ -89,10 +89,22 @@ let S78_Questionnaire = async (props) => { console.log(resultsObj); + const onHandleSubmit = (values) => { + //if (currentSection == sectionCount) { + let valuesObj = values || {}; + + delete valuesObj["_pinswg_appellant_value"]; + console.log("has errors:", props.invalid); + props.invalid == false && updateCaseProgress(valuesObj, false, false); + + setCurrentSection(currentSection + 1); + }; + return ( <> {props.representationTypeValue} {props.procedureTypeValue} + {showQuestionnaireSection == 1 && (
{ rows="5" className="govuk-textarea govuk-input--width-30" aria-describedby={props.name + "-hint"} + validate={[required]} />
@@ -372,6 +385,7 @@ let S78_Questionnaire = async (props) => { rows="5" className="govuk-textarea govuk-input--width-30" aria-describedby={props.name + "-hint"} + validate={[required]} />
)} @@ -399,6 +413,7 @@ let S78_Questionnaire = async (props) => { rows="5" className="govuk-textarea govuk-input--width-30" aria-describedby={props.name + "-hint"} + validate={[required]} />
@@ -624,6 +639,7 @@ let S78_Questionnaire = async (props) => { rows="5" className="govuk-textarea govuk-input--width-30" aria-describedby={props.name + "-hint"} + validate={[required]} />
@@ -667,6 +683,7 @@ let S78_Questionnaire = async (props) => { rows="5" className="govuk-textarea govuk-input--width-30" aria-describedby={props.name + "-hint"} + validate={[required]} /> { rows="5" className="govuk-textarea govuk-input--width-30" aria-describedby={props.name + "-hint"} + validate={[required]} />
diff --git a/components/case/summary.js b/components/case/summary.js index 26340b3c..34c261be 100644 --- a/components/case/summary.js +++ b/components/case/summary.js @@ -76,9 +76,9 @@ const CaseSummary = (props) => { setWatchedCases, setWatchedCasesDetails, showMap, - showLoginCheck, } = props; + const showLoginCheck = props.currentView.caseReference.showLoginCheck; const { data: session, status } = useSession(); //console.log("session status:", status, session); @@ -385,32 +385,7 @@ const CaseSummary = (props) => {
- {/*
-
- todays date - {formatDates(new Date())} -
- pinswg_startdate -{" "} - {formatDates(detailsObj.pinswg_startdate)} -
- days between pinswg_startdate & todays date - - {Math.floor( - (new Date(detailsObj.pinswg_startdate) - - new Date()) / - (24 * 3600 * 1000) - )} -
- pinswg_statementduedate -{" "} - {formatDates(detailsObj.pinswg_statementduedate)} -
- pinswg_finalcommentsduedate -{" "} - {formatDates(detailsObj.pinswg_finalcommentsduedate)} -
- pinswg_startdatetimeiftheevent -{" "} - {formatDates(detailsObj.pinswg_startdatetimeiftheevent)} -

-
-
- */} + {showLoginCheck == "true" && ( <>
@@ -596,50 +571,6 @@ const CaseSummary = (props) => { )} - {/* 1{" "} - {_.has(detailsObj, "pinswg_startdatetimeiftheevent") && - detailsObj.pinswg_startdatetimeiftheevent} - 2{" "} - {_.has(detailsObj, "pinswg_startdateoftheevent") && - detailsObj.pinswg_startdateoftheevent} - 3{" "} - {_.has(detailsObj, "pinswg_startdateofevent") && - detailsObj.pinswg_startdateofevent} - 4{" "} - {_.has(detailsObj, "pinswg_starttimeoftheevent") && - detailsObj.pinswg_starttimeoftheevent} */} - {/* */} {showSummary(casesObj, detailsObj)}
) : ( @@ -651,35 +582,38 @@ const CaseSummary = (props) => {
-
-
-
- {noRepresentationLink.includes(router.pathname) == - true ? ( - "" - ) : ( - - {t( - "case:summary-make-representation-label" - )} - - )} + {showLoginCheck == "true" && ( +
+
-
+ )} ); diff --git a/components/myportal.js b/components/myportal.js index 7692deaa..84fad811 100644 --- a/components/myportal.js +++ b/components/myportal.js @@ -16,7 +16,7 @@ import UploadFile from "./myportal/uploadFile"; import WatchedCases from "./myportal/watchedcases"; const MyPortal = (props) => { - const { showFileUpload } = props; + const { showFileUpload, showLoginCheck } = props; let { t } = useTranslation(); const router = useRouter(); @@ -39,86 +39,81 @@ const MyPortal = (props) => { ? true : false; - return <> -
-
-

- { -

- -
- {router.locale{" "} -
- - - { - props.accountDetails.accountDetails - .firstname - }{" "} - { - props.accountDetails.accountDetails - .lastname + return ( + <> +
+
+

+ { +

+ +
+ {router.locale{" "} +
+ + {props.accountDetails.accountDetails.firstname}{" "} + {props.accountDetails.accountDetails.lastname} + {" - "} + { + props.accountDetails.accountDetails[ + "pinswg_typeofinvolvement@OData.Community.Display.V1.FormattedValue" + ] + } + +
+
+ { + handleLogout(); + }} + className="govuk-header__link govuk-!-margin-right-3" + > + {t("common:signout-label")} + +
+
+
+ {isLPA && ( +
+

{ props.accountDetails.accountDetails[ - "pinswg_typeofinvolvement@OData.Community.Display.V1.FormattedValue" + "pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue" ] - } - - + }{" "} + LPA Portal +

-
- { - handleLogout(); - }} - className="govuk-header__link govuk-!-margin-right-3"> - - {t("common:signout-label")} - - -
-
-
- {isLPA && ( -
-

- { - props.accountDetails.accountDetails[ - "pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue" - ] - }{" "} - LPA Portal -

-
- )} -
-
-
- {!isLPA && } - - {/* {props.awaitingSubmission.awaitingSubmission[ + )} +
+
+
+ {!isLPA && } + + {/* {props.awaitingSubmission.awaitingSubmission[ "@odata.count" ] > 0 && ( { } /> )} */} - {isLPA - ? "" - : props.awaitingSubmission - .awaitingSubmissionFromBlob[ - "@odata.count" - ] > 0 && ( - - )} - {props.myCases.myCases["@odata.count"] > 0 && ( - - )} - {props.watchedCases.watchedCases["@odata.count"] > - 0 && ( - - )} - {props.myRepresentations.myRepresentations[ - "@odata.count" - ] > 0 && ( - - )} - {!isLPA && } + {isLPA + ? "" + : props.awaitingSubmission + .awaitingSubmissionFromBlob[ + "@odata.count" + ] > 0 && ( + + )} + {props.myCases.myCases["@odata.count"] > 0 && ( + + )} + {props.watchedCases.watchedCases["@odata.count"] > + 0 && ( + + )} + {props.myRepresentations.myRepresentations[ + "@odata.count" + ] > 0 && ( + + )} + {!isLPA && } - {/* */} + {/* */} +
-
-
- - ; + + + + ); }; export default MyPortal; diff --git a/components/myportal/topthree.js b/components/myportal/topthree.js index 09b65e7d..adf44ad6 100644 --- a/components/myportal/topthree.js +++ b/components/myportal/topthree.js @@ -35,6 +35,7 @@ const TopThree = (props) => { setWatchedCasesDetails, setAwaitingSubmission, setAwaitingSubmissionDetails, + showLoginCheck, } = props; const router = useRouter(); @@ -193,6 +194,7 @@ const TopThree = (props) => { "appealType": showTopThreeArr[key] .pinswg_appealcasetype, + "showLoginCheck": props.showLoginCheck, }); }} > diff --git a/components/myportal/watchedcases.js b/components/myportal/watchedcases.js index b9b4d6ba..a87bc95e 100644 --- a/components/myportal/watchedcases.js +++ b/components/myportal/watchedcases.js @@ -19,10 +19,12 @@ const WatchedCases = (props) => { {t("myportal:watchedcases-card-title")}
+
werwrew {props.showLoginCheck}
diff --git a/components/pdftemplates/enforcement_pdf.js b/components/pdftemplates/enforcement_pdf.js index ed49d754..6d0271e3 100644 --- a/components/pdftemplates/enforcement_pdf.js +++ b/components/pdftemplates/enforcement_pdf.js @@ -99,6 +99,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { } let values = docProps; let appealTypeValue = getFormCollectionByID(values.appealType); + console.log("//////////////////////\n docpropseeeee:".docProps); console.log("sdffhjdhjdjdgkj: ", values.procedureType); return ( diff --git a/components/pdftemplates/lpaQuestionnaire_pdf.js b/components/pdftemplates/lpaQuestionnaire_pdf.js index 29504b5c..29162c21 100644 --- a/components/pdftemplates/lpaQuestionnaire_pdf.js +++ b/components/pdftemplates/lpaQuestionnaire_pdf.js @@ -113,6 +113,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => { return dd + "/" + mm + "/" + yyyy; } let values = docProps; + console.log("//////////////////////\n docprops:".docProps); let appealTypeValue = getFormCollectionByID(values.appealType); console.log("sdffhjdhjdjdgkj: ", values.procedureType); diff --git a/locales/cy/myrepresentations.json b/locales/cy/myrepresentations.json index e732b67d..5ed6b507 100644 --- a/locales/cy/myrepresentations.json +++ b/locales/cy/myrepresentations.json @@ -40,8 +40,11 @@ "s78-section-question-5": "Pa weithdrefn ydych chi'n ystyried y dylai'r apêl ei dilyn?", "s78-section-question-6": "A fydd angen i'r Arolygydd fynd i mewn i safle/eiddo'r apźl?", "s78-section-question-7": "A ydych yn ystyried bod angen i'r Arolygydd fynd ar dir/eiddo preifat cyfagos i weld y safle?", + "s78-section-question-7-hint": "Os Oes, rhowch resymau a rhowch gyfeiriad y safle cyfagos. Os oes gennych rai, rhowch fanylion cyswllt y tirfeddiannwr mewn atodiad.", "s78-section-question-8": "Os oes angen mynediad i dir/adeiladau preifat, a ydych yn fodlon i’r Arolygydd ymweld â’r safle ar sail ‘angen mynediad’, gyda dim ond y tirfeddiannwr neu ei gynrychiolydd yn bresennol?", + "s78-section-question-8-hint": "Os Na, rhowch resymau pam yr ydych yn ystyried bod angen Ymweliad Safle Cydymaith", "s78-section-question-9": "A ydych yn ymwybodol o unrhyw faterion iechyd a diogelwch y byddai angen eu hystyried pan fydd yr Arolygydd yn ymweld â'r safle?", + "s78-section-question-9-hint": "Os Oes, disgrifiwch y materion iechyd a diogelwch i'w hystyried", "s78-section-question-10": "Cyswllt ACLl ar gyfer ymweliad safle, gwrandawiad neu drefniadau ymchwiliad:", "s78-section-heading-two": "Dogfennau ategol", "s78-section-question-11": "Ffeil achos yr ACLl a sylwadau", diff --git a/locales/en/myrepresentations.json b/locales/en/myrepresentations.json index 474d890f..f5ecba20 100644 --- a/locales/en/myrepresentations.json +++ b/locales/en/myrepresentations.json @@ -40,8 +40,11 @@ "s78-section-question-5": "Which procedure do you consider the appeal should follow?", "s78-section-question-6": "Will the Inspector need to enter the appeal site/property?", "s78-section-question-7": "Do you consider that the Inspector needs to enter neighbouring private land/property to view the site?", + "s78-section-question-7-hint": "If Yes, give reasons and provide the neighbouring site address. If you have them, provide the contact details of the landowner in an attachment.", "s78-section-question-8": "If access to private land/buildings is required, are you content for the Inspector to visit the site on an ‘access required’ basis, with only the landowner or their representative present?", + "s78-section-question-8-hint": "If No, give reasons for why you consider an Accompanied Site Visit to be necessary", "s78-section-question-9": "Are you aware of any health and safety issues which would need to be considered when the Inspector visits the site?", + "s78-section-question-9-hint": "If Yes, describe the health and safety issues to be considered", "s78-section-question-10": "LPA contact for site visit, hearing or inquiry arrangements:", "s78-section-heading-two": "Supporting documents", "s78-section-question-11": "LPA case file and representations", @@ -112,6 +115,7 @@ "enf-section-question-8": "Are you aware of any health and safety issues which would need to be considered when the Inspector visits the site?", "enf-section-question-8-hint": "If Yes, describe the health and safety issues to be considered", "enf-section-question-9": "LPA contact for site visit, hearing or inquiry arrangements:", + "enf-section-question-9-hint": "If Yes, describe the health and safety issues to be considered", "enf-section-heading-two": "Deemed Application Fee", "enf-section-question-10": "Has the local planning authority received the correct fee payable in relation to this appeal for the deemed planning application/ground (a) to be considered?", "enf-section-question-11": "Is the appeal fee exempt?", diff --git a/pages/api/file/generatepdf.js b/pages/api/file/generatepdf.js index 15acce1f..4f79998e 100644 --- a/pages/api/file/generatepdf.js +++ b/pages/api/file/generatepdf.js @@ -106,7 +106,7 @@ import { other_pdf } from "../../../components/pdftemplates/other_pdf"; export default function handler(req, res) { var checkHash = req.query.hash; - let reqBodyobj = JSON.parse(req.body); + let reqBodyobj = req.body; //JSON.parse(req.body); console.log( "//////////////////////\nreqBodyobj" + diff --git a/pages/case/index.js b/pages/case/index.js index 86e8071d..11459ae1 100644 --- a/pages/case/index.js +++ b/pages/case/index.js @@ -89,6 +89,7 @@ const mapStateToProps = (state) => { watchedCases: state.watchedCases, myRepresentations: state.myRepresentations, awaitingSubmission: state.awaitingSubmission, + showLoginCheck: process.env.SHOWLOGIN || false, }; }; diff --git a/pages/myportal/case.js b/pages/myportal/case.js index 88be283a..dabd1c2a 100644 --- a/pages/myportal/case.js +++ b/pages/myportal/case.js @@ -81,7 +81,9 @@ const Home = (props) => { props.searchResultsObj.representationsObj } showRepresentations={showRepresentations} - showLoginCheck={props.currentView.showLogin} + showLoginCheck={ + props.currentView.caseReference.showLogin + } />
diff --git a/pages/myportal/index.js b/pages/myportal/index.js index a30baf5a..acba23ea 100644 --- a/pages/myportal/index.js +++ b/pages/myportal/index.js @@ -56,6 +56,7 @@ const Home = (props) => { awaitingSubmission, accountDetails, showFileUpload, + showLoginCheck, } = props; let { t, lang } = useTranslation(); @@ -146,6 +147,7 @@ const Home = (props) => { accountDetails={accountDetails} showFileUpload={showFileUpload} containerID={accountDetails.containerID} + showLoginCheck={showLoginCheck} />