Merged PR 1308: updatd documents needed list

updatd documents needed list

Related work items: #12642, #12809
This commit is contained in:
Robert Bond
2024-11-28 08:51:04 +00:00
11 changed files with 281 additions and 194 deletions
+2 -2
View File
@@ -996,8 +996,8 @@ export const getAwaitingSubmissionFromBlobProxy = async (containerName) => {
try {
const res = await axios.get(
// BASE_URL +
"/api/file/getawaitingsubmissionfromblobproxy?container=" +
BASE_URL +
"/api/file/getawaitingsubmissionfromblobproxy?container=" +
containerName
// +
// hashAPIPath(
@@ -1054,6 +1054,8 @@ export const RenderFileUpload = (field) => {
"image/jpeg": [".jpg", ".jpeg"],
"application/zip": [".zip"],
"image/png": [".png"],
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":
[".xlsx"],
}}
onDrop={(filesToUpload, e) => {
const renamedAcceptedFiles = filesToUpload.map(
+2
View File
@@ -1861,6 +1861,8 @@ const RenderFileUpload = (field) => {
"image/jpeg": [".jpg", ".jpeg"],
"application/zip": [".zip"],
"image/png": [".png"],
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":
[".xlsx"],
}}
onDrop={(filesToUpload, e) => {
const renamedAcceptedFiles = filesToUpload.map(
@@ -302,7 +302,7 @@ const AwaitingSubmissionFromBlob = (props) => {
"case:do-you-want-to-delete-case-label"
) +
showTopThreeArr[key]
.pinswg_name +
.ticketnumber +
"?\n" +
t(
"case:do-you-want-to-delete-case-disclaimer-label"
@@ -311,7 +311,7 @@ const AwaitingSubmissionFromBlob = (props) => {
deleteCaseItem(
props.containerID,
showTopThreeArr[key]
.pinswg_name
.ticketnumber
);
}}
>
+124 -122
View File
@@ -113,132 +113,134 @@ let BuildCheckRow = (props) => {
datafieldname[0].value
] != "undefined"
) {
if (typeof isRequiredField[0] != "undefined") {
if (
isRequiredField[0].RequiredLevel.Value != "None"
) {
return (
<div
className="govuk-summary-list__row"
key={key}
>
<dt className="govuk-summary-list__key">
{FieldsTranslations(rows[0].value)}
</dt>
// if (typeof isRequiredField[0] != "undefined") {
// if (
// isRequiredField[0].RequiredLevel.Value != "None"
// ) {
return (
<div className="govuk-summary-list__row" key={key}>
<dt className="govuk-summary-list__key">
{FieldsTranslations(rows[0].value)}
</dt>
<dd className="govuk-summary-list__value">
{fieldtype[0].value ==
"{5B773807-9FB2-42db-97C3-7A91EFF8ADFF}"
? formatDate(
props.props.form[
"appealForm"
].values[
datafieldname[0].value
]
)
: fieldtype[0].value ==
"{3EF39988-22BB-4f0b-BBBE-64B5A3748AEE}"
? getPickListLabel(
props.props.formData
.pickListData,
datafieldname[0].value,
props.props.form[
"appealForm"
].values[
datafieldname[0].value
]
)
: fieldtype[0].value ==
"{07FAC785-CD58-4f9f-ABB3-4B7DDC6ED5ED}"
? getRadioLabel(
props.props.formData
.pickListData,
datafieldname[0].value,
props.props.form[
"appealForm"
].values[
datafieldname[0].value
]
)
: fieldtype[0].value ==
"{16D63FD6-119B-4353-BDCA-18358721C3FE}"
? console.log(
props.props.form[
"appealForm"
].values[
datafieldname[0].value
]
)
: fieldtype[0].value ==
"{0273EDBD-AC1D-40d3-9FB2-095C621B552D}"
? props.props.form[
"appealForm"
].values[
datafieldname[0].value
].map((tenant, index) => {
return (
<div
key={index}
style={{
display:
"flex",
}}
>
<div className="govuk-!-width-one-half">
{
tenant.pinswg_agriculturaltenantname
}
</div>
<div className="govuk-!-width-one-half">
Served:{" "}
{formatDate(
tenant.dateserved
)}
</div>
</div>
);
})
: props.props.form["appealForm"]
.values[
datafieldname[0].value
]}
</dd>
<dd className="govuk-summary-list__actions">
{rows[0].value !=
"Case reference" && (
<a
className="govuk-link"
href="#"
onClick={() => {
setCurrentSection(
whichSection
);
<dd className="govuk-summary-list__value">
{fieldtype[0].value ==
"{E0DECE4B-6666-4a8f-A065-082708572369}" ? (
<div
dangerouslySetInnerHTML={{
__html: props.props.form[
"appealForm"
].values[
datafieldname[0].value
],
}}
/>
) : fieldtype[0].value ==
"{5B773807-9FB2-42db-97C3-7A91EFF8ADFF}" ? (
formatDate(
props.props.form["appealForm"]
.values[datafieldname[0].value]
)
) : fieldtype[0].value ==
"{3EF39988-22BB-4f0b-BBBE-64B5A3748AEE}" ? (
getPickListLabel(
props.props.formData.pickListData,
datafieldname[0].value,
props.props.form["appealForm"]
.values[datafieldname[0].value]
)
) : fieldtype[0].value ==
"{07FAC785-CD58-4f9f-ABB3-4B7DDC6ED5ED}" ? (
getRadioLabel(
props.props.formData.pickListData,
datafieldname[0].value,
props.props.form["appealForm"]
.values[datafieldname[0].value]
)
) : fieldtype[0].value ==
"{67FAC785-CD58-4f9f-ABB3-4B7DDC6ED5ED}" ? (
props.props.form["appealForm"].values[
datafieldname[0].value
] == "false" ? (
router.locale == "cy" ? (
"Nac ydw"
) : (
"No"
)
) : router.locale == "cy" ? (
"Oes"
) : (
"Yes"
)
) : fieldtype[0].value ==
"{16D63FD6-119B-4353-BDCA-18358721C3FE}" ? (
console.log(
props.props.form["appealForm"]
.values[datafieldname[0].value]
)
) : fieldtype[0].value ==
"{0273EDBD-AC1D-40d3-9FB2-095C621B552D}" ? (
props.props.form["appealForm"].values[
datafieldname[0].value
].map((tenant, index) => {
return (
<div
key={index}
style={{
display: "flex",
}}
>
{" "}
{t(
"newappeal:change-link-label"
)}
<span className="govuk-visually-hidden">
{" "}
{FieldsTranslations(
rows[0].value
<div className="govuk-!-width-one-half">
{
tenant.pinswg_agriculturaltenantname
}
</div>
<div className="govuk-!-width-one-half">
Served:{" "}
{formatDate(
tenant.dateserved
)}
</span>
</a>
)}
</dd>
</div>
);
} else {
return null;
}
} else {
return null;
}
} else {
return null;
</div>
</div>
);
})
) : (
props.props.form["appealForm"].values[
datafieldname[0].value
]
)}
</dd>
<dd className="govuk-summary-list__actions">
{rows[0].value != "Case reference" && (
<a
className="govuk-link"
href="#"
onClick={() => {
setCurrentSection(whichSection);
}}
>
{" "}
{t("newappeal:change-link-label")}
<span className="govuk-visually-hidden">
{" "}
{FieldsTranslations(
rows[0].value
)}
</span>
</a>
)}
</dd>
</div>
);
// } else {
// return null;
// }
// } else {
// return null;
// }
// } else {
// return null;
}
}
})}
+129 -18
View File
@@ -177,27 +177,138 @@ const BuildProgress = (props) => {
</div>
</nav>
{Object.keys(documentListObj).length > 0 && (
<div>
<h3 className="govuk-heading-s govuk-!-font-weight-bold gov-font-dark-grey">
{t("newappeal:new-appeal-documentlist-nav")}:
</h3>
<hr className="govuk-section-break govuk-section-break--m govuk-section-break--visible" />
<ol className="govuk-list document-list">
<ul className="govuk-list ">
<li className="at-nav__page">
<ol className="govuk-list govuk-list--bullet">
{Object.entries(documentListObj).map(
<div>
<h3 className="govuk-heading-s govuk-!-font-weight-bold gov-font-dark-grey">
{t("newappeal:new-appeal-documentlist-nav")}:
</h3>
<hr className="govuk-section-break govuk-section-break--m govuk-section-break--visible" />
<ol className="govuk-list document-list">
<ul className="govuk-list ">
<li className="at-nav__page">
<ol className="govuk-list govuk-list--bullet">
<li>Application form</li>
{props.props.props.form.hasOwnProperty(
"appealForm"
) &&
props.props.props.form[
"appealForm"
].hasOwnProperty("values") &&
props.props.props.form[
"appealForm"
].values.hasOwnProperty(
"pinswg_developmentdescriptionchanged"
)
? props.props.props.form["appealForm"]
.values
.pinswg_developmentdescriptionchanged ==
"true" && (
<li>
Description of development change
confirmation
</li>
)
: ""}
{props.props.props.form.hasOwnProperty(
"appealForm"
) &&
props.props.props.form[
"appealForm"
].hasOwnProperty("values") &&
props.props.props.form[
"appealForm"
].values.hasOwnProperty("pinswg_caseworkreason")
? props.props.props.form["appealForm"]
.values.pinswg_caseworkreason ==
"846040005" && (
<li>
Registration of Application letter
</li>
)
: ""}
{props.props.props.form.hasOwnProperty(
"appealForm"
) &&
props.props.props.form[
"appealForm"
].hasOwnProperty("values") &&
props.props.props.form[
"appealForm"
].values.hasOwnProperty("pinswg_caseworkreason")
? props.props.props.form["appealForm"]
.values.pinswg_caseworkreason ==
"846040000" && (
<li>Decision notice</li>
)
: ""}
{props.props.props.form.hasOwnProperty(
"appealForm"
) &&
props.props.props.form[
"appealForm"
].hasOwnProperty("values") &&
props.props.props.form[
"appealForm"
].values.hasOwnProperty("pinswg_attachsoc")
? props.props.props.form["appealForm"]
.values.pinswg_attachsoc ==
"true" && <li>Statement of Case</li>
: ""}
{props.props.props.form.hasOwnProperty(
"appealForm"
) &&
props.props.props.form[
"appealForm"
].hasOwnProperty("values") &&
props.props.props.form[
"appealForm"
].values.hasOwnProperty(
"pinswg_attachcostapplication"
)
? props.props.props.form["appealForm"]
.values
.pinswg_attachcostapplication ==
"true" && <li>Cost Application</li>
: ""}
{props.props.props.form.hasOwnProperty(
"appealForm"
) &&
props.props.props.form[
"appealForm"
].hasOwnProperty("values") &&
props.props.props.form[
"appealForm"
].values.hasOwnProperty(
"pinswg_s106unilateralsubmitted"
)
? props.props.props.form["appealForm"]
.values
.pinswg_s106unilateralsubmitted ==
"true" && (
<li>
Planning obligation
(S106/Unilateral)
</li>
)
: ""}
{/* {Object.keys(documentListObj).length > 0 &&
Object.entries(documentListObj).map(
([key, value]) => {
return <li key={key}>{value}</li>;
}
)}
</ol>
</li>
</ul>
</ol>
</div>
)}
)} */}
<li>Site Location Plan</li>
</ol>
</li>
</ul>
</ol>
</div>
</>
);
};
+4 -38
View File
@@ -612,40 +612,6 @@ let BuildSection = (props) => {
/>
<hr className="govuk-section-break govuk-section-break--m govuk-section-break--visible" />
{/*
Mpved save and exit button from progess section
{savingStatus ? (
<span className=" progress-save-active">
{router.locale == "cy" ? "Nôl data" : "Saving data"}
<img
className="data-loading-icon"
src="/assets/images/loading.gif"
alt={
router.locale == "cy"
? "Nôl data"
: "Saving data"
}
/>
</span>
) : (
<button
className="govuk-button progress-save "
onClick={() => {
let valuesObj =
props.props.form[props.form].values || {};
console.log("valuesobj:", valuesObj);
delete valuesObj["_pinswg_appellant_value"];
console.log("on save:", valuesObj);
updateCaseProgress(valuesObj, true, true);
}}
>
{t("common:save-exit-button")}
</button>
)} */}
</div>
</div>
</div>
@@ -704,10 +670,10 @@ const validate = (values) => {
if (values.hasOwnProperty("pinswg_statementofcase")) {
if (strippedHtml(values.pinswg_statementofcase).length == 0)
errors.pinswg_statementofcase =
"Enter submit a statement of case or select Yes to attach a separate Statement of Case Document";
"Submit your Statement of Case or select Yes to attach a separate Statement of Case Document";
} else {
errors.pinswg_statementofcase =
"Enter submit a statement of case or select Yes to attach a separate Statement of Case Document";
"Submit your Statement of Case or select Yes to attach a separate Statement of Case Document";
}
}
}
@@ -718,10 +684,10 @@ const validate = (values) => {
if (values.hasOwnProperty("pinswg_costapplication")) {
if (strippedHtml(values.pinswg_costapplication).length == 0)
errors.pinswg_costapplication =
"Enter submit a Cost application or select Yes to attach a separate Costs application";
"Submit a Costs application or select Yes to attach a separate Costs application";
} else {
errors.pinswg_costapplication =
"Enter submit a Cost application or select Yes to attach a separate Costs application";
"Submit a Costs application or select Yes to attach a separate Costs application";
}
}
}
+1 -1
View File
@@ -16,7 +16,7 @@ module.exports = {
"/myportal": ["myportal", "common", "home", "case"],
"/myportal/viewall": ["search", "myportal", "case"],
"/myportal/advancedsearch": ["search", "myportal"],
"/myportal/advancedsearchresults": ["search", "myportal"],
"/myportal/advancedsearchresults": ["search", "myportal", "case"],
"/myportal/searchresults": ["search", "myportal", "case"],
"/myportal/case": ["case"],
"/myportal/case/[ticketnumber]": ["case"],
+7 -5
View File
@@ -75,7 +75,7 @@
"new-appeal-procedure-option-inperson": "Yn bersonol",
"new-appeal-procedure-option-hybrid": "Hybrid",
"new-appeal-fileupload-drop-label": "Llusgwch a gollwng eich ffeiliau yma.",
"new-appeal-fileupload-file-list-label": "Dim ond ffeiliau .pdf, .doc, .docx, .tif, .tiff, .jpeg, .jpg neu .zip a dderbynnir",
"new-appeal-fileupload-file-list-label": "Dim ond ffeiliau .pdf, .doc, .docx, .xlsx, .tif, .tiff, .jpeg, .jpg neu .zip a dderbynnir",
"s78-appeals-only-label": "Dim ond i gyflwyno apêl yn erbyn y cewch chi ddefnyddio'r porth hwn:",
"s78-appeals-only-bullet-one": "gwrthod caniatâd cynllunio",
"s78-appeals-only-bullet-two": "methu penderfynu ar gais cynllunio o fewn 8 wythnos",
@@ -91,9 +91,11 @@
"new-appeal-complete-heading-1": "Cyflwynwyd yr apêl wedi'i gwblhau",
"new-appeal-complete-paragraph-1": "Rydym wedi anfon e-bost cadarnhau atoch.",
"new-appeal-complete-heading-2": "Beth sy'n digwydd nesaf",
"new-appeal-complete-paragraph-2": "Pan fyddwn yn derbyn eich ffurflen apêl, byddwn yn ysgrifennu atoch i roi gwybod i chi a yw eich apêl yn ddilys, pwy sy'n delio â hi a beth sy'n digwydd nesaf.",
"new-appeal-complete-paragraph-3": "Dylid anfon unrhyw ymholiadau ynghylch y ddogfen/cyhoeddiad hwn atom yn y cyfeiriad uchod neu drwy e-bost",
"new-appeal-complete-paragraph-4": "Sylwch y gallwch wirio am ddiweddariadau ar ein gwasanaeth presennol yn",
"new-appeal-complete-paragraph-2": "Ar ôl i ni brosesu eich ffurflen apêl, byddwn yn ysgrifennu atoch i roi gwybod i chi a yw eich apêl yn ddilys, pwy sy'n delio â hi a beth sy'n digwydd nesaf.",
"new-appeal-complete-paragraph-3": "Dylid anfon unrhyw ymholiadau ynghylch y ddogfen/cyhoeddiad hwn atom yn ",
"new-appeal-complete-paragraph-4": "Sylwch y gallwch wirio am ddiweddariadau ar ein gwasanaeth presennol yn ",
"new-appeal-complete-back-link": "Yn ôl i Fy Mhorth",
"new-appeal-multiline-pid": "Peidiwch â chynnwys gwybodaeth bersonol neu ariannol"
"new-appeal-multiline-pid": "Peidiwch â chynnwys gwybodaeth bersonol neu ariannol",
"new-appeal-statement-case-error": "Cyflwynwch eich Datganiad Achos neu dewiswch Ie i atodi Dogfen Datganiad Achos ar wahân",
"new-appeal-costs-application-error": "Cyflwyno cais Costau neu ddewis Ie i atodi cais Costau ar wahân"
}
+1 -1
View File
@@ -20,7 +20,7 @@
"questionnaire-publish-policy-label": "Please note that all questionnaire documents may be published in line with our Publishing Policy. Should your questionnaire include any sensitive information or potentially defamatory information, it may be redacted before publishing",
"add-files-label": "Add your files",
"fileupload-drop-label": "Drag and drop your files here.",
"fileupload-file-list-label": "Only .pdf, .doc, .docx, .tif, .tiff, .jpeg, .jpg or .zip files will be accepted",
"fileupload-file-list-label": "Only .pdf, .doc, .docx, .xlsx, .tif, .tiff, .jpeg, .jpg or .zip files will be accepted",
"capacity-para-one": "This form enables you to submit comments on a case to Planning and Environment Decisions Wales.",
"capacity-para-two": "Please note that comments from interested parties need to be made within the timetable. This can be found on the previous \"Case Summary\" page. Comments submitted after this date may be considered invalid.",
"capacity-select-your-details": "Your details",
+7 -5
View File
@@ -74,7 +74,7 @@
"new-appeal-procedure-option-inperson": "In person",
"new-appeal-procedure-option-hybrid": "Hybrid",
"new-appeal-fileupload-drop-label": "Drag and drop your files here.",
"new-appeal-fileupload-file-list-label": "Only .pdf, .doc, .docx, .tif, .tiff, .jpeg, .jpg or .zip files will be accepted",
"new-appeal-fileupload-file-list-label": "Only .pdf, .doc, .docx, .xlsx, .tif, .tiff, .jpeg, .jpg or .zip files will be accepted",
"s78-appeals-only-label": "You can only use this portal to submit an appeal against:",
"s78-appeals-only-bullet-one": "a refusal of planning permission",
"s78-appeals-only-bullet-two": "failure to determine a planning application within 8 weeks",
@@ -90,9 +90,11 @@
"new-appeal-complete-heading-1": "Appeal Submission complete",
"new-appeal-complete-paragraph-1": "We have sent you a confirmation email.",
"new-appeal-complete-heading-2": "What happens next",
"new-appeal-complete-paragraph-2": "When we receive your appeal form, we will write to you letting you know if your appeal is valid, who is dealing with it and what happens next.",
"new-appeal-complete-paragraph-3": "Any enquiries regarding this document/publication should be sent to us at the address above or e-mail",
"new-appeal-complete-paragraph-4": "Please note you can check for updates on our current service at",
"new-appeal-complete-paragraph-2": "Once we have processed your appeal form, we will write to you letting you know if your appeal is valid, who is dealing with it and what happens next.",
"new-appeal-complete-paragraph-3": "Any enquiries regarding this document/publication should be sent to us at ",
"new-appeal-complete-paragraph-4": "Please note you can check for updates on our current service at ",
"new-appeal-complete-back-link": "Back to My Portal",
"new-appeal-multiline-pid": "Do not include personal or financial information."
"new-appeal-multiline-pid": "Do not include personal or financial information.",
"new-appeal-statement-case-error": "Submit your Statement of Case or select Yes to attach a separate Statement of Case Document",
"new-appeal-costs-application-error": "Submit a Costs application or select Yes to attach a separate Costs application"
}