From cee24a3b38fce0bfadb6dfdef0a6ea825448a6a8 Mon Sep 17 00:00:00 2001 From: Kei Asakawa <77090883+Kaiyooon@users.noreply.github.com> Date: Wed, 25 May 2022 21:10:43 -0700 Subject: [PATCH] Implemented navigation for edit log button --- src/components/MonitorLog/EditLogPopup.jsx | 159 ++++++++++++++++++ .../MonitorLog/ReviewSubmitTabPopup.jsx | 72 ++++---- src/pages/MonitorLogPage.jsx | 6 +- 3 files changed, 199 insertions(+), 38 deletions(-) create mode 100644 src/components/MonitorLog/EditLogPopup.jsx 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 +