diff --git a/docker-compose-linux.yml b/docker-compose-linux.yml index 5042af55d..1e7d19852 100644 --- a/docker-compose-linux.yml +++ b/docker-compose-linux.yml @@ -192,6 +192,7 @@ services: - FOI_FFA_URL=${FOI_FFA_URL} - REACT_APP_FOI_RECORD_FORMATS=${FOI_RECORD_FORMATS} - REACT_APP_RECORD_PROCESSING_HRS=${RECORD_PROCESSING_HRS} + - REACT_APP_SESSION_SECURITY_KEY=${REACT_APP_SESSION_SECURITY_KEY} volumes: - ".:/app" - "/app/node_modules" diff --git a/docker-compose.yml b/docker-compose.yml index 7110f214c..b7c2798c4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -229,6 +229,7 @@ services: - REACT_APP_DISABLE_GATHERINGRECORDS_TAB=${DISABLE_GATHERINGRECORDS_TAB} - REACT_APP_RECORD_DOWNLOAD_LIMIT=${RECORD_DOWNLOAD_LIMIT} - REACT_APP_RECORD_DOWNLOAD_SIZE_LIMIT=${RECORD_DOWNLOAD_SIZE_LIMIT} + - REACT_APP_SESSION_SECURITY_KEY=${REACT_APP_SESSION_SECURITY_KEY} volumes: - ".:/app" - "/app/node_modules" diff --git a/forms-flow-web/Dockerfile b/forms-flow-web/Dockerfile index a17c5a25b..2548fca5e 100644 --- a/forms-flow-web/Dockerfile +++ b/forms-flow-web/Dockerfile @@ -37,6 +37,7 @@ ARG REACT_APP_DISABLE_REDACT_WEBLINK ARG REACT_APP_DISABLE_GATHERINGRECORDS_TAB ARG REACT_APP_RECORD_DOWNLOAD_LIMIT ARG REACT_APP_RECORD_DOWNLOAD_SIZE_LIMIT +ARG REACT_APP_SESSION_SECURITY_KEY ENV NODE_ENV ${NODE_ENV} ENV GENERATE_SOURCEMAP ${GENERATE_SOURCEMAP} @@ -66,6 +67,7 @@ ENV REACT_APP_FOI_RECORD_FORMATS ${REACT_APP_FOI_RECORD_FORMATS} ENV REACT_APP_RECORD_PROCESSING_HRS ${REACT_APP_RECORD_PROCESSING_HRS} ENV REACT_APP_DISABLE_REDACT_WEBLINK ${REACT_APP_DISABLE_REDACT_WEBLINK} ENV REACT_APP_DISABLE_GATHERINGRECORDS_TAB ${REACT_APP_DISABLE_GATHERINGRECORDS_TAB} +ENV REACT_APP_SESSION_SECURITY_KEY ${REACT_APP_SESSION_SECURITY_KEY} ENV REACT_APP_SOCKETIO_CONNECT_NONCE ${REACT_APP_SOCKETIO_CONNECT_NONCE} ENV REACT_APP_RECORD_DOWNLOAD_LIMIT ${REACT_APP_RECORD_DOWNLOAD_LIMIT} diff --git a/forms-flow-web/Dockerfile.local b/forms-flow-web/Dockerfile.local index 8ee65d1be..4a7e37583 100644 --- a/forms-flow-web/Dockerfile.local +++ b/forms-flow-web/Dockerfile.local @@ -34,6 +34,7 @@ ARG REACT_APP_DISABLE_REDACT_WEBLINK ARG REACT_APP_DISABLE_GATHERINGRECORDS_TAB ARG REACT_APP_RECORD_DOWNLOAD_LIMIT ARG REACT_APP_RECORD_DOWNLOAD_SIZE_LIMIT +ARG REACT_APP_SESSION_SECURITY_KEY ENV NODE_ENV ${NODE_ENV} ENV GENERATE_SOURCEMAP ${GENERATE_SOURCEMAP} @@ -63,6 +64,7 @@ ENV REACT_APP_DISABLE_REDACT_WEBLINK ${REACT_APP_DISABLE_REDACT_WEBLINK} ENV REACT_APP_DISABLE_GATHERINGRECORDS_TAB ${REACT_APP_DISABLE_GATHERINGRECORDS_TAB} ENV REACT_APP_RECORD_DOWNLOAD_LIMIT ${REACT_APP_RECORD_DOWNLOAD_LIMIT} ENV REACT_APP_RECORD_DOWNLOAD_SIZE_LIMIT ${REACT_APP_RECORD_DOWNLOAD_SIZE_LIMIT} +ENV REACT_APP_SESSION_SECURITY_KEY ${REACT_APP_SESSION_SECURITY_KEY} # add `/app/node_modules/.bin` to $PATH ENV PATH /forms-flow-web/app/node_modules/.bin:$PATH diff --git a/forms-flow-web/docker-compose.yml b/forms-flow-web/docker-compose.yml index d1d17a934..15303ab3d 100644 --- a/forms-flow-web/docker-compose.yml +++ b/forms-flow-web/docker-compose.yml @@ -35,6 +35,7 @@ services: - REACT_APP_FOI_FLOW_REPORTING_URL=${FOI_FLOW_REPORTING_URL} - REACT_APP_AXIS_API_URL=${AXIS_API_URL} - REACT_APP_SOCKETIO_CONNECT_NONCE=${SOCKETIO_CONNECT_NONCE} + - REACT_APP_SESSION_SECURITY_KEY=${REACT_APP_SESSION_SECURITY_KEY} volumes: - ".:/app" - "/app/node_modules" diff --git a/forms-flow-web/src/components/FOI/customComponents/Attachments/AttachmentModal.js b/forms-flow-web/src/components/FOI/customComponents/Attachments/AttachmentModal.js index 73e2dbbae..907436dfb 100644 --- a/forms-flow-web/src/components/FOI/customComponents/Attachments/AttachmentModal.js +++ b/forms-flow-web/src/components/FOI/customComponents/Attachments/AttachmentModal.js @@ -670,7 +670,7 @@ export default function AttachmentModal({ MCFPopularSections - 1 )} otherTagList={MCFSections?.sections?.slice( - MCFPopularSections + MCFPopularSections - 1 )} handleTagChange={handleTagChange} tagValue={tagValue} @@ -712,7 +712,7 @@ export default function AttachmentModal({ MSDPopularSections - 1 )} otherTagList={MSDSections?.divisions[0]?.sections?.slice( - MSDPopularSections + MSDPopularSections - 1 )} handleTagChange={handleTagChange} tagValue={tagValue} diff --git a/forms-flow-web/src/components/FOI/customComponents/FileUpload/FileUploadForMCFPersonal.js b/forms-flow-web/src/components/FOI/customComponents/FileUpload/FileUploadForMCFPersonal.js index e2684629f..982b85b94 100644 --- a/forms-flow-web/src/components/FOI/customComponents/FileUpload/FileUploadForMCFPersonal.js +++ b/forms-flow-web/src/components/FOI/customComponents/FileUpload/FileUploadForMCFPersonal.js @@ -83,8 +83,8 @@ const FileUploadForMCFPersonal = ({ isMinistryCoordinator?MCFPeople?.people.filter((p)=>{return p.name !== 'PERSON 1'}):MCFPeople?.people.filter((p)=>{return p.name !== 'APPLICANT'}) ); const [allVolumes, setAllVolumes] = useState(MCFVolumes?.volumes); - const [fileTypes, setFileTypes] = useState(MCFFiletypes?.filetypes.slice(0, 6)); - const [otherFileTypes, setOtherFileTypes] = useState(MCFFiletypes?.filetypes.slice(6, MCFFiletypes?.filetypes.length)); + const [fileTypes, setFileTypes] = useState(MCFFiletypes?.filetypes.slice(0, 8)); + const [otherFileTypes, setOtherFileTypes] = useState(MCFFiletypes?.filetypes.slice(8, MCFFiletypes?.filetypes.length)); const [people, setPeople] = useState(allPeople.slice(0, 5)); const [volumes, setVolumes] = useState(allVolumes.slice(0, 5)); const [showAllPeople, setShowAllPeople] = useState(false); @@ -212,13 +212,9 @@ const FileUploadForMCFPersonal = ({ const fileDrop = (e) => { e.preventDefault(); - if(modalFor === "add" && (!isPersonSelected || ((isMinistryCoordinator && tagValue == "")))) { - return - } else { - const newFiles = e.dataTransfer.files; - const totalNoOfFiles = Object.entries(files).length + newFiles.length; - validateFiles(newFiles, totalNoOfFiles); - } + const newFiles = e.dataTransfer.files; + const totalNoOfFiles = Object.entries(files).length + newFiles.length; + validateFiles(newFiles, totalNoOfFiles); } const removeFile = (fileName) => { const _file = files[fileName]; @@ -712,12 +708,11 @@ const FileUploadForMCFPersonal = ({ value="" multiple={multipleFiles} accept={mimeTypes} - disabled={modalFor === "add" && (!isPersonSelected || ((isMinistryCoordinator && tagValue == "")))} />