Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Created the AdminPageLayout for admin pages #67

Closed
wants to merge 0 commits into from

Conversation

Doraemon012
Copy link
Contributor

@Doraemon012 Doraemon012 commented Jul 7, 2023

Overview

  1. This PR fixes or fixes part of Create a AdminPageLayout component for admin pages. #51
  2. This PR does the following:
    • Created a AdminPageLayout component for admin pages
    • Made some minor changes in the AdminSideBar component

Essential Checklist

  • The PR title starts with "Fix #bugnum: ", followed by a short, clear summary of the changes. (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • "Allow edits from maintainers" is checked. (See here for instructions on how to enable it.)
  • The PR is made from a branch that's not called "main/master".

@prajjwalkapoor
Copy link
Collaborator

prajjwalkapoor commented Jul 9, 2023

Hey @ Doraemon012, you misunderstood the layout component. The layout component is the wrapper that contains common components and wraps the different pages.

Read more here

But no worries, now just separate your code into <AdminLayout /> and <AdminDashboard />. The layout should only contain a sidebar, a navbar and a footer. It should be wrapped with AdminDashboard page.

@Doraemon012
Copy link
Contributor Author

@prajjwalkapoor Sir, I have made the requested changes.

  • Created the AdminLayout and AdminDashboard component.
  • Moved the AdminSideBar, AdminPageLayout, RecentOrderCard, AdminDashboard components to a new directory named Admin panel.
  • Made the AdminLayout responsive.
  • Made the side bar collapsible for mobile screen.

@Bhavik-ag Bhavik-ag linked an issue Jul 12, 2023 that may be closed by this pull request
}}
ref={profile_container}
>
<Avatar
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Doraemon012 We don't need this as we already have this component in Navbar.

image

};

const current = new Date();
const monthNames = [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we are not using this part of code. Review and remove unnecessary code from the PR.

>
100
</Typography>
{/* <Box>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove your debug comments from the PR !!

>
Recent orders
</Typography>
<Card
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace Card with RecentOrderCard component.

import busIcon from '../../assets/bus-icon.svg';
import arrowIcon from '../../assets/arrowIcon.svg';
import scheduleIcon from '../../assets/schedule-icon.svg';
import Grid from '@mui/material/Grid/Grid';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove unused imports

@@ -0,0 +1,712 @@
import SideBar from '../AdminSideBar';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important !!

  • You have added two AdminPageLayout folders. Remove /components/AdminPageLayout folder
  • Make all the requested changes in ./components/AdminPanel/AdminPageLayout/index.tsx

@Doraemon012 Doraemon012 force-pushed the bus_adminPage branch 2 times, most recently from c596600 to 361483b Compare July 15, 2023 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a AdminPageLayout component for admin pages.
3 participants