diff --git a/src/components/MonitorLog/ReviewSubmitTabPopup.jsx b/src/components/MonitorLog/ReviewSubmitTabPopup.jsx
new file mode 100644
index 00000000..47979fea
--- /dev/null
+++ b/src/components/MonitorLog/ReviewSubmitTabPopup.jsx
@@ -0,0 +1,128 @@
+import {
+ Modal,
+ ModalOverlay,
+ ModalContent,
+ ModalHeader,
+ ModalBody,
+ ModalFooter,
+ useDisclosure,
+ Button,
+ Image,
+ Center,
+ Text,
+ ButtonGroup,
+} from '@chakra-ui/react';
+import PropTypes from 'prop-types';
+import { FiCheck } from 'react-icons/fi';
+import { React, useState } from 'react';
+import { Link } from 'react-router-dom';
+import confirmSubmission from '../../assets/confirmSubmission.svg';
+import monitorLogSubmissionComplete from '../../assets/monitorLogSubmissionComplete.svg';
+
+const SubmitSurvey = ({ setModalStep, onClose, submit, formMethods }) => {
+ return (
+ <>
+ Are you sure you want to submit your survey log?
+
+
+
+
+
+
+
+
+
+
+
+ >
+ );
+};
+
+const Submitted = ({ onClose }) => {
+ return (
+ <>
+
+
+ Congratulations! You’ve submitted your monitor log for review.
+
+
+
+
+
+
+
+
+
+
+
+ >
+ );
+};
+
+function ReturnPopup({ submitForm, formMethods }) {
+ const [modalStep, setModalStep] = useState('submitSurvey');
+ const { isOpen, onOpen, onClose } = useDisclosure();
+
+ // useEffect(() => {
+ // setModalStep('reminderSelect');
+ // });
+
+ const modalContent = {
+ submitSurvey: (
+
+ ),
+ submitted: ,
+ };
+
+ return (
+ <>
+
+
+
+
+ {modalContent[modalStep]}
+
+ >
+ );
+}
+
+SubmitSurvey.propTypes = {
+ setModalStep: PropTypes.func.isRequired,
+ onClose: PropTypes.func.isRequired,
+ submit: PropTypes.func.isRequired,
+ // eslint-disable-next-line react/forbid-prop-types
+ formMethods: PropTypes.object.isRequired,
+};
+
+Submitted.propTypes = {
+ onClose: PropTypes.func.isRequired,
+};
+
+ReturnPopup.propTypes = {
+ submitForm: PropTypes.func.isRequired,
+ // eslint-disable-next-line react/forbid-prop-types
+ formMethods: PropTypes.object.isRequired,
+};
+
+export default ReturnPopup;
diff --git a/src/pages/AdminPage.jsx b/src/pages/AdminPage.jsx
index ff52e05d..699d4f7a 100644
--- a/src/pages/AdminPage.jsx
+++ b/src/pages/AdminPage.jsx
@@ -106,18 +106,6 @@ const AdminPage = () => {
SEGMENT, VOLUNTEER(S), and
APPROVAL STATUS.
- {/*
- {JSON.stringify(
- {
- segmentFilter,
- dateFilter,
- approvalFilter,
- searchFilter,
- },
- null,
- 2,
- )}
-
*/}
{
// eslint-disable-next-line react/prop-types
@@ -84,6 +88,7 @@ const MonitorLogPage = ({ mode }) => {
if (mode === 'edit' || mode === 'review') {
try {
const submission = await OCHBackend.get(`submission/${userData.id}`);
+ console.log(submission.data);
submission.data.date = parseISO(submission.data.date);
formMethods.reset(submission.data);
setSubmissionData(submission.data);
@@ -309,7 +314,7 @@ const MonitorLogPage = ({ mode }) => {
h="16"
zIndex="banner"
>
-
+
- {activeTab !== totalTabs - 1 && (
+ {mode === 'review' && (
+
+
+
+
+ )}
+ {mode === 'edit' && (
+
+ )}
+ {activeTab === totalTabs - 1 && mode === 'create' && (
+
+ )}
+ {activeTab !== totalTabs - 1 && mode === 'create' && (
)}
- {activeTab === totalTabs - 1 && (
-
- )}
diff --git a/yarn.lock b/yarn.lock
index a0ad2c27..8fe01453 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -119,7 +119,7 @@
convert-source-map "^1.7.0"
debug "^4.1.0"
gensync "^1.0.0-beta.2"
- json5 "^2.1.2"
+ json5 "^2.2.1"
semver "^6.3.0"
"@babel/generator@^7.12.1", "@babel/generator@^7.12.11", "@babel/generator@^7.12.5", "@babel/generator@^7.17.12":
@@ -131,15 +131,6 @@
"@jridgewell/gen-mapping" "^0.3.0"
jsesc "^2.5.1"
-"@babel/generator@^7.17.3":
- version "7.17.10"
- resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.17.10.tgz#c281fa35b0c349bbe9d02916f4ae08fc85ed7189"
- integrity sha512-46MJZZo9y3o4kmhBVc7zW7i8dtR1oIK/sdO5NcfcZRhTGYi+KKJRtHNgsU6c4VUcJmUNV/LQdebD/9Dlv4K+Tg==
- dependencies:
- "@babel/types" "^7.17.10"
- "@jridgewell/gen-mapping" "^0.1.0"
- jsesc "^2.5.1"
-
"@babel/helper-annotate-as-pure@^7.16.7":
version "7.16.7"
resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz#bb2339a7534a9c128e3102024c60760a3a7f3862"
@@ -172,8 +163,8 @@
dependencies:
"@babel/helper-annotate-as-pure" "^7.16.7"
"@babel/helper-environment-visitor" "^7.16.7"
- "@babel/helper-function-name" "^7.16.7"
- "@babel/helper-member-expression-to-functions" "^7.16.7"
+ "@babel/helper-function-name" "^7.17.9"
+ "@babel/helper-member-expression-to-functions" "^7.17.7"
"@babel/helper-optimise-call-expression" "^7.16.7"
"@babel/helper-replace-supers" "^7.16.7"
"@babel/helper-split-export-declaration" "^7.16.7"
@@ -228,7 +219,7 @@
dependencies:
"@babel/types" "^7.16.7"
-"@babel/helper-function-name@^7.16.7":
+"@babel/helper-function-name@^7.16.7", "@babel/helper-function-name@^7.17.9":
version "7.17.9"
resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz#136fcd54bc1da82fcb47565cf16fd8e444b1ff12"
integrity sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg==
@@ -243,7 +234,7 @@
dependencies:
"@babel/types" "^7.16.7"
-"@babel/helper-member-expression-to-functions@^7.16.7", "@babel/helper-member-expression-to-functions@^7.17.7":
+"@babel/helper-member-expression-to-functions@^7.16.7":
version "7.17.7"
resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.17.7.tgz#a34013b57d8542a8c4ff8ba3f747c02452a4d8c4"
integrity sha512-thxXgnQ8qQ11W2wVUObIqDL4p148VMxkt5T/qpN5k2fboRyzFGFmKsTGViquyM5QHKUy48OZoca8kw4ajaDPyw==
@@ -1183,7 +1174,7 @@
"@babel/code-frame" "^7.16.7"
"@babel/generator" "^7.17.12"
"@babel/helper-environment-visitor" "^7.16.7"
- "@babel/helper-function-name" "^7.16.7"
+ "@babel/helper-function-name" "^7.17.9"
"@babel/helper-hoist-variables" "^7.16.7"
"@babel/helper-split-export-declaration" "^7.16.7"
"@babel/parser" "^7.17.12"
@@ -1199,14 +1190,6 @@
"@babel/helper-validator-identifier" "^7.16.7"
to-fast-properties "^2.0.0"
-"@babel/types@^7.17.10":
- version "7.17.10"
- resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.10.tgz#d35d7b4467e439fcf06d195f8100e0fea7fc82c4"
- integrity sha512-9O26jG0mBYfGkUYCYZRnBwbVLd1UZOICEr2Em6InB6jVfsAv1GKgwXHmrSg+WFWDmeKTA6vyTZiN8tCSM5Oo3A==
- dependencies:
- "@babel/helper-validator-identifier" "^7.16.7"
- to-fast-properties "^2.0.0"
-
"@base2/pretty-print-object@1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@base2/pretty-print-object/-/pretty-print-object-1.0.1.tgz#371ba8be66d556812dc7fb169ebc3c08378f69d4"
@@ -1976,7 +1959,7 @@
"@emotion/utils" "0.11.3"
csstype "^2.5.7"
-"@emotion/serialize@^1.0.2":
+"@emotion/serialize@^1.0.2", "@emotion/serialize@^1.0.3":
version "1.0.3"
resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.0.3.tgz#99e2060c26c6292469fb30db41f4690e1c8fea63"
integrity sha512-2mSSvgLfyV3q+iVh3YWgNlUc2a9ZlDU7DjuP5MjK3AXRR0dYigCrP99aeFtaB2L/hjfEZdSThn5dsZ0ufqbvsA==
@@ -2722,11 +2705,6 @@
resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.1.tgz#36a6acc93987adcf0ba50c66908bd0b70de8afea"
integrity sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==
-"@jridgewell/set-array@^1.0.0":
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.1.tgz#36a6acc93987adcf0ba50c66908bd0b70de8afea"
- integrity sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==
-
"@jridgewell/sourcemap-codec@^1.4.10":
version "1.4.13"
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz#b6461fb0c2964356c469e115f504c95ad97ab88c"
@@ -10959,7 +10937,7 @@ json5@^1.0.1:
dependencies:
minimist "^1.2.0"
-json5@^2.1.2, json5@^2.1.3, json5@^2.2.1:
+json5@^2.1.2, json5@^2.1.3:
version "2.2.1"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c"
integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==
@@ -16204,11 +16182,6 @@ tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.4
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3"
integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==
-tslib@^2.4.0:
- version "2.4.0"
- resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3"
- integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==
-
tsutils@^3.17.1, tsutils@^3.21.0:
version "3.21.0"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"
@@ -16563,14 +16536,6 @@ use-dark-mode@2.3.1:
"@use-it/event-listener" "^0.1.2"
use-persisted-state "^0.3.0"
-use-dark-mode@2.3.1:
- version "2.3.1"
- resolved "https://registry.yarnpkg.com/use-dark-mode/-/use-dark-mode-2.3.1.tgz#d506349c7b7e09e9977cb8a6ab4470896aa3779a"
- integrity sha512-hmcdJR96tTustRQdaQwe6jMrZHnmPqXBxgy4jaQ4gsfhwajsCpjECuq9prgDe9XxMx/f9r96o2/md6O4Lwhwjg==
- dependencies:
- "@use-it/event-listener" "^0.1.2"
- use-persisted-state "^0.3.0"
-
use-force-update@^1.0.7:
version "1.0.8"
resolved "https://registry.yarnpkg.com/use-force-update/-/use-force-update-1.0.8.tgz#14483faa4571673f070080f8233057b43b266ace"