diff --git a/frontend/index.html b/frontend/index.html index ced3ebb..1eed15b 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -4,7 +4,7 @@ - Vite + React + TurTask
diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 28d2d19..521d8f2 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -5,7 +5,6 @@ import TestAuth from "./components/testAuth"; import LoginPage from "./components/authentication/LoginPage"; import SignUpPage from "./components/authentication/SignUpPage"; import NavBar from "./components/navigations/Navbar"; -import Home from "./components/Home"; import Calendar from "./components/calendar/calendar"; import KanbanPage from "./components/kanbanBoard/kanbanPage"; import IconSideNav from "./components/navigations/IconSideNav"; diff --git a/frontend/src/components/Home.jsx b/frontend/src/components/Home.jsx deleted file mode 100644 index 7fa7680..0000000 --- a/frontend/src/components/Home.jsx +++ /dev/null @@ -1,11 +0,0 @@ -import React from "react"; - -function HomePage() { - return ( -
-

Welcome to My Website

-
- ); -} - -export default HomePage; diff --git a/frontend/src/components/authentication/LoginPage.jsx b/frontend/src/components/authentication/LoginPage.jsx index a48c075..93f8f0b 100644 --- a/frontend/src/components/authentication/LoginPage.jsx +++ b/frontend/src/components/authentication/LoginPage.jsx @@ -132,7 +132,7 @@ function LoginPage() { color: "#00ff00", distance: 150, enable: true, - opacity: 0.1, + opacity: 0.5, width: 1, }, move: { diff --git a/frontend/src/components/authentication/SignUpPage.jsx b/frontend/src/components/authentication/SignUpPage.jsx index 50d893b..5d3c76f 100644 --- a/frontend/src/components/authentication/SignUpPage.jsx +++ b/frontend/src/components/authentication/SignUpPage.jsx @@ -133,7 +133,7 @@ export default function SignUp() { color: "#228B22", distance: 150, enable: true, - opacity: 0.5, + opacity: 1, width: 1, }, move: { @@ -154,7 +154,7 @@ export default function SignUp() { value: 50, }, opacity: { - value: 0.5, + value: 0.6, }, shape: { type: "circle", diff --git a/frontend/src/components/dashboard/Barchart.jsx b/frontend/src/components/dashboard/Barchart.jsx new file mode 100644 index 0000000..5c26cb8 --- /dev/null +++ b/frontend/src/components/dashboard/Barchart.jsx @@ -0,0 +1,93 @@ +import { BarChart, Card, Title } from "@tremor/react"; +import React from "react"; +import axiosInstance from "../../api/configs/AxiosConfig"; + +const apiGetBarChartData = () => { + return axiosInstance.get("dashboard/stats/"); + } +console.log(apiGetBarChartData); + +const chartdata3 = [ + { + date: "Jan 23", + "2022": 45, + "2023": 78, + }, + { + date: "Feb 23", + "2022": 52, + "2023": 71, + }, + { + date: "Mar 23", + "2022": 48, + "2023": 80, + }, + { + date: "Apr 23", + "2022": 61, + "2023": 65, + }, + { + date: "May 23", + "2022": 55, + "2023": 58, + }, + { + date: "Jun 23", + "2022": 67, + "2023": 62, + }, + { + date: "Jul 23", + "2022": 60, + "2023": 54, + }, + { + date: "Aug 23", + "2022": 72, + "2023": 49, + }, + { + date: "Sep 23", + "2022": 65, + "2023": 52, + }, + { + date: "Oct 23", + "2022": 68, + "2023": null, + }, + { + date: "Nov 23", + "2022": 74, + "2023": null, + }, + { + date: "Dec 23", + "2022": 71, + "2023": null, + }, +]; + +export const BarChartGraph = () => { + const [value, setValue] = React.useState(null); + return ( + <> + + Closed Pull Requests + setValue(v)} + showAnimation + /> + +
{JSON.stringify(value)}
+ + ); +}; \ No newline at end of file diff --git a/frontend/src/components/dashboard/dashboard.jsx b/frontend/src/components/dashboard/dashboard.jsx index 9cefbe2..abc7873 100644 --- a/frontend/src/components/dashboard/dashboard.jsx +++ b/frontend/src/components/dashboard/dashboard.jsx @@ -8,48 +8,93 @@ import { TabPanels, Text, Title, + DonutChart, } from "@tremor/react"; import KpiCard from "./kpiCard"; +import { BarChartGraph } from "./Barchart"; + +const cities = [ + { + name: "New York", + sales: 9800, + }, + // ... + { + name: "Zurich", + sales: 1398, + }, +]; + +const valueFormatter = (number) => + `$ ${new Intl.NumberFormat("us").format(number).toString()}`; export default function Dashboard() { return ( -
- Dashboard - All of your progress will be shown right here. +
+
+ Dashboard + All of your progress will be shown right here. +
- - - Overview - Detail - - - - - - - {/* Placeholder to set height */} -
- - - {/* Placeholder to set height */} -
- - -
- -
- -
- - -
- -
- -
- - - -
+
+ + + Overview + Detail + + + + + + +
+ +
+ {/* Placeholder to set height */} +
+ + Sales + setValue(v)} + showAnimation + /> + +
+ + + + {/* Placeholder to set height */} +
+ + +
+ +
+ +
+ + +
+ +
+ +
+ + + +
+
); }