diff --git a/src/assets/confirmSubmission.svg b/src/assets/confirmSubmission.svg new file mode 100644 index 00000000..8a63edf6 --- /dev/null +++ b/src/assets/confirmSubmission.svg @@ -0,0 +1 @@ + diff --git a/src/assets/monitorLogSubmissionComplete.svg b/src/assets/monitorLogSubmissionComplete.svg new file mode 100644 index 00000000..aadd728d --- /dev/null +++ b/src/assets/monitorLogSubmissionComplete.svg @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/MonitorLog/EditLogFooter.jsx b/src/components/MonitorLog/EditLogFooter.jsx new file mode 100644 index 00000000..9b27dd80 --- /dev/null +++ b/src/components/MonitorLog/EditLogFooter.jsx @@ -0,0 +1,51 @@ +import { ButtonGroup, Button } from '@chakra-ui/react'; +import PropTypes from 'prop-types'; +import React from 'react'; + +const EditLogFooter = ({ role, submitForm, formMethods }) => { + if (role === 'admin') { + return ( + <> + + + + + + ); + } + + return ( + + + ); +}; + +EditLogFooter.propTypes = { + role: PropTypes.string.isRequired, + submitForm: PropTypes.func.isRequired, + // eslint-disable-next-line react/forbid-prop-types + formMethods: PropTypes.object.isRequired, +}; + +export default EditLogFooter; diff --git a/src/components/MonitorLog/EditLogPopup.jsx b/src/components/MonitorLog/EditLogPopup.jsx new file mode 100644 index 00000000..8a157255 --- /dev/null +++ b/src/components/MonitorLog/EditLogPopup.jsx @@ -0,0 +1,159 @@ +import { + Modal, + ModalOverlay, + ModalContent, + ModalHeader, + ModalBody, + ModalFooter, + useDisclosure, + Button, + RadioGroup, + Radio, + Textarea, + Text, + ButtonGroup, + useToast, +} from '@chakra-ui/react'; +import { React, useState } from 'react'; +import { FiEdit2 } from 'react-icons/fi'; +import PropTypes from 'prop-types'; +import { useNavigate } from 'react-router-dom'; + +const EditLog = ({ setModalStep, onClose, user }) => { + const [selected, setSelected] = useState(null); + const navigate = useNavigate(); + return ( + <> + Edit Log + + Would you rather... + { + setSelected(val); + }} + > + Directly edit the log + Request the surveyor to revise & resubmit the log + + + + + + + + + + ); +}; + +const RequestEdits = ({ setModalStep, onClose }) => { + const toast = useToast(); + const [value, setValue] = useState(''); + return ( + <> + You are requesting edits to this monitor log. + + Reason +