reps trigger for logged out & upload storage acc
This commit is contained in:
@@ -67,7 +67,7 @@ let MakeRepresentation = (props) => {
|
||||
setRepresentationSubmitConfirmation,
|
||||
} = props;
|
||||
const formObj = props.props.form;
|
||||
let setCaseQueryObj = props[currentType];
|
||||
let setCaseQueryObj = props[currentType] || {};
|
||||
var casesObj = {};
|
||||
|
||||
currentType == "searchResultsObj"
|
||||
@@ -84,16 +84,6 @@ let MakeRepresentation = (props) => {
|
||||
|
||||
var detailsObj = {};
|
||||
|
||||
currentType == "searchResultsObj"
|
||||
? (casesObj = jsonpath.query(
|
||||
setCaseQueryObj,
|
||||
'$..[?(@.title=="' + caseReference + '")]'
|
||||
))
|
||||
: (casesObj = jsonpath.query(
|
||||
setCaseQueryObj,
|
||||
'$..[?(@.reference=="' + caseReference + '")]'
|
||||
));
|
||||
|
||||
const capacityOptionsArr = [
|
||||
"Appellant",
|
||||
"Agent",
|
||||
@@ -213,6 +203,7 @@ let MakeRepresentation = (props) => {
|
||||
setRepresentationSubmit={setRepresentationSubmit}
|
||||
currentView={currentView}
|
||||
setSubmitBack={setSubmitBack}
|
||||
props={props}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
@@ -248,6 +239,7 @@ let MakeRepresentation = (props) => {
|
||||
let day = repDate.getDate();
|
||||
let month = repDate.getMonth() + 1;
|
||||
let year = repDate.getFullYear();
|
||||
let time = repDate.getTime();
|
||||
|
||||
const repType = "";
|
||||
switch (values.representationCapacity) {
|
||||
@@ -276,6 +268,8 @@ let MakeRepresentation = (props) => {
|
||||
"-" +
|
||||
day +
|
||||
"-" +
|
||||
time +
|
||||
"-" +
|
||||
repType +
|
||||
"-REP" +
|
||||
"_" +
|
||||
@@ -299,7 +293,7 @@ let MakeRepresentation = (props) => {
|
||||
|
||||
//console.log(updateBody);
|
||||
|
||||
window.alert(`form is :\n\n${JSON.stringify(updateBody, null, 2)}`);
|
||||
//window.alert(`form is :\n\n${JSON.stringify(updateBody, null, 2)}`);
|
||||
|
||||
const reference = "PEDW-PARTIAL-REP";
|
||||
const templateId = "021b0a7b-df00-41f1-b94e-c269bee98c75";
|
||||
@@ -323,35 +317,23 @@ let MakeRepresentation = (props) => {
|
||||
|
||||
const onHandleSubmit = (values) => {
|
||||
currentView.representationSubmit != true
|
||||
? // console.log(
|
||||
// values,
|
||||
// values.representationCapacity,
|
||||
// currentView.representationCapacity
|
||||
// );
|
||||
|
||||
// console.log(_.isEmpty(currentView.representationCapacity));
|
||||
// console.log(
|
||||
// values.representationCapacity
|
||||
// .replace(/(\band|[\s\-\+\(\)\,\&])/g, "")
|
||||
// .toLowerCase() == currentView.representationCapacity
|
||||
// );
|
||||
|
||||
_.isEmpty(currentView.representationCapacity)
|
||||
? _.isEmpty(currentView.representationCapacity)
|
||||
? setRepresentationCapacity(
|
||||
values.representationCapacity
|
||||
.replace(/(\band|[\s\-\+\(\)\,\&])/g, "")
|
||||
.toLowerCase()
|
||||
)
|
||||
: setRepresentationSubmit(true)
|
||||
: currentView.representationSubmit == true &&
|
||||
(console.log("capacity", currentView.representationCapacity),
|
||||
: currentView.representationSubmit == true
|
||||
? (console.log("capacity", currentView.representationCapacity),
|
||||
console.log("has errors:", props.invalid),
|
||||
props.invalid == false &&
|
||||
updateRepresentation(values, false, false),
|
||||
uploadRepresentationFiles(values),
|
||||
setRepresentationSubmitConfirmation(true));
|
||||
setRepresentationSubmitConfirmation(true))
|
||||
: console.log("nit updated");
|
||||
|
||||
window.alert(`You submitted:\n\n${JSON.stringify(values, null, 2)}`);
|
||||
//window.alert(`You submitted:\n\n${JSON.stringify(values, null, 2)}`);
|
||||
};
|
||||
|
||||
const uploadRepresentationFiles = (values) => {
|
||||
@@ -388,15 +370,15 @@ let MakeRepresentation = (props) => {
|
||||
|
||||
const repForm = props.props.form;
|
||||
|
||||
// console.log(
|
||||
// "waht is representationSubmit:",
|
||||
// currentView.representationSubmit
|
||||
// );
|
||||
console.log(
|
||||
"waht is representationSubmit:",
|
||||
currentView.representationSubmit
|
||||
);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<form onSubmit={handleSubmit(onHandleSubmit)}>
|
||||
{currentView.representationSubmit == "true" ? (
|
||||
{currentView.representationSubmit == true ? (
|
||||
<RepCompleteSubmit
|
||||
formObj={formObj}
|
||||
capacityOptionsArr={capacityOptionsArr}
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
RenderRadioList,
|
||||
RenderMultiline,
|
||||
RenderCondtionalRadioList,
|
||||
FileUploadField,
|
||||
} from "./representationElements";
|
||||
import {
|
||||
setRepresentationCapacity,
|
||||
@@ -90,6 +91,7 @@ const RepAgent = (props) => {
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
<p className="govuk-body">
|
||||
@@ -101,122 +103,33 @@ const RepAgent = (props) => {
|
||||
aria-describedby="commentBox-hint"
|
||||
>
|
||||
<div id="commentBox-hint" className="govuk-hint">
|
||||
My comments are set out in:*
|
||||
My comments are set out in:
|
||||
</div>
|
||||
<div
|
||||
className="govuk-checkboxes"
|
||||
data-module="govuk-checkboxes"
|
||||
>
|
||||
<div className="govuk-checkboxes__item">
|
||||
<Field
|
||||
className="govuk-checkboxes__input"
|
||||
id="commentBox"
|
||||
name="commentBox"
|
||||
value="email"
|
||||
data-aria-controls="commentBox"
|
||||
type="checkbox"
|
||||
component={RenderTextfield}
|
||||
/>
|
||||
<label
|
||||
className="govuk-label govuk-checkboxes__label"
|
||||
htmlFor="commentBox"
|
||||
>
|
||||
the box below{" "}
|
||||
</label>
|
||||
</div>
|
||||
<div
|
||||
className={
|
||||
_.isEmpty(formObj["representationForm"])
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
|
||||
: _.isEmpty(
|
||||
formObj["representationForm"]
|
||||
.values
|
||||
)
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden q11 "
|
||||
: _.isEmpty(
|
||||
formObj["representationForm"]
|
||||
.values.commentBox
|
||||
)
|
||||
? formObj["representationForm"]
|
||||
.values.commentBox == false
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
||||
: "govuk-checkboxes__conditional"
|
||||
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden wwwaqqqq"
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
name="representationComments"
|
||||
id="representationComments"
|
||||
component={RenderMultiline}
|
||||
type="text"
|
||||
rows="5"
|
||||
className="govuk-textarea govuk-input--width-30"
|
||||
aria-describedby={props.name + "-hint"}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
||||
<FileUploadField
|
||||
name={"representationDocuments"}
|
||||
label={"Add your files"}
|
||||
ticketnumber={props.props.caseReference}
|
||||
hint={"sdsd"}
|
||||
fileList={[]}
|
||||
setFilesForRepresentation={[]}
|
||||
containerID={
|
||||
props.props.props.accountDetails
|
||||
.containerID
|
||||
}
|
||||
id="conditional-commentBox"
|
||||
>
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
name="representationComments"
|
||||
id="representationComments"
|
||||
component={RenderMultiline}
|
||||
type="text"
|
||||
rows="5"
|
||||
className="govuk-textarea govuk-input--width-30"
|
||||
aria-describedby={
|
||||
props.name + "-hint"
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="govuk-checkboxes__item">
|
||||
<Field
|
||||
className="govuk-checkboxes__input"
|
||||
id="documentBox"
|
||||
name="documentBox"
|
||||
value="email"
|
||||
data-aria-controls="documentBox"
|
||||
type="checkbox"
|
||||
component={RenderTextfield}
|
||||
/>
|
||||
<label
|
||||
className="govuk-label govuk-checkboxes__label"
|
||||
htmlFor="documentBox"
|
||||
>
|
||||
separate documents
|
||||
</label>
|
||||
</div>
|
||||
<div
|
||||
className={
|
||||
_.isEmpty(formObj["representationForm"])
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
|
||||
: _.isEmpty(
|
||||
formObj["representationForm"]
|
||||
.values
|
||||
)
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
||||
: _.isEmpty(
|
||||
formObj["representationForm"]
|
||||
.values.documentBox
|
||||
)
|
||||
? formObj["representationForm"]
|
||||
.values.documentBox == false
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
||||
: "govuk-checkboxes__conditional"
|
||||
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden"
|
||||
}
|
||||
id="conditional-documentBox"
|
||||
>
|
||||
<div className="govuk-form-group">
|
||||
<section className="container">
|
||||
<div
|
||||
{...getRootProps({
|
||||
className: "dropzone",
|
||||
})}
|
||||
>
|
||||
<input {...getInputProps()} />
|
||||
<p>
|
||||
Drag and drop files here or
|
||||
click to select files
|
||||
</p>
|
||||
</div>
|
||||
<aside>
|
||||
<h4>Files</h4>
|
||||
<ul>{files}</ul>
|
||||
</aside>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
/>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>{" "}
|
||||
|
||||
@@ -11,6 +11,7 @@ import {
|
||||
RenderRadioList,
|
||||
RenderMultiline,
|
||||
RenderFileUpload,
|
||||
FileUploadField,
|
||||
} from "./representationElements";
|
||||
import { useDropzone } from "react-dropzone";
|
||||
// import {
|
||||
@@ -70,6 +71,7 @@ const RepAppellant = (props) => {
|
||||
/>
|
||||
</div>
|
||||
</div> */}
|
||||
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
<p className="govuk-body">
|
||||
@@ -81,124 +83,33 @@ const RepAppellant = (props) => {
|
||||
aria-describedby="commentBox-hint"
|
||||
>
|
||||
<div id="commentBox-hint" className="govuk-hint">
|
||||
My comments are set out in:*
|
||||
My comments are set out in:
|
||||
</div>
|
||||
<div
|
||||
className="govuk-checkboxes"
|
||||
data-module="govuk-checkboxes"
|
||||
>
|
||||
<div className="govuk-checkboxes__item">
|
||||
<Field
|
||||
className="govuk-checkboxes__input"
|
||||
id="commentBox"
|
||||
name="commentBox"
|
||||
value="email"
|
||||
data-aria-controls="commentBox"
|
||||
type="checkbox"
|
||||
component={RenderTextfield}
|
||||
/>
|
||||
<label
|
||||
className="govuk-label govuk-checkboxes__label"
|
||||
htmlFor="commentBox"
|
||||
>
|
||||
the box below{" "}
|
||||
</label>
|
||||
</div>
|
||||
<div
|
||||
className={
|
||||
_.isEmpty(formObj["representationForm"])
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
|
||||
: _.isEmpty(
|
||||
formObj["representationForm"]
|
||||
.values
|
||||
)
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden q11 "
|
||||
: _.isEmpty(
|
||||
formObj["representationForm"]
|
||||
.values.commentBox
|
||||
)
|
||||
? formObj["representationForm"]
|
||||
.values.commentBox == false
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
||||
: "govuk-checkboxes__conditional"
|
||||
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden wwwaqqqq"
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
name="representationComments"
|
||||
id="representationComments"
|
||||
component={RenderMultiline}
|
||||
type="text"
|
||||
rows="5"
|
||||
className="govuk-textarea govuk-input--width-30"
|
||||
aria-describedby={props.name + "-hint"}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
||||
<FileUploadField
|
||||
name={"representationDocuments"}
|
||||
label={"Add your files"}
|
||||
ticketnumber={props.props.caseReference}
|
||||
hint={"sdsd"}
|
||||
fileList={[]}
|
||||
setFilesForRepresentation={[]}
|
||||
containerID={
|
||||
props.props.props.accountDetails
|
||||
.containerID
|
||||
}
|
||||
id="conditional-commentBox"
|
||||
>
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
name="representationComments"
|
||||
id="representationComments"
|
||||
component={RenderMultiline}
|
||||
type="text"
|
||||
rows="5"
|
||||
className="govuk-textarea govuk-input--width-30"
|
||||
aria-describedby={
|
||||
props.name + "-hint"
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="govuk-checkboxes__item">
|
||||
<Field
|
||||
className="govuk-checkboxes__input"
|
||||
id="documentBox"
|
||||
name="documentBox"
|
||||
data-aria-controls="documentBox"
|
||||
type="checkbox"
|
||||
component={RenderTextfield}
|
||||
/>
|
||||
<label
|
||||
className="govuk-label govuk-checkboxes__label"
|
||||
htmlFor="documentBox"
|
||||
>
|
||||
separate documents
|
||||
</label>
|
||||
</div>
|
||||
<div
|
||||
className={
|
||||
_.isEmpty(formObj["representationForm"])
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
|
||||
: _.isEmpty(
|
||||
formObj["representationForm"]
|
||||
.values
|
||||
)
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
||||
: _.isEmpty(
|
||||
formObj["representationForm"]
|
||||
.values.documentBox
|
||||
)
|
||||
? formObj["representationForm"]
|
||||
.values.documentBox == false
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
||||
: "govuk-checkboxes__conditional"
|
||||
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden"
|
||||
}
|
||||
id="conditional-documentBox"
|
||||
>
|
||||
<h2 className="govuk-heading-s">
|
||||
{props.label}{" "}
|
||||
</h2>
|
||||
<Field
|
||||
name="repsFiles"
|
||||
id="repsFiles"
|
||||
component={RenderFileUpload}
|
||||
className="govuk-input govuk-input--width-20"
|
||||
//validate={[required]}
|
||||
label={props.label}
|
||||
errorMsg="Is required"
|
||||
ticketnumber={props.caseReference}
|
||||
documentTypeCode={
|
||||
props.documentTypeCode
|
||||
}
|
||||
hint={props.hint}
|
||||
fileList={props.fileList}
|
||||
setFilesForAppeal={
|
||||
props.setFilesForAppeal
|
||||
}
|
||||
containerID={props.containerID}
|
||||
/>
|
||||
</div>
|
||||
/>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>{" "}
|
||||
|
||||
@@ -77,7 +77,7 @@ let RepCapacitySelection = (props) => {
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
>
|
||||
Continue
|
||||
{t("common:continue-button")}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -166,6 +166,7 @@ const RepCompleteSubmit = (props) => {
|
||||
|
||||
<dd className="govuk-summary-list__value">
|
||||
<span
|
||||
className="multiline-elipsis"
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: repFormData.representationComments,
|
||||
}}
|
||||
@@ -260,12 +261,12 @@ const RepCompleteSubmit = (props) => {
|
||||
type="submit"
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
onClick={() =>
|
||||
//setRepresentationSubmitConfirmation()
|
||||
setRepresentationSubmit(true)
|
||||
}
|
||||
// onClick={() => {
|
||||
// setRepresentationSubmitConfirmation();
|
||||
// setRepresentationSubmit(true);
|
||||
// }}
|
||||
>
|
||||
Continue
|
||||
{t("common:continue-button")}
|
||||
</button>
|
||||
{/* <a
|
||||
onClick={() => {
|
||||
@@ -280,7 +281,7 @@ const RepCompleteSubmit = (props) => {
|
||||
onClick={() => setSubmitBack()}
|
||||
className="govuk-link"
|
||||
>
|
||||
Back
|
||||
{t("case:summary-back-button-label")}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -117,25 +117,26 @@ const RepInterestedPartyPerson = (props) => {
|
||||
</fieldset>
|
||||
</div>{" "}
|
||||
</div>
|
||||
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-button-group">
|
||||
{/* <button
|
||||
<button
|
||||
type="submit"
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
>
|
||||
Continue
|
||||
</button> */}
|
||||
{t("common:continue-button")}
|
||||
</button>
|
||||
{/* <Link href="/representation">
|
||||
<a
|
||||
onClick={() => {
|
||||
setRepresentationSubmit(true);
|
||||
}}
|
||||
className="govuk-button"
|
||||
>
|
||||
Continue
|
||||
</a>
|
||||
</Link> */}
|
||||
<a
|
||||
onClick={() => {
|
||||
setRepresentationSubmit(true);
|
||||
}}
|
||||
className="govuk-button"
|
||||
>
|
||||
Continue
|
||||
</a>
|
||||
</Link> */}
|
||||
<a
|
||||
onClick={() => {
|
||||
setRepresentationCapacity();
|
||||
@@ -143,7 +144,7 @@ const RepInterestedPartyPerson = (props) => {
|
||||
}}
|
||||
className="govuk-link"
|
||||
>
|
||||
Back
|
||||
{t("case:summary-back-button-label")}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,6 +7,7 @@ import {
|
||||
RenderTextfield,
|
||||
RenderRadioList,
|
||||
RenderMultiline,
|
||||
FileUploadField,
|
||||
} from "./representationElements";
|
||||
import { useDropzone } from "react-dropzone";
|
||||
import {
|
||||
@@ -69,6 +70,7 @@ const RepLandOwner = (props) => {
|
||||
/>
|
||||
</div>
|
||||
</div> */}
|
||||
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
<p className="govuk-body">
|
||||
@@ -80,126 +82,38 @@ const RepLandOwner = (props) => {
|
||||
aria-describedby="commentBox-hint"
|
||||
>
|
||||
<div id="commentBox-hint" className="govuk-hint">
|
||||
My comments are set out in:*
|
||||
My comments are set out in:
|
||||
</div>
|
||||
<div
|
||||
className="govuk-checkboxes"
|
||||
data-module="govuk-checkboxes"
|
||||
>
|
||||
<div className="govuk-checkboxes__item">
|
||||
<Field
|
||||
className="govuk-checkboxes__input"
|
||||
id="commentBox"
|
||||
name="commentBox"
|
||||
value="email"
|
||||
data-aria-controls="commentBox"
|
||||
type="checkbox"
|
||||
component={RenderTextfield}
|
||||
/>
|
||||
<label
|
||||
className="govuk-label govuk-checkboxes__label"
|
||||
htmlFor="commentBox"
|
||||
>
|
||||
the box below{" "}
|
||||
</label>
|
||||
</div>
|
||||
<div
|
||||
className={
|
||||
_.isEmpty(formObj["representationForm"])
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
|
||||
: _.isEmpty(
|
||||
formObj["representationForm"]
|
||||
.values
|
||||
)
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden q11 "
|
||||
: _.isEmpty(
|
||||
formObj["representationForm"]
|
||||
.values.commentBox
|
||||
)
|
||||
? formObj["representationForm"]
|
||||
.values.commentBox == false
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
||||
: "govuk-checkboxes__conditional"
|
||||
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden wwwaqqqq"
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
name="representationComments"
|
||||
id="representationComments"
|
||||
component={RenderMultiline}
|
||||
type="text"
|
||||
rows="5"
|
||||
className="govuk-textarea govuk-input--width-30"
|
||||
aria-describedby={props.name + "-hint"}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
||||
<FileUploadField
|
||||
name={"representationDocuments"}
|
||||
label={"Add your files"}
|
||||
ticketnumber={props.props.caseReference}
|
||||
hint={"sdsd"}
|
||||
fileList={[]}
|
||||
setFilesForRepresentation={[]}
|
||||
containerID={
|
||||
props.props.props.accountDetails
|
||||
.containerID
|
||||
}
|
||||
id="conditional-commentBox"
|
||||
>
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
name="representationComments"
|
||||
id="representationComments"
|
||||
component={RenderMultiline}
|
||||
type="text"
|
||||
rows="5"
|
||||
className="govuk-textarea govuk-input--width-30"
|
||||
aria-describedby={
|
||||
props.name + "-hint"
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="govuk-checkboxes__item">
|
||||
<Field
|
||||
className="govuk-checkboxes__input"
|
||||
id="documentBox"
|
||||
name="documentBox"
|
||||
value="email"
|
||||
data-aria-controls="documentBox"
|
||||
type="checkbox"
|
||||
component={RenderTextfield}
|
||||
/>
|
||||
<label
|
||||
className="govuk-label govuk-checkboxes__label"
|
||||
htmlFor="documentBox"
|
||||
>
|
||||
separate documents
|
||||
</label>
|
||||
</div>
|
||||
<div
|
||||
className={
|
||||
_.isEmpty(formObj["representationForm"])
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden rr"
|
||||
: _.isEmpty(
|
||||
formObj["representationForm"]
|
||||
.values
|
||||
)
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
||||
: _.isEmpty(
|
||||
formObj["representationForm"]
|
||||
.values.documentBox
|
||||
)
|
||||
? formObj["representationForm"]
|
||||
.values.documentBox == false
|
||||
? "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden www"
|
||||
: "govuk-checkboxes__conditional"
|
||||
: "govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden"
|
||||
}
|
||||
id="conditional-documentBox"
|
||||
>
|
||||
<div className="govuk-form-group">
|
||||
<section className="container">
|
||||
<div
|
||||
{...getRootProps({
|
||||
className: "dropzone",
|
||||
})}
|
||||
>
|
||||
<input {...getInputProps()} />
|
||||
<p>
|
||||
Drag and drop files here or
|
||||
click to select files
|
||||
</p>
|
||||
</div>
|
||||
<aside>
|
||||
<h4>Files</h4>
|
||||
<ul>{files}</ul>
|
||||
</aside>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
/>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>{" "}
|
||||
</div>
|
||||
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-button-group">
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user