From 7b19c74c24a4e3bfc00bc8f35aaaae39fc46edc2 Mon Sep 17 00:00:00 2001 From: Luis Hernandez Date: Sun, 6 Aug 2023 21:47:58 -0600 Subject: [PATCH 1/6] working --- src/pages/Router.tsx | 7 ++ src/pages/request-sign/RequestSign.tsx | 8 ++ src/pages/request-sign/RequestSignLayout.tsx | 7 ++ src/pages/request-sign/Router.tsx | 10 ++ src/pages/space/Space.tsx | 113 ++++++++++++++++++- 5 files changed, 141 insertions(+), 4 deletions(-) create mode 100644 src/pages/request-sign/RequestSign.tsx create mode 100644 src/pages/request-sign/RequestSignLayout.tsx create mode 100644 src/pages/request-sign/Router.tsx diff --git a/src/pages/Router.tsx b/src/pages/Router.tsx index ef4ce99..5227993 100644 --- a/src/pages/Router.tsx +++ b/src/pages/Router.tsx @@ -1,5 +1,6 @@ import {createBrowserRouter, createRoutesFromElements, Route} from "react-router-dom"; import {spaceRouter} from "./space/Router"; +import {requestSignRouter} from "./request-sign/Router"; export const pagesRouter = () => { return (<> @@ -29,6 +30,12 @@ export const router = createBrowserRouter( }}> { spaceRouter() } + { + const { RequestSignLayout } = await import("./request-sign/RequestSignLayout") + return { Component: RequestSignLayout } + }}> + { requestSignRouter() } + ) ) \ No newline at end of file diff --git a/src/pages/request-sign/RequestSign.tsx b/src/pages/request-sign/RequestSign.tsx new file mode 100644 index 0000000..1c167fd --- /dev/null +++ b/src/pages/request-sign/RequestSign.tsx @@ -0,0 +1,8 @@ + + +export const RequestSign = () => { + + return (<> + + ) +} \ No newline at end of file diff --git a/src/pages/request-sign/RequestSignLayout.tsx b/src/pages/request-sign/RequestSignLayout.tsx new file mode 100644 index 0000000..4d4cf41 --- /dev/null +++ b/src/pages/request-sign/RequestSignLayout.tsx @@ -0,0 +1,7 @@ + + +export const RequestSignLayout = () => { + + return (<> + ) +} \ No newline at end of file diff --git a/src/pages/request-sign/Router.tsx b/src/pages/request-sign/Router.tsx new file mode 100644 index 0000000..773253d --- /dev/null +++ b/src/pages/request-sign/Router.tsx @@ -0,0 +1,10 @@ +import {Route} from "react-router-dom"; + +export const requestSignRouter = () => ( + <> + { + const { RequestSign } = await import("./RequestSign") + return { Component: RequestSign } + }}/> + +) \ No newline at end of file diff --git a/src/pages/space/Space.tsx b/src/pages/space/Space.tsx index c4d700c..0174b60 100644 --- a/src/pages/space/Space.tsx +++ b/src/pages/space/Space.tsx @@ -1,16 +1,17 @@ import {useParams} from "react-router-dom"; -import {useEffect, useState} from "react"; +import {useEffect, useState, ChangeEvent} from "react"; import { + Accordion, AccordionDetails, AccordionSummary, Box, Button, Card, Divider, - Drawer, - Grid, IconButton, + Drawer, FormControl, + Grid, IconButton, InputLabel, List, ListItem, ListItemButton, ListItemIcon, - ListItemText, + ListItemText, MenuItem, OutlinedInput, Paper, Select, SelectChangeEvent, TextField, Typography } from "@mui/material"; import AutoAwesomeIcon from "@mui/icons-material/AutoAwesome"; @@ -22,11 +23,14 @@ import CloudIcon from '@mui/icons-material/Cloud'; import WhatsAppIcon from '@mui/icons-material/WhatsApp'; import ComputerIcon from '@mui/icons-material/Computer'; import CloseIcon from "@mui/icons-material/Close"; +import ExpandMoreIcon from "@mui/icons-material/ExpandMore"; +import PersonAddIcon from '@mui/icons-material/PersonAdd'; export const Space = () => { const params = useParams() const [showAiAnalyst, setShorAiAnalyst] = useState(false) const [showFileUpload, setShowFileUpload] = useState(false) + const [showRecipients, setShowRecipients] = useState(false) const onAiAnalyst = () => { setShorAiAnalyst(true) @@ -44,6 +48,10 @@ export const Space = () => { setShowFileUpload(false) } + const onShowRecipients = () => { + setShowRecipients(!showRecipients) + } + return (<> Space {params["id"]} @@ -96,6 +104,31 @@ export const Space = () => { + + } + > + + Recipients + + + 0 + + + + + + + + + { ) } +export const RecipientInput = () => { + const [type, setType] = useState("required-signature") + const [name, setName] = useState("") + const [email, setEmail] = useState("") + const onChangeType = (event: SelectChangeEvent) => { + setType(event.target.value as string); + } + + const onChangeName = (event: ChangeEvent) => { + setName(event.target.value) + } + + const onChangeEmail = (event: ChangeEvent) => { + setEmail(event.target.value) + } + + return (<> + + + + Recipient 1 + + + + + Email + + + + + + Recipient type + + + + + + + + Full Name + + + + + + + ) +} + export type FileUploadProps = { open: boolean onClose: () => void From a3a577c7f4de455e12e4f36986d945fcea5a2a9d Mon Sep 17 00:00:00 2001 From: Luis Hernandez Date: Sun, 6 Aug 2023 23:35:03 -0600 Subject: [PATCH 2/6] working --- src/pages/Router.tsx | 10 +- src/pages/editor/Editor.tsx | 8 ++ src/pages/editor/EditorLayout.tsx | 143 +++++++++++++++++++ src/pages/editor/Router.tsx | 10 ++ src/pages/request-sign/RequestSign.tsx | 8 -- src/pages/request-sign/RequestSignLayout.tsx | 7 - src/pages/request-sign/Router.tsx | 10 -- src/pages/space/document/Document.tsx | 2 +- 8 files changed, 167 insertions(+), 31 deletions(-) create mode 100644 src/pages/editor/Editor.tsx create mode 100644 src/pages/editor/EditorLayout.tsx create mode 100644 src/pages/editor/Router.tsx delete mode 100644 src/pages/request-sign/RequestSign.tsx delete mode 100644 src/pages/request-sign/RequestSignLayout.tsx delete mode 100644 src/pages/request-sign/Router.tsx diff --git a/src/pages/Router.tsx b/src/pages/Router.tsx index 5227993..2bb5f7c 100644 --- a/src/pages/Router.tsx +++ b/src/pages/Router.tsx @@ -1,6 +1,6 @@ import {createBrowserRouter, createRoutesFromElements, Route} from "react-router-dom"; import {spaceRouter} from "./space/Router"; -import {requestSignRouter} from "./request-sign/Router"; +import {editorRouter} from "./editor/Router"; export const pagesRouter = () => { return (<> @@ -30,11 +30,11 @@ export const router = createBrowserRouter( }}> { spaceRouter() } - { - const { RequestSignLayout } = await import("./request-sign/RequestSignLayout") - return { Component: RequestSignLayout } + { + const { EditorLayout } = await import("./editor/EditorLayout") + return { Component: EditorLayout } }}> - { requestSignRouter() } + { editorRouter() } ) diff --git a/src/pages/editor/Editor.tsx b/src/pages/editor/Editor.tsx new file mode 100644 index 0000000..0441095 --- /dev/null +++ b/src/pages/editor/Editor.tsx @@ -0,0 +1,8 @@ + + +export const Editor = () => { + + return (<> + + ) +} \ No newline at end of file diff --git a/src/pages/editor/EditorLayout.tsx b/src/pages/editor/EditorLayout.tsx new file mode 100644 index 0000000..319bbca --- /dev/null +++ b/src/pages/editor/EditorLayout.tsx @@ -0,0 +1,143 @@ +import {MainContent, NavMenu, OneColumnLayout} from "../../@core"; +import { + Box, + Button, Divider, FormControl, + Grid, + IconButton, + InputLabel, + List, + ListSubheader, + MenuItem, + Paper, + Select, SelectChangeEvent, + Typography +} from "@mui/material"; +import ChromeReaderModeIcon from "@mui/icons-material/ChromeReaderMode"; +import {Link, Outlet, useParams, useSearchParams} from "react-router-dom"; +import ArrowBackIosIcon from "@mui/icons-material/ArrowBackIos"; +import {useState} from "react"; +import {ListItemLink} from "../../components/ListItemLink"; +import SmartButtonIcon from "@mui/icons-material/SmartButton"; + + +export const EditorLayout = () => { + const [searchParams, _setSearchParams] = useSearchParams() + const params = useParams() + const [recipient, setRecipient] = useState("abc123") + const [document, setDocument] = useState("abc123") + + const onChangeRecipient = (event: SelectChangeEvent) => { + setRecipient(event.target.value as string) + } + const onChangeDocument = (event: SelectChangeEvent) => { + setDocument(event.target.value as string) + } + + return (<> + + + + + {searchParams.has("relay_state") && + <> + + + } + + Editor + + + Space {params["id"]} + + + Recipient + + + + Document + + + + + + + Fields + + }> + }/> + + + + + + + + + + + + + + + + ) +} \ No newline at end of file diff --git a/src/pages/editor/Router.tsx b/src/pages/editor/Router.tsx new file mode 100644 index 0000000..a54398c --- /dev/null +++ b/src/pages/editor/Router.tsx @@ -0,0 +1,10 @@ +import {Route} from "react-router-dom"; + +export const editorRouter = () => ( + <> + { + const { Editor } = await import("./Editor") + return { Component: Editor } + }}/> + +) \ No newline at end of file diff --git a/src/pages/request-sign/RequestSign.tsx b/src/pages/request-sign/RequestSign.tsx deleted file mode 100644 index 1c167fd..0000000 --- a/src/pages/request-sign/RequestSign.tsx +++ /dev/null @@ -1,8 +0,0 @@ - - -export const RequestSign = () => { - - return (<> - - ) -} \ No newline at end of file diff --git a/src/pages/request-sign/RequestSignLayout.tsx b/src/pages/request-sign/RequestSignLayout.tsx deleted file mode 100644 index 4d4cf41..0000000 --- a/src/pages/request-sign/RequestSignLayout.tsx +++ /dev/null @@ -1,7 +0,0 @@ - - -export const RequestSignLayout = () => { - - return (<> - ) -} \ No newline at end of file diff --git a/src/pages/request-sign/Router.tsx b/src/pages/request-sign/Router.tsx deleted file mode 100644 index 773253d..0000000 --- a/src/pages/request-sign/Router.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import {Route} from "react-router-dom"; - -export const requestSignRouter = () => ( - <> - { - const { RequestSign } = await import("./RequestSign") - return { Component: RequestSign } - }}/> - -) \ No newline at end of file diff --git a/src/pages/space/document/Document.tsx b/src/pages/space/document/Document.tsx index 7313ac5..7101012 100644 --- a/src/pages/space/document/Document.tsx +++ b/src/pages/space/document/Document.tsx @@ -79,7 +79,7 @@ export const Document = () => { paddingBottom: "10px" }} startIcon={}> - Add Signer + Edit Fields From a93225fb18d152bb78355ed55235ee2e789022f9 Mon Sep 17 00:00:00 2001 From: Luis Hernandez Date: Mon, 7 Aug 2023 12:08:41 -0600 Subject: [PATCH 3/6] working --- src/pages/editor/EditorLayout.tsx | 75 +++++++++++++++++++++++++------ 1 file changed, 62 insertions(+), 13 deletions(-) diff --git a/src/pages/editor/EditorLayout.tsx b/src/pages/editor/EditorLayout.tsx index 319bbca..3e4f57d 100644 --- a/src/pages/editor/EditorLayout.tsx +++ b/src/pages/editor/EditorLayout.tsx @@ -5,20 +5,30 @@ import { Grid, IconButton, InputLabel, - List, + List, ListItemButton, ListItemIcon, ListItemText, ListSubheader, MenuItem, Paper, - Select, SelectChangeEvent, + Select, SelectChangeEvent, Stack, styled, Typography } from "@mui/material"; import ChromeReaderModeIcon from "@mui/icons-material/ChromeReaderMode"; import {Link, Outlet, useParams, useSearchParams} from "react-router-dom"; import ArrowBackIosIcon from "@mui/icons-material/ArrowBackIos"; import {useState} from "react"; -import {ListItemLink} from "../../components/ListItemLink"; -import SmartButtonIcon from "@mui/icons-material/SmartButton"; +import CalendarMonthIcon from '@mui/icons-material/CalendarMonth'; +import DriveFileRenameOutlineIcon from '@mui/icons-material/DriveFileRenameOutline'; +import TextFieldsIcon from '@mui/icons-material/TextFields'; +import AlternateEmailIcon from '@mui/icons-material/AlternateEmail'; +import ArrowForwardIcon from '@mui/icons-material/ArrowForward'; +const Item = styled(Paper)(({ theme }) => ({ + backgroundColor: theme.palette.mode === 'dark' ? '#1A2027' : '#fff', + ...theme.typography.body2, + padding: theme.spacing(1), + textAlign: 'center', + color: theme.palette.text.secondary, +})); export const EditorLayout = () => { const [searchParams, _setSearchParams] = useSearchParams() @@ -112,21 +122,60 @@ export const EditorLayout = () => { Fields }> - }/> + + {} + + + + {} + + + + {} + + + + {} + + - - - + + + + + + + + + Item 2 + Item 3 + + + + Date: Mon, 7 Aug 2023 12:55:19 -0600 Subject: [PATCH 4/6] added firebase deployment config --- .firebaserc | 5 +++ .github/workflows/firebase-hosting-dev.yml | 38 ++++++++++++++++++++++ firebase.json | 19 +++++++++++ package.json | 5 +-- 4 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 .firebaserc create mode 100644 .github/workflows/firebase-hosting-dev.yml create mode 100644 firebase.json diff --git a/.firebaserc b/.firebaserc new file mode 100644 index 0000000..7123c58 --- /dev/null +++ b/.firebaserc @@ -0,0 +1,5 @@ +{ + "projects": { + "default": "nuverax-dev" + } +} \ No newline at end of file diff --git a/.github/workflows/firebase-hosting-dev.yml b/.github/workflows/firebase-hosting-dev.yml new file mode 100644 index 0000000..6e3c4f3 --- /dev/null +++ b/.github/workflows/firebase-hosting-dev.yml @@ -0,0 +1,38 @@ +# This file was auto-generated by the Firebase CLI +# https://github.com/firebase/firebase-tools + +name: Deploy to Firebase Hosting on PR/ merge Devtest +on: + push: + branches: + - dev + pull_request: + branches: + - dev +jobs: + build_and_preview: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: npm install, build + run: | + touch .env.dev + envsubst '${APP_ENV_NAME}' < .env.template | tee .env.dev + npm install + npm run build:dev --if-present + env: + CI: false + APP_ENV_NAME: dev + - uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: '${{ secrets.PROD_GITHUB_TOKEN }}' + firebaseServiceAccount: '${{ secrets.DEV_FIREBASE_SERVICE_ACCOUNT }}' + channelId: live + projectId: nuverax-dev + target: nuverax-dev + env: + FIREBASE_CLI_PREVIEWS: hostingchannels diff --git a/firebase.json b/firebase.json new file mode 100644 index 0000000..587ee99 --- /dev/null +++ b/firebase.json @@ -0,0 +1,19 @@ +{ + "hosting": [ + { + "site": "nuverax-dev", + "public": "build", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } + ] + } + ] +} \ No newline at end of file diff --git a/package.json b/package.json index fc62b50..810c689 100644 --- a/package.json +++ b/package.json @@ -28,8 +28,9 @@ "react-dom": "^17.0.0 || ^18.0.0" }, "scripts": { - "start": "react-scripts start", - "build": "react-scripts build", + "start": "env-cmd -f .env.local react-scripts start .env.local", + "build": "GENERATE_SOURCEMAP=false react-scripts build", + "build:dev": "env-cmd -f .env.dev npm run build", "test": "react-scripts test", "eject": "react-scripts eject" }, From 2c0827f463c61dd60dd220782f14d88343521fe6 Mon Sep 17 00:00:00 2001 From: Luis Hernandez Date: Mon, 7 Aug 2023 12:57:21 -0600 Subject: [PATCH 5/6] removed PR action --- .github/workflows/firebase-hosting-dev.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/firebase-hosting-dev.yml b/.github/workflows/firebase-hosting-dev.yml index 6e3c4f3..59072c5 100644 --- a/.github/workflows/firebase-hosting-dev.yml +++ b/.github/workflows/firebase-hosting-dev.yml @@ -6,9 +6,7 @@ on: push: branches: - dev - pull_request: - branches: - - dev + jobs: build_and_preview: runs-on: ubuntu-latest From 503c0fae35aab1fad80ccbd07a05f1aa7b0960a4 Mon Sep 17 00:00:00 2001 From: Luis Hernandez Date: Mon, 7 Aug 2023 13:06:16 -0600 Subject: [PATCH 6/6] updated README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index aee39bb..5ede140 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,8 @@ Imagine a world where learning from documents becomes an effortless endeavor, an - Request signing. - And many, many more. +> Note: We are still working to get a MVP [here you can see a concept](https://nuverax-dev.web.app/). + ## Quick start ```