diff --git a/frontend/src/pages/dashboard/index.js b/frontend/src/pages/dashboard/index.js index 7651895..c61fef3 100644 --- a/frontend/src/pages/dashboard/index.js +++ b/frontend/src/pages/dashboard/index.js @@ -1,4 +1,3 @@ -export * from "@/pages/dashboard/home"; -export * from "@/pages/dashboard/profile"; -export * from "@/pages/dashboard/tables"; -export * from "@/pages/dashboard/notifications"; +export * from "@/pages/dashboard/stacks"; +export * from "@/pages/dashboard/maintenance"; +export * from "@/pages/dashboard/logs"; \ No newline at end of file diff --git a/frontend/src/pages/dashboard/logs.jsx b/frontend/src/pages/dashboard/logs.jsx new file mode 100644 index 0000000..dff6484 --- /dev/null +++ b/frontend/src/pages/dashboard/logs.jsx @@ -0,0 +1,112 @@ +import { + Card, + CardHeader, + CardBody, + Typography, + Avatar, + Chip, + Tooltip, + Progress, +} from "@material-tailwind/react"; +import { EllipsisVerticalIcon } from "@heroicons/react/24/outline"; +import { authorsTableData, projectsTableData } from "@/data"; + +export function Logs() { + return ( +
+ + + + Authors Table + + + + + + + {["author", "function", "status", "employed", ""].map((el) => ( + + ))} + + + + {authorsTableData.map( + ({ img, name, email, job, online, date }, key) => { + const className = `py-3 px-5 ${ + key === authorsTableData.length - 1 + ? "" + : "border-b border-blue-gray-50" + }`; + + return ( + + + + + + + + ); + } + )} + +
+ + {el} + +
+
+ +
+ + {name} + + + {email} + +
+
+
+ + {job[0]} + + + {job[1]} + + + + + + {date} + + + + Edit + +
+
+
+
+ ); +} + +export default Logs; diff --git a/frontend/src/pages/dashboard/maintenance.jsx b/frontend/src/pages/dashboard/maintenance.jsx new file mode 100644 index 0000000..29e89d0 --- /dev/null +++ b/frontend/src/pages/dashboard/maintenance.jsx @@ -0,0 +1,88 @@ +import React from "react"; +import { + Typography, + Alert, + Card, + CardHeader, + CardBody, +} from "@material-tailwind/react"; +import { InformationCircleIcon } from "@heroicons/react/24/outline"; + +export function Maintenance() { + const [showAlerts, setShowAlerts] = React.useState({ + blue: true, + green: true, + orange: true, + red: true, + }); + const [showAlertsWithIcon, setShowAlertsWithIcon] = React.useState({ + blue: true, + green: true, + orange: true, + red: true, + }); + const alerts = ["gray", "green", "orange", "red"]; + + return ( +
+ + + + Alerts + + + + {alerts.map((color) => ( + setShowAlerts((current) => ({ ...current, [color]: false }))} + > + A simple {color} alert with an example link. Give + it a click if you like. + + ))} + + + + + + Alerts with Icon + + + + {alerts.map((color) => ( + + } + onClose={() => setShowAlertsWithIcon((current) => ({ + ...current, + [color]: false, + }))} + > + A simple {color} alert with an example link. Give + it a click if you like. + + ))} + + +
+ ); +} + +export default Maintenance; diff --git a/frontend/src/pages/dashboard/stacks.jsx b/frontend/src/pages/dashboard/stacks.jsx new file mode 100644 index 0000000..af12754 --- /dev/null +++ b/frontend/src/pages/dashboard/stacks.jsx @@ -0,0 +1,258 @@ +import React from "react"; +import { + Typography, + Card, + CardHeader, + CardBody, + IconButton, + Menu, + MenuHandler, + MenuList, + MenuItem, + Avatar, + Tooltip, + Progress, +} from "@material-tailwind/react"; +import { + EllipsisVerticalIcon, + ArrowUpIcon, +} from "@heroicons/react/24/outline"; +import { StatisticsCard } from "@/widgets/cards"; +import { StatisticsChart } from "@/widgets/charts"; +import { + statisticsCardsData, + statisticsChartsData, + projectsTableData, + ordersOverviewData, +} from "@/data"; +import { CheckCircleIcon, ClockIcon } from "@heroicons/react/24/solid"; + +export function Stacks() { + return ( +
+
+ {statisticsCardsData.map(({ icon, title, footer, ...rest }) => ( + + {footer.value} +  {footer.label} + + } + /> + ))} +
+
+ {statisticsChartsData.map((props) => ( + + +  {props.footer} + + } + /> + ))} +
+
+ + +
+ + Projects + + + + 30 done this month + +
+ + + + + + + + Action + Another Action + Something else here + + +
+ + + + + {["companies", "members", "budget", "completion"].map( + (el) => ( + + ) + )} + + + + {projectsTableData.map( + ({ img, name, members, budget, completion }, key) => { + const className = `py-3 px-5 ${ + key === projectsTableData.length - 1 + ? "" + : "border-b border-blue-gray-50" + }`; + + return ( + + + + + + + ); + } + )} + +
+ + {el} + +
+
+ + + {name} + +
+
+ {members.map(({ img, name }, key) => ( + + + + ))} + + + {budget} + + +
+ + {completion}% + + +
+
+
+
+ + + + Orders Overview + + + + 24% this month + + + + {ordersOverviewData.map( + ({ icon, color, title, description }, key) => ( +
+
+ {React.createElement(icon, { + className: `!w-5 !h-5 ${color}`, + })} +
+
+ + {title} + + + {description} + +
+
+ ) + )} +
+
+
+
+ ); +} + +export default Stacks; diff --git a/frontend/src/routes.jsx b/frontend/src/routes.jsx index 3a5a8da..3e47ca2 100644 --- a/frontend/src/routes.jsx +++ b/frontend/src/routes.jsx @@ -1,12 +1,9 @@ import { - HomeIcon, - UserCircleIcon, - TableCellsIcon, - InformationCircleIcon, - ServerStackIcon, - RectangleStackIcon, + Square3Stack3DIcon, + WrenchScrewdriverIcon, + ListBulletIcon } from "@heroicons/react/24/solid"; -import { Home, Profile, Tables, Notifications } from "@/pages/dashboard"; +import { Stacks, Maintenance, Logs } from "@/pages/dashboard"; import { SignIn, SignUp } from "@/pages/auth"; const icon = { @@ -18,49 +15,43 @@ export const routes = [ layout: "dashboard", pages: [ { - icon: , - name: "dashboard", - path: "/home", - element: , + icon: , + name: "stacks", + path: "/stacks", + element: , }, { - icon: , - name: "profile", - path: "/profile", - element: , + icon: , + name: "maintenance", + path: "/maintenance", + element: , }, { - icon: , - name: "tables", - path: "/tables", - element: , - }, - { - icon: , - name: "notifications", - path: "/notifications", - element: , - }, - ], - }, - { - title: "auth pages", - layout: "auth", - pages: [ - { - icon: , - name: "sign in", - path: "/sign-in", - element: , - }, - { - icon: , - name: "sign up", - path: "/sign-up", - element: , + icon: , + name: "logs", + path: "/logs", + element: , }, ], }, + // { + // title: "auth pages", + // layout: "auth", + // pages: [ + // { + // icon: , + // name: "sign in", + // path: "/sign-in", + // element: , + // }, + // { + // icon: , + // name: "sign up", + // path: "/sign-up", + // element: , + // }, + // ], + // }, ]; export default routes; diff --git a/frontend/src/widgets/layout/footer.jsx b/frontend/src/widgets/layout/footer.jsx index 1ea98e5..ab881ed 100644 --- a/frontend/src/widgets/layout/footer.jsx +++ b/frontend/src/widgets/layout/footer.jsx @@ -20,43 +20,11 @@ export function Footer({ brandName, brandLink, routes }) { {" "} for a better web. -
    - {routes.map(({ name, path }) => ( -
  • - - {name} - -
  • - ))} -
+ ); } -Footer.defaultProps = { - brandName: "Creative Tim", - brandLink: "https://www.creative-tim.com", - routes: [ - { name: "Creative Tim", path: "https://www.creative-tim.com" }, - { name: "About Us", path: "https://www.creative-tim.com/presentation" }, - { name: "Blog", path: "https://www.creative-tim.com/blog" }, - { name: "License", path: "https://www.creative-tim.com/license" }, - ], -}; - -Footer.propTypes = { - brandName: PropTypes.string, - brandLink: PropTypes.string, - routes: PropTypes.arrayOf(PropTypes.object), -}; - Footer.displayName = "/src/widgets/layout/footer.jsx"; - export default Footer;