From 9cf2111b51289835bd8c9904aa9ad6e02ae9053b Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Fri, 12 Jan 2024 18:15:54 -0600 Subject: [PATCH 1/8] more --- src/Components/Home/HomePage.js | 1 - src/Components/Modals/CreateModal.js | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/Components/Home/HomePage.js b/src/Components/Home/HomePage.js index 824ad61..a84120f 100644 --- a/src/Components/Home/HomePage.js +++ b/src/Components/Home/HomePage.js @@ -191,7 +191,6 @@ const HomePage = () => {
-

Your Novodash displays important deadlines, sends email/SMS diff --git a/src/Components/Modals/CreateModal.js b/src/Components/Modals/CreateModal.js index 241c1c8..776c6c3 100644 --- a/src/Components/Modals/CreateModal.js +++ b/src/Components/Modals/CreateModal.js @@ -65,8 +65,6 @@ const CreateModal = ({ setShowModal, caseData }) => { const validateData = () => { const newData = getValidatedFormData(data, fields); const hasErrors = isFormDataHasErrors(newData); - console.log("newData", newData); - console.log("hasErrors", hasErrors); setData(newData); return hasErrors ? null : objectMap(({ value }) => value, newData); }; From a597a407e8bee0a13d4e2235cf3e2872576e9033 Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Fri, 12 Jan 2024 18:18:07 -0600 Subject: [PATCH 2/8] more --- src/Components/Document/DocEditPage.js | 1 - src/Components/Document/DocumentListPage.js | 1 - src/Components/Home/DemoRequestPage.js | 1 - src/Components/Login/Login.js | 2 +- src/Components/Modals/UploadModal.js | 3 +-- src/Hooks/useReducer/reducers.js | 2 -- 6 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Components/Document/DocEditPage.js b/src/Components/Document/DocEditPage.js index dc5728c..d8e889e 100644 --- a/src/Components/Document/DocEditPage.js +++ b/src/Components/Document/DocEditPage.js @@ -57,7 +57,6 @@ const DocEditPage = () => { : docEditCopy.NewYork; const headerPicker = () => { - console.log("state", state); switch (state) { case "New York": return ( diff --git a/src/Components/Document/DocumentListPage.js b/src/Components/Document/DocumentListPage.js index 90d2692..1837224 100644 --- a/src/Components/Document/DocumentListPage.js +++ b/src/Components/Document/DocumentListPage.js @@ -106,7 +106,6 @@ const DocumentListPage = ({ perPage }) => { async function deleteFromStorage() { const selectedDoc = allDocs.filter((doc) => { - console.log("doc", doc); return doc.documentId == selectedDocumentId; }); console.log( diff --git a/src/Components/Home/DemoRequestPage.js b/src/Components/Home/DemoRequestPage.js index b68c29d..73a285d 100644 --- a/src/Components/Home/DemoRequestPage.js +++ b/src/Components/Home/DemoRequestPage.js @@ -40,7 +40,6 @@ const DemoRequestPage = () => { }; async function saveUserData(dataValues) { - console.log("saveUserData dataValues", dataValues); const { firstName, lastName, firm, telephone, email } = dataValues; const requestDate = new Date(); dataValues["requestDate"] = requestDate; diff --git a/src/Components/Login/Login.js b/src/Components/Login/Login.js index 0b0b0a4..fca31c7 100644 --- a/src/Components/Login/Login.js +++ b/src/Components/Login/Login.js @@ -47,7 +47,7 @@ const Login = () => { function handleClick(e) { e.preventDefault(); - console.log("handleClick fired"); + //searchParams.set("mode", mode); //setSearchParams(searchParams); //navigate(`/passwordreset/?mode=enterEmail`); diff --git a/src/Components/Modals/UploadModal.js b/src/Components/Modals/UploadModal.js index 94b2f70..7bdbdae 100644 --- a/src/Components/Modals/UploadModal.js +++ b/src/Components/Modals/UploadModal.js @@ -72,7 +72,6 @@ const UploadModal = (props) => { body: file, }); const res = response; - console.log("-------------------------------------------->res", res); return res; } catch (error) { console.error("Error:", error); @@ -101,7 +100,7 @@ const UploadModal = (props) => { let response = {}; const res = await uploadFile(formData); - console.log("--------------------------res", res); + response["uuidName"] = uuidName; response["res"] = res; return response; diff --git a/src/Hooks/useReducer/reducers.js b/src/Hooks/useReducer/reducers.js index 66d3331..5688e15 100755 --- a/src/Hooks/useReducer/reducers.js +++ b/src/Hooks/useReducer/reducers.js @@ -3,7 +3,6 @@ export const useGroupReducer = (state, action) => { case "CREATE_GROUP": return { ...state, group: action.payload }; case "UPDATE_GROUP_NAME": - console.log("state, action.payload", state, action.payload); return [...state, { name: action.payload }]; case "DELETE_GROUP": return { ...state, group: null }; @@ -17,7 +16,6 @@ export const useDataReducer = (state, action) => { case "CREATE_CASES": return { ...state, cases: action.payload }; case "UPDATE_GROUP_NAME": - console.log("state, action.payload", state, action.payload); return [...state, { cases: action.payload }]; default: return state; From 915472c86f2c3f21c1a32179bb1da8cf784f1c35 Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Fri, 12 Jan 2024 18:41:08 -0600 Subject: [PATCH 3/8] more --- src/Components/Dashboard/Dashboard.js | 143 +++++++++++++++----------- src/Components/MobileContent.js | 22 +++- 2 files changed, 101 insertions(+), 64 deletions(-) diff --git a/src/Components/Dashboard/Dashboard.js b/src/Components/Dashboard/Dashboard.js index 448bb31..86f2e91 100644 --- a/src/Components/Dashboard/Dashboard.js +++ b/src/Components/Dashboard/Dashboard.js @@ -1,6 +1,7 @@ -import React, { useState, useContext, useEffect } from "react"; +import React, { useState, useContext, useEffect, useRef } from "react"; import { CaseCard } from "../../pageElements/Cards.js"; import { Link, useNavigate } from "react-router-dom"; +import MobileContent from "../MobileContent"; import { ArrowRight, Activity, @@ -16,6 +17,9 @@ import UploadModal from "../Modals/UploadModal.js"; import Button from "react-bootstrap/Button"; const Dashboard = () => { + const size = window.innerWidth < 440; + const [isMobile, setIsMobile] = useState(size); + const count = useRef(null); const navigate = useNavigate(); const [allCases, setAllCases] = useState(null); const [selectedCase, setSelectedCase] = useState(null); @@ -25,6 +29,18 @@ const Dashboard = () => { const { appState } = useContext(AppContext); const { group } = appState; const appUserId = group ? group.appUserId : null; + const isDashboard = true; + useEffect(() => { + if (count.current == null) { + setIsMobile(window.innerWidth < 440); + } + if (count.current < 3) { + setIsMobile(window.innerWidth < 440); + } + return () => { + count.current = 1; + }; + }, []); function getCases() { if (!appUserId) { @@ -83,6 +99,67 @@ const Dashboard = () => { return null; } + const DesktopContent = () => { + return allCases !== null ? ( +

+
+ { + let item = null; + for (const currentItem of selected) { + item = { ...currentItem }; + } + setSelectedCase(item); + }} + /> + + +
+ {allCases.slice(0, 3).map((c, i) => ( + + ))} + {allCases?.length > 3 ? ( +
+
+ + View All{" "} + + + + +
+
+ ) : null} +
+ ) : null; + }; + return ( <>
@@ -179,65 +256,11 @@ const Dashboard = () => {
- {allCases === null ?
Loading...
: null} - {allCases !== null ? ( -
-
- { - let item = null; - for (const currentItem of selected) { - item = { ...currentItem }; - } - setSelectedCase(item); - }} - /> - - -
- {allCases.slice(0, 3).map((c, i) => ( - - ))} - {allCases?.length > 3 ? ( -
-
- - View All{" "} - - - - -
-
- ) : null} -
- ) : null} + {isMobile ? ( + + ) : ( + + )} {showModal && selectedCase !== null ? ( ) : null} diff --git a/src/Components/MobileContent.js b/src/Components/MobileContent.js index f06332c..6cf20d9 100644 --- a/src/Components/MobileContent.js +++ b/src/Components/MobileContent.js @@ -1,8 +1,20 @@ import legalTechFlip from "../Assets/Images/legalTechFlip.jpg"; const MobileContent = ({ isDashboard }) => { - const copy = isDashboard - ? "hello dash" - : "Novodraft is a desktop application. Please login on your desktop device to use this feature"; + const copy = isDashboard ? ( +
+

+ Novodraft is a desktop application. The functionailty of your Dashboard + in mobile mode is limited to displaying stats and important + notifications. +

+

+ Please login on your desktop device to use all of the functions your + Dashboard. +

+
+ ) : ( + "Novodraft is a desktop application. Please login on your desktop device to use this feature." + ); return ( <> @@ -15,7 +27,9 @@ const MobileContent = ({ isDashboard }) => { ) : ( - <> + <> +
+ )}
{copy}
From 9965471c56b44ec4b2bd8038730c8457de2687d2 Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Fri, 12 Jan 2024 18:57:05 -0600 Subject: [PATCH 4/8] more --- src/Components/MobileContent.js | 10 +++++++--- src/styles/app.scss | 15 +++++++++++++++ src/styles/dashboard.scss | 31 ++++++++++++++++++++++++++++++- 3 files changed, 52 insertions(+), 4 deletions(-) diff --git a/src/Components/MobileContent.js b/src/Components/MobileContent.js index 6cf20d9..4a1fe7d 100644 --- a/src/Components/MobileContent.js +++ b/src/Components/MobileContent.js @@ -2,12 +2,12 @@ import legalTechFlip from "../Assets/Images/legalTechFlip.jpg"; const MobileContent = ({ isDashboard }) => { const copy = isDashboard ? (
-

+

Novodraft is a desktop application. The functionailty of your Dashboard in mobile mode is limited to displaying stats and important notifications.

-

+

Please login on your desktop device to use all of the functions your Dashboard.

@@ -31,7 +31,11 @@ const MobileContent = ({ isDashboard }) => {
)} -
{copy}
+ {isDashboard ? ( +
{copy}
+ ) : ( +
{copy}
+ )}
diff --git a/src/styles/app.scss b/src/styles/app.scss index 2200686..44cbae3 100644 --- a/src/styles/app.scss +++ b/src/styles/app.scss @@ -99,4 +99,19 @@ p { font-size: 15px; line-height: 21px; } + .mobile-info-heading-dashboard { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + margin: 2px 6px 2px 6px; + text-align: justify; + font-size: 15px; + line-height: 21px; + } + + .mobile-text-dashboard { + margin-bottom: 6px; + padding: 0px 6px; + } } diff --git a/src/styles/dashboard.scss b/src/styles/dashboard.scss index ab568f3..9dcbef9 100644 --- a/src/styles/dashboard.scss +++ b/src/styles/dashboard.scss @@ -80,8 +80,37 @@ flex-direction: column; } -@media only screen and (min-width: map.get($grid-breakpoints, "md")) { +@media only screen and (max-width: 430px) { + .dashboard-header { + display: flex; + gap: 1rem; + justify-content: center; + margin: 30px 0px 0px 0px; + align-items: center; + margin-left: auto; + margin-right: auto; + padding: 12px 0px; + width: 280px; + background-color: var(--background-blue); + border-radius: 15px; + } + .dashboard-filter { flex-direction: row; } + + .stats-container { + height: 100%; + } + + .stats-row-box { + display: flex; + flex-direction: column; + align-items: center; + margin: 12px 0px; + padding: 0px 6px; + background-color: #fff; + height: 100%; + border-radius: 6px; + } } From a87208c3ff12cdb68fb44a0883c8d0cce6cda293 Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Fri, 12 Jan 2024 19:18:17 -0600 Subject: [PATCH 5/8] more --- src/Components/MobileContent.js | 25 ++++++++++++++----------- src/styles/dashboard.scss | 12 +++++++++++- 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/src/Components/MobileContent.js b/src/Components/MobileContent.js index 4a1fe7d..fe69954 100644 --- a/src/Components/MobileContent.js +++ b/src/Components/MobileContent.js @@ -1,17 +1,20 @@ import legalTechFlip from "../Assets/Images/legalTechFlip.jpg"; const MobileContent = ({ isDashboard }) => { const copy = isDashboard ? ( -
-

- Novodraft is a desktop application. The functionailty of your Dashboard - in mobile mode is limited to displaying stats and important - notifications. -

-

- Please login on your desktop device to use all of the functions your - Dashboard. -

-
+ <> +
+

+ Novodraft is a desktop application. The functionailty of your + Dashboard in mobile mode is limited to displaying stats and important + notifications. +

+

+ Please login on your desktop device to use all of the functions your + Dashboard. +

+
+
+ ) : ( "Novodraft is a desktop application. Please login on your desktop device to use this feature." ); diff --git a/src/styles/dashboard.scss b/src/styles/dashboard.scss index 9dcbef9..38da5e3 100644 --- a/src/styles/dashboard.scss +++ b/src/styles/dashboard.scss @@ -107,10 +107,20 @@ display: flex; flex-direction: column; align-items: center; - margin: 12px 0px; + margin-top: 12px; + margin-bottom: 0px; padding: 0px 6px; background-color: #fff; height: 100%; border-radius: 6px; } + + .stats-unit-wrapper { + display: flex; + flex-direction: row; + background-color: var(--barely-there-accent); + margin: 4px 0px; + padding: 8px 0px; + border-radius: 15px; + } } From ea91ce9caa325cf9f395b4b6d02de5104d47ee3e Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Fri, 12 Jan 2024 19:23:25 -0600 Subject: [PATCH 6/8] more --- src/Components/MobileContent.js | 1 - src/styles/dashboard.scss | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Components/MobileContent.js b/src/Components/MobileContent.js index fe69954..5d2eec3 100644 --- a/src/Components/MobileContent.js +++ b/src/Components/MobileContent.js @@ -13,7 +13,6 @@ const MobileContent = ({ isDashboard }) => { Dashboard.

-
) : ( "Novodraft is a desktop application. Please login on your desktop device to use this feature." diff --git a/src/styles/dashboard.scss b/src/styles/dashboard.scss index 38da5e3..2dd6da5 100644 --- a/src/styles/dashboard.scss +++ b/src/styles/dashboard.scss @@ -123,4 +123,8 @@ padding: 8px 0px; border-radius: 15px; } + + .notification-center { + background-color: red; + } } From 0a246997c0cba93e7621622838c85e52d4bba0dc Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Fri, 12 Jan 2024 19:35:41 -0600 Subject: [PATCH 7/8] more --- src/Components/MobileContent.js | 23 ++++++++++++++++------- src/styles/app.scss | 11 ++++++++++- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/src/Components/MobileContent.js b/src/Components/MobileContent.js index 5d2eec3..4242eb9 100644 --- a/src/Components/MobileContent.js +++ b/src/Components/MobileContent.js @@ -30,15 +30,24 @@ const MobileContent = ({ isDashboard }) => { ) : ( <> -
+
+
+ Notification Center +
+
)} - {isDashboard ? ( -
{copy}
- ) : ( -
{copy}
- )} -
+
+ {isDashboard ? ( + <> +
+
{copy}
+
+ + ) : ( +
{copy}
+ )} +
); diff --git a/src/styles/app.scss b/src/styles/app.scss index 44cbae3..60c9026 100644 --- a/src/styles/app.scss +++ b/src/styles/app.scss @@ -77,10 +77,19 @@ p { justify-content: center; margin: 18px 2px 0px 2px; padding: 2px 2px; - background-color: var(--background-blue); border-radius: 18px; } + .lower-foo { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + margin: auto; + background-color: var(--background-blue); + border-radius: 15px; + } + .mobile-divider { height: 8px; width: 88%; From 5ca9da21a31cfa83e2a9fef7322bd7d01ffc3183 Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Fri, 12 Jan 2024 19:55:22 -0600 Subject: [PATCH 8/8] more --- src/Components/MobileContent.js | 11 ++++++++++- src/styles/app.scss | 21 +++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/Components/MobileContent.js b/src/Components/MobileContent.js index 4242eb9..7bcc3b2 100644 --- a/src/Components/MobileContent.js +++ b/src/Components/MobileContent.js @@ -1,4 +1,5 @@ import legalTechFlip from "../Assets/Images/legalTechFlip.jpg"; +import { ExclamationTriangle } from "react-bootstrap-icons"; const MobileContent = ({ isDashboard }) => { const copy = isDashboard ? ( <> @@ -31,8 +32,16 @@ const MobileContent = ({ isDashboard }) => { ) : ( <>
-
+
Notification Center +
+

+ +

+

No new notifications

+
diff --git a/src/styles/app.scss b/src/styles/app.scss index 60c9026..d431a4c 100644 --- a/src/styles/app.scss +++ b/src/styles/app.scss @@ -123,4 +123,25 @@ p { margin-bottom: 6px; padding: 0px 6px; } + .notication-container { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + margin-right: auto; + margin-left: auto; + margin-bottom: 40px; + } + + .notication-text-container { + display: flex; + flex-direction: row; + width: 100%; + font-size: 1rem; + margin-top: 12px; + } + + .notification-text { + margin-left: 16px; + } }