diff --git a/.env.local b/.env.local index 465283be..74fef70a 100644 --- a/.env.local +++ b/.env.local @@ -31,12 +31,12 @@ HASHKEY = 028ffbae928d7191c0017f298260995f901d78eabde1436c0af0423459cc3715832136 # //New PreProd CLIENT_ID = ab6c4678-b31a-4eb3-b429-e039120e488a CLIENT_SECRET = V288Q~P1lFMvvX9Xnkx2pLixK~GOREH983Owqc1E -# RELAY_ROOT = https://ar-ns-lz-pedw-ppe-uks-01.servicebus.windows.net/ar-hc-lz-pedw-ppe-uks-01/ -# RELAYURI = "ar-ns-lz-pedw-ppe-uks-01.servicebus.windows.net" -# RELAYPATH = "ar-hc-lz-pedw-ppe-uks-01" -RELAY_ROOT = https://ar-ns-lz-pedw-ppe-ukw-01.servicebus.windows.net/ar-hc-lz-pedw-ppe-ukw-01/ -RELAYURI = "ar-ns-lz-pedw-ppe-ukw-01.servicebus.windows.net" -RELAYPATH = "ar-hc-lz-pedw-ppe-ukw-01" +RELAY_ROOT = https://ar-ns-lz-pedw-ppe-uks-01.servicebus.windows.net/ar-hc-lz-pedw-ppe-uks-01/ +RELAYURI = "ar-ns-lz-pedw-ppe-uks-01.servicebus.windows.net" +RELAYPATH = "ar-hc-lz-pedw-ppe-uks-01" +# RELAY_ROOT = https://ar-ns-lz-pedw-ppe-ukw-01.servicebus.windows.net/ar-hc-lz-pedw-ppe-ukw-01/ +# RELAYURI = "ar-ns-lz-pedw-ppe-ukw-01.servicebus.windows.net" +# RELAYPATH = "ar-hc-lz-pedw-ppe-ukw-01" CRMURL = "ppcrm2016.llcdt.gov.wales/PPPINSWales" diff --git a/components/case/representation/index.js b/components/case/representation/index.js index b45db9ba..f4d482bd 100644 --- a/components/case/representation/index.js +++ b/components/case/representation/index.js @@ -751,8 +751,9 @@ let MakeRepresentation = (props) => { props.props.accountDetails.accountDetails.emailaddress1, "siteAddress": detailsObj.pinswg_siteaddressline1 + - (detailsObj.pinswg_siteaddressline2 != null && - " " + detailsObj.pinswg_siteaddressline2 + " ") + + (detailsObj.pinswg_siteaddressline2 != null + ? " " + detailsObj.pinswg_siteaddressline2 + " " + : " ") + detailsObj.pinswg_siteaddresstown + " " + detailsObj.pinswg_siteaddresspostcode, @@ -886,6 +887,13 @@ let MakeRepresentation = (props) => { window.scrollTo({ top: 0, behavior: "smooth" }); values = setRepFileName(values); + !values.hasOwnProperty("pinswg_lpareference") && + Object.assign(values, { + "pinswg_lpareference": + searchResultsObj.searchResultsObj.value[0] + .pinswg_lpareference, + }); + //console.log("onHandleSubmit form values - ", JSON.stringify(values)); const buildFileArray = []; @@ -954,9 +962,9 @@ let MakeRepresentation = (props) => { props.props.accountDetails.accountDetails.emailaddress1, "siteAddress": detailsObj.pinswg_siteaddressline1 + - (detailsObj.pinswg_siteaddressline2 != null && - " " + detailsObj.pinswg_siteaddressline2 + " ") + - " " + + (detailsObj.pinswg_siteaddressline2 != null + ? " " + detailsObj.pinswg_siteaddressline2 + " " + : " ") + detailsObj.pinswg_siteaddresstown + " " + detailsObj.pinswg_siteaddresspostcode, @@ -1195,7 +1203,9 @@ let MakeRepresentation = (props) => { setShowQuestionnaireSection={ setShowQuestionnaireSection } + showQuestionnaireSection={showQuestionnaireSection} props={props} + questionnaireCount={questionnaireCount} /> ) : ( <> diff --git a/components/case/representation/representationCompleteSubmit.js b/components/case/representation/representationCompleteSubmit.js index 2bee283a..0a3c45ae 100644 --- a/components/case/representation/representationCompleteSubmit.js +++ b/components/case/representation/representationCompleteSubmit.js @@ -27,6 +27,8 @@ const RepCompleteSubmit = (props) => { setRepresentationMessageSent, setRepresentationReset, setShowQuestionnaireSection, + showQuestionnaireSection, + questionnaireCount, } = props; const { acceptedFiles, getRootProps, getInputProps } = useDropzone(); const files = acceptedFiles.map((file) => ( @@ -411,10 +413,22 @@ const RepCompleteSubmit = (props) => { className="govuk-link" href="#" onClick={() => { - setSubmitBack(); + repFormData.representationType == + "Questionnaire" + ? (setShowQuestionnaireSection( + questionnaireCount == + 7 + ? 6 + : 8 + ), + setRepresentationSubmit( + false + )) + : setSubmitBack(); }} > {t("common:change-link-label")} + {" "} {/* {FieldsTranslations( diff --git a/components/case/representation/representationElements.js b/components/case/representation/representationElements.js index 7baa3d04..307c836a 100644 --- a/components/case/representation/representationElements.js +++ b/components/case/representation/representationElements.js @@ -367,8 +367,7 @@ export const RenderLPACondtionalRadioList = ({ ...custom }) => { const required = (value) => (value ? undefined : "Required"); - - //console.log(error); + let { t } = useTranslation(); return ( <> @@ -401,7 +400,12 @@ export const RenderLPACondtionalRadioList = ({ -
+ {typeof custom.hint != undefined && ( +
+ {t(custom.hint)} +
+ )} +
{Object.keys(options).map((key, index) => (
@@ -1132,8 +1136,11 @@ export const RenderFileUpload = (field) => { "/" + (typeof field.filenamePrefix != "object" ? field.filenamePrefix - : field.filenamePrefix.representationForm - .values.repfile_name) + : encodeURIComponent( + field.filenamePrefix + .representationForm.values + .repfile_name + )) ).then((data) => { data = data.value || {}; field.input.value == null; @@ -1265,7 +1272,12 @@ export const RenderFileUpload = (field) => { "/api/file/downloadblob?container=" + field.containerID + "&casefolderID=" + - field.ticketnumber + + encodeURIComponent( + field.ticketnumber + + "/" + + field.filenamePrefix.representationForm + .values.repfile_name + ) + "&blobname=" + blob.name + blob.hashedfilepath diff --git a/components/case/representation/representationLPA.js b/components/case/representation/representationLPA.js index 18582760..2edf9771 100644 --- a/components/case/representation/representationLPA.js +++ b/components/case/representation/representationLPA.js @@ -65,6 +65,7 @@ let RepLPA = (props) => { case 846040017: return ( { case 846040007: return ( {
3. {t("myrepresentations:enf-section-question-3")}:{" "} {detailsObj.pinswg_siteaddressline1 + - (detailsObj.pinswg_siteaddressline2 != null && - " " + - detailsObj.pinswg_siteaddressline2 + - " ") + + (detailsObj.pinswg_siteaddressline2 != null + ? " " + + detailsObj.pinswg_siteaddressline2 + + " " + : " ") + detailsObj.pinswg_siteaddresstown + " " + detailsObj.pinswg_siteaddresspostcode} @@ -1177,7 +1178,7 @@ let Enforcement_Questionnaire = (props) => { name={"representationDocuments"} id={"representationDocuments"} label={t("myrepresentations:add-files-label")} - ticketnumber={props.props.caseReference} + ticketnumber={props.props.props.caseReference} hint={"sdsd"} fileList={ props.currentView.caseReference.hasOwnProperty( diff --git a/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_s78.js b/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_s78.js index 3e0dd819..d7fb1332 100644 --- a/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_s78.js +++ b/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_s78.js @@ -120,24 +120,25 @@ let S78_Questionnaire = (props) => {
- 1. {t("myrepresentations:s78-section-question-1")}{" "} + 1. {t("myrepresentations:s78-section-question-1")}:{" "} {currentView.caseReference.currentReference}
- 2. {t("myrepresentations:s78-section-question-2")}{" "} + 2. {t("myrepresentations:s78-section-question-2")}:{" "} {resultsObj.pinswg_lpareference}
- 3. {t("myrepresentations:s78-section-question-3")}{" "} + 3. {t("myrepresentations:s78-section-question-3")}:{" "} {detailsObj.pinswg_siteaddressline1 + - (detailsObj.pinswg_siteaddressline2 != null && - " " + - detailsObj.pinswg_siteaddressline2 + - " ") + + (detailsObj.pinswg_siteaddressline2 != null + ? " " + + detailsObj.pinswg_siteaddressline2 + + " " + : " ") + detailsObj.pinswg_siteaddresstown + " " + detailsObj.pinswg_siteaddresspostcode} @@ -145,7 +146,7 @@ let S78_Questionnaire = (props) => {
- 4. {t("myrepresentations:s78-section-question-4")}{" "} + 4. {t("myrepresentations:s78-section-question-4")}:{" "} { getFormCollectionByID( currentView.caseReference.appealType @@ -813,6 +814,7 @@ let S78_Questionnaire = (props) => { legend={t( "myrepresentations:s78-section-question-27" )} + hint={t("myrepresentations:s78-footnote-two")} conditionalLabel={t( "myrepresentations:s78-section-question-27-hint" )} @@ -865,6 +867,7 @@ let S78_Questionnaire = (props) => { legend={t( "myrepresentations:s78-section-question-29" )} + hint={t("myrepresentations:s78-footnote-one")} conditionalLabel={t( "myrepresentations:s78-section-question-29-hint" )} @@ -990,7 +993,7 @@ let S78_Questionnaire = (props) => { name={"representationDocuments"} id={"representationDocuments"} label={t("myrepresentations:add-files-label")} - ticketnumber={props.props.caseReference} + ticketnumber={props.props.props.caseReference} hint={"sdsd"} fileList={ props.currentView.caseReference.hasOwnProperty( diff --git a/components/case/representation/representationQuestionnairesCheck/representationLPAQuestionnaireCheck_enforcement.js b/components/case/representation/representationQuestionnairesCheck/representationLPAQuestionnaireCheck_enforcement.js index 5028f05d..c637919a 100644 --- a/components/case/representation/representationQuestionnairesCheck/representationLPAQuestionnaireCheck_enforcement.js +++ b/components/case/representation/representationQuestionnairesCheck/representationLPAQuestionnaireCheck_enforcement.js @@ -336,7 +336,12 @@ let RepLPAQuestionnaireCheck_enforcement = (props) => {
- {repFormData.healthAndSafetyIssues} +
diff --git a/components/case/representation/representationQuestionnairesCheck/representationLPAQuestionnaireCheck_s78.js b/components/case/representation/representationQuestionnairesCheck/representationLPAQuestionnaireCheck_s78.js index b719a289..ed6d590b 100644 --- a/components/case/representation/representationQuestionnairesCheck/representationLPAQuestionnaireCheck_s78.js +++ b/components/case/representation/representationQuestionnairesCheck/representationLPAQuestionnaireCheck_s78.js @@ -216,7 +216,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
{repFormData.enterNeighbouringLandAccessRequired == - "Yes" && ( + "No" && (
Evidence @@ -226,7 +226,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
@@ -331,7 +331,12 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
- {repFormData.healthAndSafetyIssues} +
@@ -396,7 +401,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => { <>
- 12. LPA’s adopted local development plan and + 12. LPA’s adopted Local Development Plan and Proposals Map
@@ -435,7 +440,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
14. If applicable, do you intend to submit a full - statement at the 4- week stage? + statement at the 4-week stage?
@@ -1370,7 +1375,7 @@ let RepLPAQuestionnaireCheck_s78 = (props) => {
27. Evidence of any publicity given to the application, including site notices and local - advertisement?** + advertisement?
diff --git a/components/pdftemplates/enforcement_pdf.js b/components/pdftemplates/enforcement_pdf.js index f2c2abdf..9e2ce2c2 100644 --- a/components/pdftemplates/enforcement_pdf.js +++ b/components/pdftemplates/enforcement_pdf.js @@ -658,7 +658,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { > 18. - LPA’s adopted local development plan and + LPA’s adopted Local Development Plan and Proposals Map @@ -695,7 +695,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => { 20. If applicable, do you intend to submit a - full statement at the 4- week stage? + full statement at the 4-week stage? {values.LPAintentionToSubmitFullStatement} diff --git a/components/pdftemplates/lpaQuestionnaire_pdf.js b/components/pdftemplates/lpaQuestionnaire_pdf.js index 939bd91e..d86ee469 100644 --- a/components/pdftemplates/lpaQuestionnaire_pdf.js +++ b/components/pdftemplates/lpaQuestionnaire_pdf.js @@ -203,7 +203,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => { )} - {values.lpaRef || " "} + {values.pinswg_lpareference || " "} { - + {/* {getTrans(docProps.locale, "s78-footnote-one")} {getTrans(docProps.locale, "s78-footnote-two")}{" "} - + */}