applied upload funcitonalilty to IP,Agent,LPA
This commit is contained in:
+43
-7
@@ -14,6 +14,11 @@ import {
|
||||
RenderRichMultiline,
|
||||
RenderTextfield,
|
||||
} from "../representationElements";
|
||||
import {
|
||||
setRepresentationCapacity,
|
||||
setRepresentationSubmit,
|
||||
setFilesForRepresentations,
|
||||
} from "../../../../store/currentView/action";
|
||||
|
||||
import { connect } from "react-redux";
|
||||
|
||||
@@ -33,6 +38,7 @@ let S78_Questionnaire = (props) => {
|
||||
procedureTypeValue,
|
||||
onBehalfOfLPA,
|
||||
showQuestionnaireSection,
|
||||
setFilesForRepresentations,
|
||||
} = props;
|
||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||
const files = acceptedFiles.map((file) => (
|
||||
@@ -986,13 +992,29 @@ let S78_Questionnaire = (props) => {
|
||||
ticketnumber={props.props.caseReference}
|
||||
hint={"sdsd"}
|
||||
fileList={
|
||||
props.props.props.props.form[
|
||||
"representationForm"
|
||||
].values.filesList || []
|
||||
props.currentView.caseReference.hasOwnProperty(
|
||||
"repDetails"
|
||||
)
|
||||
? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||
"filesList"
|
||||
) &&
|
||||
props.currentView.caseReference.repDetails
|
||||
.filesList.length > 0
|
||||
? props.currentView.caseReference
|
||||
.repDetails.filesList
|
||||
: []
|
||||
: []
|
||||
}
|
||||
setFilesForRepresentation={[]}
|
||||
containerID={props.containerID}
|
||||
filenamePrefix={props.props}
|
||||
setFilesForRepresentations={
|
||||
setFilesForRepresentations
|
||||
}
|
||||
containerID={
|
||||
props.props.props.props.accountDetails
|
||||
.containerID
|
||||
}
|
||||
filenamePrefix={props.props.formObj}
|
||||
props={props.props.props}
|
||||
setCurrentReference={props.setCurrentReference}
|
||||
/>
|
||||
</div>
|
||||
</fieldset>
|
||||
@@ -1064,6 +1086,17 @@ S78_Questionnaire = connect((state) => {
|
||||
};
|
||||
})(S78_Questionnaire);
|
||||
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
updateField: (form, field, newValue) =>
|
||||
dispatch(change(form, field, newValue)),
|
||||
|
||||
setFilesForRepresentations: (fileList) => {
|
||||
dispatch(setFilesForRepresentations(fileList));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
const mapStateToProps = (state, props) => {
|
||||
return {
|
||||
search: state.search,
|
||||
@@ -1076,7 +1109,10 @@ const mapStateToProps = (state, props) => {
|
||||
};
|
||||
};
|
||||
|
||||
export default connect(mapStateToProps)(
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(
|
||||
reduxForm({
|
||||
form: "representationForm",
|
||||
enableReinitialize: false,
|
||||
|
||||
Reference in New Issue
Block a user