updated naming convention meta and pdf fixes

This commit is contained in:
2024-05-20 12:42:53 +01:00
parent 206d08fa5e
commit d829213a6a
16 changed files with 254 additions and 143 deletions
+27 -6
View File
@@ -423,9 +423,12 @@ let MakeRepresentation = (props) => {
setRepresentationCapacity
}
setRepresentationSubmit={setRepresentationSubmit}
onHandleSubmit={onHandleSubmit}
currentView={currentView}
setSubmitBack={setSubmitBack}
props={props}
caseReference={caseReference}
setRepFileName={setRepFileName}
/>
);
}
@@ -495,9 +498,15 @@ let MakeRepresentation = (props) => {
Object.assign(values, {
"containerID": props.props.accountDetails.containerID,
"appealType": props.props.currentView.caseReference.appealType,
"incidentID": props.props.currentView.caseReference.incidentid,
"appealType":
props.props.currentView.caseReference.appealType ||
props.props.currentView.caseReference.repDetails.appealType,
"incidentID":
props.props.currentView.caseReference.incidentid ||
props.props.currentView.caseReference.repDetails.incidentid,
"caseRef": props.props.currentView.caseReference.currentReference,
"casereference":
props.props.currentView.caseReference.currentReference,
"pinswg_questionnaireduedate":
detailsObj.pinswg_questionnaireduedate,
"pinswg_statementduedate": detailsObj.pinswg_statementduedate,
@@ -550,8 +559,14 @@ let MakeRepresentation = (props) => {
"pinswg_name":
props.props.currentView.caseReference.currentReference,
"containerID": props.props.accountDetails.containerID,
"appealType": props.props.currentView.caseReference.appealType,
"incidentID": props.props.currentView.caseReference.incidentid,
"appealType":
props.props.currentView.caseReference.appealType ||
props.props.currentView.caseReference.repDetails.appealType,
"casereference":
props.props.currentView.caseReference.currentReference,
"incidentID":
props.props.currentView.caseReference.incidentid ||
props.props.currentView.caseReference.repDetails.incidentid,
"caseRef": props.props.currentView.caseReference.currentReference,
});
@@ -658,10 +673,16 @@ let MakeRepresentation = (props) => {
(Object.assign(values, formObj.representationForm.values),
Object.assign(values, {
"containerID": props.props.accountDetails.containerID,
"appealType": props.props.currentView.caseReference.appealType,
"incidentID": props.props.currentView.caseReference.incidentid,
"appealType":
props.props.currentView.caseReference.appealType ||
props.props.currentView.caseReference.repDetails.appealType,
"incidentID":
props.props.currentView.caseReference.incidentid ||
props.props.currentView.caseReference.repDetails.incidentid,
"caseRef":
props.props.currentView.caseReference.currentReference,
"casereference":
props.props.currentView.caseReference.currentReference,
"pinswg_questionnaireduedate":
detailsObj.pinswg_questionnaireduedate,
"pinswg_statementduedate": detailsObj.pinswg_statementduedate,
@@ -81,103 +81,120 @@ const RepAgent = (props) => {
)}
</div>
</div>
<div className="govuk-grid-row">
<div className="govuk-form-group">
<Field
name="representationOnBehalfOf"
datafieldname="representationOnBehalfOf"
// label={t("myrepresentations:capacity-select-what-capacity-label")}
options={["Yes", "No"]}
id="representationOnBehalfOf"
className="govuk-radios__input"
errorMsg={t("newappeal:select-an-option-label")}
component={RenderCondtionalRadioList}
validate={[required]}
legend={
"Are you acting on behalf of a company, group or organisation?"
}
/>
</div>
</div>
<div className="govuk-grid-row">
<div className="govuk-form-group">
<p className="govuk-body">
{t("myrepresentations:enter-comment-label")}
</p>
<fieldset
className="govuk-fieldset"
aria-describedby="commentBox-hint"
>
<div id="commentBox-hint" className="govuk-hint">
{t("myrepresentations:comments-set-out-label")}:
</div>
{(typeof props.representationType != "undefined" ||
typeof formObj.representationForm.values.representationType !=
"undefined") && (
<>
<div className="govuk-grid-row">
<div className="govuk-form-group">
<Field
name="representationComments"
id="representationComments"
component={RenderRichMultiline}
type="text"
rows="5"
className="govuk-textarea govuk-input--width-30"
aria-describedby={props.name + "-hint"}
/>
<p className="govuk-hint govuk-!-font-size-14 govuk-!-margin-top-5">
{t("myrepresentations:publish-policy-label")}
<a href="https://gov.wales/planning-and-environment-decisions-wales-publishing-policy-html">
https://gov.wales/planning-and-environment-decisions-wales-publishing-policy-html
</a>
</p>
</div>
<div className="govuk-form-group govuk-!-margin-bottom-9">
<FileUploadField
name={"representationDocuments"}
label={t("myrepresentations:add-files-label")}
ticketnumber={props.props.caseReference}
hint={"sdsd"}
fileList={[]}
setFilesForRepresentation={[]}
containerID={
props.props.props.accountDetails.containerID
name="representationOnBehalfOf"
datafieldname="representationOnBehalfOf"
// label={t("myrepresentations:capacity-select-what-capacity-label")}
options={["Yes", "No"]}
id="representationOnBehalfOf"
className="govuk-radios__input"
errorMsg={t("newappeal:select-an-option-label")}
component={RenderCondtionalRadioList}
validate={[required]}
legend={
"Are you acting on behalf of a company, group or organisation?"
}
filenamePrefix={props}
/>
</div>
{props.currentView.caseReference.hasOwnProperty(
"repDetails"
) &&
props.currentView.caseReference.repDetails.filesList
.length > 0 ? (
<div className="govuk-form-group govuk-!-margin-bottom-9">
{props.currentView.caseReference.repDetails.filesList.map(
(blob, i) => (
<div
key={blob.name + "_" + i}
className="govuk-!-margin-bottom-5 fileThumb "
>
<img
src={getThumbnailIconByExtension(
blob.name
)}
alt={blob.name}
width="50"
/>
</div>
<span className="govuk-body govuk-!-font-size-14 govuk-!-padding-left-5">
{blob.name} (
{bytesToSize(blob.size)})
</span>
</div>
)
<div className="govuk-grid-row">
<div className="govuk-form-group">
<p className="govuk-body">
{t("myrepresentations:enter-comment-label")}
</p>
<fieldset
className="govuk-fieldset"
aria-describedby="commentBox-hint"
>
<div
id="commentBox-hint"
className="govuk-hint"
>
{t(
"myrepresentations:comments-set-out-label"
)}
:
</div>
<div className="govuk-form-group">
<Field
name="representationComments"
id="representationComments"
component={RenderRichMultiline}
type="text"
rows="5"
className="govuk-textarea govuk-input--width-30"
aria-describedby={props.name + "-hint"}
/>
<p className="govuk-hint govuk-!-font-size-14 govuk-!-margin-top-5">
{t(
"myrepresentations:publish-policy-label"
)}
<a href="https://gov.wales/planning-and-environment-decisions-wales-publishing-policy-html">
https://gov.wales/planning-and-environment-decisions-wales-publishing-policy-html
</a>
</p>
</div>
<div className="govuk-form-group govuk-!-margin-bottom-9">
<FileUploadField
name={"representationDocuments"}
label={t(
"myrepresentations:add-files-label"
)}
ticketnumber={props.props.caseReference}
hint={"sdsd"}
fileList={[]}
setFilesForRepresentation={[]}
containerID={
props.props.props.accountDetails
.containerID
}
filenamePrefix={props}
/>
</div>
{props.currentView.caseReference.hasOwnProperty(
"repDetails"
) &&
props.currentView.caseReference.repDetails
.filesList.length > 0 ? (
<div className="govuk-form-group govuk-!-margin-bottom-9">
{props.currentView.caseReference.repDetails.filesList.map(
(blob, i) => (
<div
key={blob.name + "_" + i}
className="govuk-!-margin-bottom-5 fileThumb "
>
<img
src={getThumbnailIconByExtension(
blob.name
)}
alt={blob.name}
width="50"
/>
<span className="govuk-body govuk-!-font-size-14 govuk-!-padding-left-5">
{blob.name} (
{bytesToSize(blob.size)}
)
</span>
</div>
)
)}
</div>
) : (
""
)}
</div>
) : (
""
)}
</fieldset>
</div>{" "}
</div>
</fieldset>
</div>{" "}
</div>
</>
)}
<div className="govuk-grid-row">
<div className="govuk-button-group">
<button
@@ -1,4 +1,5 @@
import Link from "next/link";
import _ from "lodash";
import { useRouter } from "next/router";
import useTranslation from "next-translate/useTranslation";
import { connect } from "react-redux";
@@ -225,9 +226,10 @@ let RepLPA = (props) => {
);
resultsObj = resultsObj[0];
props.formObj["representationForm"].values.hasOwnProperty(
"representationCapacity"
) &&
props.formObj["representationForm"].hasOwnProperty("values") &&
props.formObj["representationForm"].values.hasOwnProperty(
"representationCapacity"
) &&
props.formObj["representationForm"].values.hasOwnProperty(
"representationType"
) &&
@@ -237,7 +239,39 @@ let RepLPA = (props) => {
<>
<div className="govuk-grid-row">
<div className="govuk-form-group">
{typeof formObj.representationForm.values
{!_.has(
formObj["representationForm"],
["values", "representationType"] ||
typeof props.representationType != "undefined"
) ? (
<>
<label
className="govuk-label govuk-body-m"
htmlFor="representationType"
>
{t(
"myrepresentations:representation-from-an-lpa-heading"
)}
</label>
<Field
id="representationType"
name="representationType"
component={RenderPickList}
datafieldname="representationType"
optionsArr={appellantApplicantRepresentationArr}
/>
</>
) : (
<label className="govuk-label govuk-body-m">
Representation Type:{" "}
{
formObj.representationForm.values
.representationType
}{" "}
</label>
)}
{/* {!formObj["representationForm"].hasOwnProperty("values") ||
typeof formObj.representationForm.values
.representationType == "undefined" ? (
<>
<h2 className="govuk-heading-m ">
@@ -269,15 +303,13 @@ let RepLPA = (props) => {
currentView.caseReference.appealType
).value}
</h2>
<label
className="govuk-label govuk-body-m"
htmlFor="representationType"
>
{t(
"myrepresentations:representation-from-an-agent-heading"
"myrepresentations:representation-from-an-lpa-heading"
)}
?
</label>
<Field
id="representationType"
@@ -295,14 +327,16 @@ let RepLPA = (props) => {
.representationType
}{" "}
</label>
)}
)} */}
</div>
</div>
<div className="govuk-grid-row">
<div className="govuk-form-group">
{(typeof props.representationType != "undefined" ||
typeof formObj.representationForm.values
.representationType != "undefined") &&
{(_.has(formObj["representationForm"], [
"values",
"representationType",
]) ||
typeof props.representationType != "undefined") &&
(props.representationType != "Questionnaire" ? (
<>
<p className="govuk-body">
@@ -369,8 +403,7 @@ let RepLPA = (props) => {
<div className="govuk-grid-row">
<div className="govuk-button-group">
{(typeof props.representationType != "undefined" ||
typeof formObj.representationForm.values
.representationType != "undefined") &&
_.has(formObj, "values", "representationType")) &&
props.representationType == "Questionnaire" && (
<>
{showQuestionnaireSection}
@@ -423,8 +456,7 @@ let RepLPA = (props) => {
</>
)}{" "}
{(typeof props.representationType != "undefined" ||
typeof formObj.representationForm.values
.representationType != "undefined") &&
_.has(formObj, "values", "representationType")) &&
props.representationType != "Questionnaire" && (
<>
<button
@@ -486,6 +518,7 @@ const mapStateToProps = (state, props) => {
appealType: state.appealType,
currentView: state.currentView,
myRepresentations: state.myRepresentations,
watchedCases: state.watchedCases,
initialValues: initialValuesTemp,
};
};
@@ -48,7 +48,11 @@ let Enforcement_Questionnaire = (props) => {
let setCaseDetailsObj = router.query.hasOwnProperty("state")
? router.query.state == "edit"
? props.props.myRepresentations.myRepresentations
: currentView.caseReference.currentType == "watchedCases"
? props.props.watchedCases.watchedCasesDetails
: props.props.searchResultsObj.searchDetailsObj
: currentView.caseReference.currentType == "watchedCases"
? props.props.watchedCases.watchedCasesDetails
: props.props.searchResultsObj.searchDetailsObj;
var detailsObj = {};
@@ -63,7 +67,11 @@ let Enforcement_Questionnaire = (props) => {
let setCaseResultssObj = router.query.hasOwnProperty("state")
? router.query.state == "edit"
? props.props.myRepresentations.myRepresentations
: currentView.caseReference.currentType == "watchedCases"
? props.props.watchedCases.watchedCases
: props.props.searchResultsObj.searchResultsObj
: currentView.caseReference.currentType == "watchedCases"
? props.props.watchedCases.watchedCases
: props.props.searchResultsObj.searchResultsObj;
detailsObj = detailsObj[0];
@@ -51,7 +51,11 @@ let S78_Questionnaire = (props) => {
let setCaseDetailsObj = router.query.hasOwnProperty("state")
? router.query.state == "edit"
? props.props.myRepresentations.myRepresentations
: currentView.caseReference.currentType == "watchedCases"
? props.props.watchedCases.watchedCasesDetails
: props.props.searchResultsObj.searchDetailsObj
: currentView.caseReference.currentType == "watchedCases"
? props.props.watchedCases.watchedCasesDetails
: props.props.searchResultsObj.searchDetailsObj;
var detailsObj = {};
@@ -66,7 +70,11 @@ let S78_Questionnaire = (props) => {
let setCaseResultssObj = router.query.hasOwnProperty("state")
? router.query.state == "edit"
? props.props.myRepresentations.myRepresentations
: currentView.caseReference.currentType == "watchedCases"
? props.props.watchedCases.watchedCases
: props.props.searchResultsObj.searchResultsObj
: currentView.caseReference.currentType == "watchedCases"
? props.props.watchedCases.watchedCases
: props.props.searchResultsObj.searchResultsObj;
detailsObj = detailsObj[0];
@@ -102,9 +110,6 @@ let S78_Questionnaire = (props) => {
return (
<>
{props.representationTypeValue}
{props.procedureTypeValue}
{showQuestionnaireSection == 1 && (
<fieldset
className="govuk-fieldset"