diff --git a/client/src/components/InputField.tsx b/client/src/components/InputField.tsx new file mode 100644 index 0000000..6dc5468 --- /dev/null +++ b/client/src/components/InputField.tsx @@ -0,0 +1,10 @@ +import React, { FC } from "react"; + +export const InputField: FC = () => { + return ( +
+ + +
+ ); +}; diff --git a/client/src/components/LogInForm.tsx b/client/src/components/LogInForm.tsx new file mode 100644 index 0000000..9ef2fb0 --- /dev/null +++ b/client/src/components/LogInForm.tsx @@ -0,0 +1,23 @@ +import React, { FC } from "react"; +import { InputField } from "./InputField"; +import { PasswordField } from "./PasswordField"; +import { Button } from "./Button"; + +export const LogInForm: FC = () => { + return ( +
+
+
+

Login

+
+ + + + +
+
+
+ ); +}; diff --git a/client/src/components/PasswordField.tsx b/client/src/components/PasswordField.tsx new file mode 100644 index 0000000..d30d302 --- /dev/null +++ b/client/src/components/PasswordField.tsx @@ -0,0 +1,10 @@ +import React, { FC } from "react"; + +export const PasswordField: FC = () => { + return ( +
+ + +
+ ); +}; diff --git a/client/src/components/ProfileSelector.tsx b/client/src/components/ProfileSelector.tsx new file mode 100644 index 0000000..f689262 --- /dev/null +++ b/client/src/components/ProfileSelector.tsx @@ -0,0 +1,20 @@ +import React, { FC } from "react"; +import { HorizontalCard } from "./HorizontalCard"; +import { Avatar } from "./Avatar"; +import { Link } from "react-router-dom"; + +export const ProfileSelector: FC = () => { + return ( +
+
+
+

Select a profile

+ + + +
Demo User
+
+
+
+ ); +}; diff --git a/client/src/controllers/TicketController.tsx b/client/src/controllers/TicketController.tsx index 6fbdb96..0cccd54 100644 --- a/client/src/controllers/TicketController.tsx +++ b/client/src/controllers/TicketController.tsx @@ -2,7 +2,6 @@ import React, { FC, useState, useEffect } from "react"; import { useParams } from "react-router-dom"; import { TicketPage } from "../pages/TicketPage"; import { ErrorController } from "./ErrorController"; -import { User } from "../types/User"; import { HttpResponse } from "../types/HttpResponse"; import { Preloader } from "../components/Preloader"; import { get } from "../utils/http"; @@ -49,76 +48,3 @@ export const TicketController: FC = () => { const viewModel = new TicketVM(ticket); return isLoading ? : ; }; - -// const user: User = { -// id: "resldsm,dgd", -// firstName: "Ti", -// lastName: "Nyny", -// fullName: "Nilka Netty Nemo", -// presentation: "Woman of my life ❤️❤️❤️", -// creationDate: new Date().toDateString(), -// email: "dw@mail.au", -// phone: "0998765432", -// picture: require("../images/user_1.jpg"), -// projects: [ -// { -// id: 1, -// title: "OP Baby", -// description: "What is it about", -// progression: 25, -// creationDate: new Date().toDateString(), -// endingDate: "2020-02-17 15:51:02.787373", -// status: "Todo", -// manager: {} as User, -// users: [] as User[], -// tickets: [] as Ticket[], -// files: [] as AppFile[], -// activities: [] as Activity[] -// } -// ], -// tickets: [ -// { -// id: 1, -// title: "Client objective meeting", -// description: "Client objective meeting", -// endingDate: "2020-02-17 15:51:02.787373", -// status: "Done", -// project: { -// id: 1, -// title: "Project Title", -// description: "What is it about", -// progression: 25, -// creationDate: new Date().toDateString(), -// endingDate: "2020-02-17 15:51:02.787373", -// status: "Todo", -// manager: {} as User, -// users: [] as User[], -// tickets: [] as Ticket[], -// files: [] as AppFile[], -// activities: [] as Activity[] -// } -// }, -// { -// id: 2, -// title: "Assemble Outcomes Report for client", -// description: "Assemble Outcomes Report for client", -// endingDate: "2020-02-27 15:51:02.787373", -// status: "To Do", -// project: { -// id: 1, -// title: "Project Title", -// description: "What is it about", -// progression: 25, -// creationDate: new Date().toDateString(), -// endingDate: "2020-02-17 15:51:02.787373", -// status: "Todo", -// manager: {} as User, -// users: [] as User[], -// tickets: [] as Ticket[], -// files: [] as AppFile[], -// activities: [] as Activity[] -// } -// } -// ], -// activities: [] -// }; diff --git a/client/src/pages/HomePage.tsx b/client/src/pages/HomePage.tsx index cc4a722..d6676c9 100644 --- a/client/src/pages/HomePage.tsx +++ b/client/src/pages/HomePage.tsx @@ -1,9 +1,21 @@ import React from "react"; +import { LogInForm } from "../components/LogInForm"; +import { ProfileSelector } from "../components/ProfileSelector"; export const HomePage: React.FC = () => { return ( -
-

HomePage

+
+
+

Ticket Manager

+
+
+ +
+
+ +
+
+
); }; diff --git a/client/src/pages/TicketPage.tsx b/client/src/pages/TicketPage.tsx index 1fa01de..df4f640 100644 --- a/client/src/pages/TicketPage.tsx +++ b/client/src/pages/TicketPage.tsx @@ -22,7 +22,7 @@ export const TicketPage: FC = ({ viewModel }) => { difficulty } = viewModel; const daysToEnd: number = getRemainingdays(endingDate); - let notes: string = ""; + // let notes: string = ""; return (
diff --git a/client/src/utils/router.tsx b/client/src/utils/router.tsx index c84a890..88a01d4 100644 --- a/client/src/utils/router.tsx +++ b/client/src/utils/router.tsx @@ -1,18 +1,12 @@ import React from "react"; -import { - Router, - Route, - Switch - // Redirect - //Link, NavLink -} from "react-router-dom"; +import { Router, Route, Switch } from "react-router-dom"; import * as creacteHistory from "history"; -// import { HomeController } from "../controllers/HomeController"; +import { HomeController } from "../controllers/HomeController"; import { ProjectController } from "../controllers/ProjectController"; import { UserController } from "../controllers/UserController"; import { TicketController } from "../controllers/TicketController"; import { NotFoundPage } from "../pages/NotFoundPage"; -import { TestPage } from "../pages/TestPage"; +// import { TestPage } from "../pages/TestPage"; export const history = creacteHistory.createBrowserHistory(); @@ -21,24 +15,27 @@ export const AppRouter = () => {
- + {/* + */} + + + - {/* - - */} + + - +