From 1f5c0b7a4881e2d67d476b80bd3970e0a987dacd Mon Sep 17 00:00:00 2001 From: Karol Harezlak <76980800+karolh2000@users.noreply.github.com> Date: Mon, 7 Aug 2023 20:29:05 -0700 Subject: [PATCH 1/2] UI prototyping (bootstrap) --- src/App.tsx | 29 ++++-- src/{components/Main.tsx => Location.tsx} | 10 +- src/components/Client.tsx | 17 ++++ src/components/CreateTask.tsx | 23 +++++ src/components/Home.tsx | 12 +++ src/components/Image.tsx | 4 +- src/components/Matter.tsx | 17 ++++ src/components/{Navigator.tsx => Menu.tsx} | 9 +- src/components/PersistantCombo.tsx | 30 ++++++ src/components/{Login.tsx => Project.tsx} | 10 +- src/components/Routing.tsx | 18 ++++ src/components/RoutingTable.tsx | 18 ---- src/components/Search.tsx | 27 ++++++ src/components/Task.tsx | 94 +++++++++++++++++++ src/components/Tasks.tsx | 15 +++ src/components/auth/LoginButton.tsx | 3 +- src/components/auth/LogoutButton.tsx | 1 + src/components/auth/Profile.tsx | 1 + src/components/auth/api/Authorization.ts | 3 + .../auth/impl/AuthorizationAuth0.ts | 12 +++ .../auth/impl/AuthorizationFactory.ts | 17 ++++ src/index.tsx | 4 +- 22 files changed, 333 insertions(+), 41 deletions(-) rename src/{components/Main.tsx => Location.tsx} (56%) create mode 100644 src/components/Client.tsx create mode 100644 src/components/CreateTask.tsx create mode 100644 src/components/Home.tsx create mode 100644 src/components/Matter.tsx rename src/components/{Navigator.tsx => Menu.tsx} (78%) create mode 100644 src/components/PersistantCombo.tsx rename src/components/{Login.tsx => Project.tsx} (57%) create mode 100644 src/components/Routing.tsx delete mode 100644 src/components/RoutingTable.tsx create mode 100644 src/components/Search.tsx create mode 100644 src/components/Task.tsx create mode 100644 src/components/Tasks.tsx create mode 100644 src/components/auth/api/Authorization.ts create mode 100644 src/components/auth/impl/AuthorizationAuth0.ts create mode 100644 src/components/auth/impl/AuthorizationFactory.ts diff --git a/src/App.tsx b/src/App.tsx index 13422c3..cfe482b 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,21 +1,32 @@ import React from 'react'; import './App.css'; -import Navigator from "./components/Navigator"; -import RoutingTable from "./components/RoutingTable"; +import Menu from "./components/Menu"; +import Routing from "./components/Routing"; import LoginButton from "./components/auth/LoginButton"; import Image from "./components/Image"; +import Search from "./components/Search"; function App() { return ( -
- - +
-
- -
- + {/**/} +
+
+
+ + +
+
+
+ {/**/} +
+
+ +
+
+
diff --git a/src/components/Main.tsx b/src/Location.tsx similarity index 56% rename from src/components/Main.tsx rename to src/Location.tsx index 63ebdd3..8ebe89d 100644 --- a/src/components/Main.tsx +++ b/src/Location.tsx @@ -1,10 +1,16 @@ import React from "react"; import 'bootstrap/dist/css/bootstrap.min.css'; +interface Location { + city: string; + state: string; + country: string; +} + function Main() { return ( -
- Main +
+ Location
); } diff --git a/src/components/Client.tsx b/src/components/Client.tsx new file mode 100644 index 0000000..a537241 --- /dev/null +++ b/src/components/Client.tsx @@ -0,0 +1,17 @@ +import React from "react"; +import 'bootstrap/dist/css/bootstrap.min.css'; +import PersistantCombo from "./PersistantCombo"; + +interface Client { + name: string; +} + +function Client() { + return ( +
+ +
+ ); +} + +export default Client; \ No newline at end of file diff --git a/src/components/CreateTask.tsx b/src/components/CreateTask.tsx new file mode 100644 index 0000000..0a94e0f --- /dev/null +++ b/src/components/CreateTask.tsx @@ -0,0 +1,23 @@ +import React from "react"; +import Task from "./Task"; + +function CreateTask() { + + const task: Task = { + client: { name: ""}, + code: "", + matter: { name: ""}, + name: "", + narrative: "", + project: {name: ""}, + activityCode: "", + time: 0, + } + return ( +
+ +
+ ); +} + +export default CreateTask; \ No newline at end of file diff --git a/src/components/Home.tsx b/src/components/Home.tsx new file mode 100644 index 0000000..cb2bf09 --- /dev/null +++ b/src/components/Home.tsx @@ -0,0 +1,12 @@ +import React from "react"; +import 'bootstrap/dist/css/bootstrap.min.css'; + +function Home() { + return ( +
+ HOME PAGE NOT IMPLEMENTED YET +
+ ); +} + +export default Home; \ No newline at end of file diff --git a/src/components/Image.tsx b/src/components/Image.tsx index c2c1480..0b4e20e 100644 --- a/src/components/Image.tsx +++ b/src/components/Image.tsx @@ -5,7 +5,9 @@ import TickerLogo from '../resources/media/logo-white.svg'; const Image = ({ imagePath } : { imagePath: string }) => { return (
- { + + +
); } diff --git a/src/components/Matter.tsx b/src/components/Matter.tsx new file mode 100644 index 0000000..ecd16c5 --- /dev/null +++ b/src/components/Matter.tsx @@ -0,0 +1,17 @@ +import React from "react"; +import 'bootstrap/dist/css/bootstrap.min.css'; +import PersistantCombo from "./PersistantCombo"; + +interface Matter { + name: string; +} + +function Matter() { + return ( +
+ Matter +
+ ); +} + +export default Matter; \ No newline at end of file diff --git a/src/components/Navigator.tsx b/src/components/Menu.tsx similarity index 78% rename from src/components/Navigator.tsx rename to src/components/Menu.tsx index 927c85e..cce13f6 100644 --- a/src/components/Navigator.tsx +++ b/src/components/Menu.tsx @@ -7,8 +7,9 @@ interface NavInfo { } const AppRoutes: NavInfo[] = [ - {path: "/", displayName: "Main", name: "main"}, - {path: "/login", displayName: "Login", name: "login"} + {path: "/", displayName: "Home", name: "home"}, + {path: "/tasks", displayName: "Tasks", name: "tasks"}, + {path: "/createTask", displayName: "Create Task", name: "createTask"} ]; function NaviLink(navInfo: NavInfo) { @@ -20,7 +21,7 @@ function NaviLink(navInfo: NavInfo) { ); } -function Navigator() { +function Menu() { return (