Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.5.2",
"@types/lodash": "^4.14.196",
"@types/node": "^16.18.39",
"@types/react": "^18.2.18",
"@types/react-dom": "^18.2.7",
Expand All @@ -18,6 +19,7 @@
"react-router-dom": "^6.14.2",
"react-scripts": "5.0.1",
"typescript": "^4.9.5",
"uuid": "^9.0.0",
"web-vitals": "^2.1.4"
},
"scripts": {
Expand Down Expand Up @@ -45,6 +47,7 @@
]
},
"devDependencies": {
"@types/uuid": "^9.0.2",
"eslint": "^8.46.0"
}
}
30 changes: 20 additions & 10 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
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 (
<div>
<LoginButton/>
<Image imagePath={"./resources/media/logo-white.svg"}></Image>
<div className="m-3">
<div className="row">
<div className="col-2">
<Navigator/>
</div>
<div className="col-5">
<RoutingTable/>
{/*<Search/>*/}
</div>
<div className="col-6">
<div className="float-end">
<Search/>
<LoginButton/>
</div>
</div>
</div>
{/*<Image imagePath={"./resources/media/logo-white.svg"}></Image>*/}
<div className="row">
<div className="col-2 mt-lg-3">
<Menu/>
</div>
<div className="col-9 mt-lg-3">
<Routing/>
</div>
</div>
</div>
Expand Down
10 changes: 8 additions & 2 deletions src/components/Main.tsx → src/Location.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<div className="display-1">
Main
<div>
Location
</div>
);
}
Expand Down
17 changes: 17 additions & 0 deletions src/components/Client.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<div>
<PersistantCombo/>
</div>
);
}

export default Client;
24 changes: 24 additions & 0 deletions src/components/CreateTask.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React from "react";
import Task from "./Task";

function CreateTask() {

const task: Task = {
id: "",
client: { name: ""},
code: "",
matter: { name: ""},
name: "",
narrative: "",
project: {name: ""},
activityCode: "",
time: 0
}
return (
<div className="container">
<Task {...task} />
</div>
);
}

export default CreateTask;
12 changes: 12 additions & 0 deletions src/components/Home.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from "react";
import 'bootstrap/dist/css/bootstrap.min.css';

function Home() {
return (
<div className="form-control-lg">
HOME PAGE NOT IMPLEMENTED YET
</div>
);
}

export default Home;
4 changes: 3 additions & 1 deletion src/components/Image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import TickerLogo from '../resources/media/logo-white.svg';
const Image = ({ imagePath } : { imagePath: string }) => {
return (
<div>
<img src={ imagePath } alt={ imagePath } />
<svg className="">
<use xlinkHref={imagePath}></use>
</svg>
</div>
);
}
Expand Down
17 changes: 17 additions & 0 deletions src/components/Matter.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<div>
Matter
</div>
);
}

export default Matter;
9 changes: 5 additions & 4 deletions src/components/Navigator.tsx → src/components/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -20,7 +21,7 @@ function NaviLink(navInfo: NavInfo) {
);
}

function Navigator() {
function Menu() {
return (
<div className="container mt-3 h4">
<nav>
Expand All @@ -35,5 +36,5 @@ function Navigator() {
);
}

export default Navigator;
export default Menu;

30 changes: 30 additions & 0 deletions src/components/PersistantCombo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React from "react";
import 'bootstrap/dist/css/bootstrap.min.css';
import {FormText} from "react-bootstrap";

const enum State {Save = 'save'}
function PersistentCombo() {

const context = {};

// const reducer = (state: string, action: any) => {
// if (State.Save === state) {
// context.value = action.value;
// }
// }
return (
<div>
<label>List</label>
<input name="ble" list="sfd, sf, sdf, sdf"/>
<datalist></datalist>
<div className="">
<select className="">
<option value="roundTrip">Item 1</option>
<option value="oneWay">Item 2</option>
</select>
</div>
</div>
);
}

export default PersistentCombo;
10 changes: 7 additions & 3 deletions src/components/Login.tsx → src/components/Project.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import React from "react";
import 'bootstrap/dist/css/bootstrap.min.css';

function Login() {
interface Project {
name: string;
}

function Project() {
return (
<div className="">
Login
Project
</div>
);
}

export default Login;
export default Project;
18 changes: 18 additions & 0 deletions src/components/Routing.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from "react";
import {BrowserRouter, Route, Routes} from "react-router-dom";
import Home from './Home';
import Tasks from "./Tasks";
import CreateTask from "./CreateTask";
function Routing() {
return (
<BrowserRouter>
<Routes>
<Route path="/" element={<Home />} />
<Route path="/tasks" element={<Tasks />} />
<Route path="/createTask" element={<CreateTask />} />
</Routes>
</BrowserRouter>
);
}

export default Routing;
18 changes: 0 additions & 18 deletions src/components/RoutingTable.tsx

This file was deleted.

27 changes: 27 additions & 0 deletions src/components/Search.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React, {useRef, useState} from "react";

function Search() {

const ref: any = useRef(null);

const [text, setText] = useState("Search");

const handleChange = (event: any) => {
setText(event.target.value);
console.log("Text value " + event.target.value);
}
const clearText = () => {
setText("");
// if (ref.current != null) {
ref.current.value = "";
// }
}

return (
<>
<input className="form-control-lg" ref={ref} onChange={handleChange} id="tickerSearch" readOnly={false} type="search" defaultValue={text} onClick={clearText}/>
</>
);
}

export default Search;
Loading