From 9dd3531cb618f274f5cb10345bcaf5ae484852ff Mon Sep 17 00:00:00 2001 From: "Doraemon@012" Date: Sat, 15 Jul 2023 21:21:27 +0530 Subject: [PATCH] feat: Created the AdminPageLayout component --- .../AdminPanel/AdminDashboard/index.tsx | 66 ++++++++++++ .../AdminPanel/AdminPageLayout/index.tsx | 102 ++++++++++++++++++ .../AdminPanel/AdminSideBar/index.tsx | 2 +- 3 files changed, 169 insertions(+), 1 deletion(-) create mode 100644 frontend/src/components/AdminPanel/AdminDashboard/index.tsx create mode 100644 frontend/src/components/AdminPanel/AdminPageLayout/index.tsx diff --git a/frontend/src/components/AdminPanel/AdminDashboard/index.tsx b/frontend/src/components/AdminPanel/AdminDashboard/index.tsx new file mode 100644 index 0000000..d2a9275 --- /dev/null +++ b/frontend/src/components/AdminPanel/AdminDashboard/index.tsx @@ -0,0 +1,66 @@ +import {Typography, Box} from '@mui/material'; +import Card from '@mui/material/Card'; +import RecentOrderCard from '../RecentOrderCard'; +import AdminPageLayout from '../AdminPageLayout'; + +export default function AdminDashboard() { + return ( + + + + + + Tickets booked today + + + + 100 + + + + Recent orders + + + + + + + + ); +} diff --git a/frontend/src/components/AdminPanel/AdminPageLayout/index.tsx b/frontend/src/components/AdminPanel/AdminPageLayout/index.tsx new file mode 100644 index 0000000..57a18f8 --- /dev/null +++ b/frontend/src/components/AdminPanel/AdminPageLayout/index.tsx @@ -0,0 +1,102 @@ +import SideBar from '../AdminSideBar'; +import {Typography, Box} from '@mui/material'; +import {useScreen} from '../../../customHooks/useScreen'; +import Footer from '../../Footer'; +import IconButton from '@mui/material/IconButton'; +import OpenIcon from '@mui/icons-material/MoreHoriz'; + +export default function AdminPageLayout({children}: any) { + const currentScreen = useScreen(); + const openSidebar = () => { + if (document.getElementById('drawer')) { + (document.getElementById('drawer') as HTMLElement).style.display = + 'block'; + } + }; + + return ( + + {currentScreen !== 'xs' ? ( + + + + ) : ( + + + + )} + + + + + + + + Manage Buses + + + + + Saturday, 1 January 2023 + + + + + {children} +