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

Log history page #6

Merged
merged 15 commits into from
Nov 16, 2024
Merged

Log history page #6

merged 15 commits into from
Nov 16, 2024

Conversation

naheyansheikh
Copy link
Contributor

Implemented the Log History Page. The page includes the following features:

Search: Allows users to search logs by title.
Sort By: Enables sorting of logs by date or alphabetical order.
Filters: Provides filters for:
Date of Operation (select a date range).
Patient Name (filter logs by specific patient names).
Pagination: Displays logs in a paginated format, showing a set number of logs per page, with navigation options to move between pages.

Screen.Recording.2024-10-30.at.3.43.25.AM.mov

Copy link
Contributor

@TonyLiu0226 TonyLiu0226 left a comment

Choose a reason for hiding this comment

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

Great work so far with refactoring the routes to be protected, making components, and breaking up the CSS files! Although the code is more modular and follows better practices than before, I would still suggest some folder structure changes, which most of the rest of my comments focus on.

Ideally, components should be structured such that they are reusable throughout the app in multiple places, if needed. Thus, having subfolders within the components based on the specific app pages sort of implies that the component is specific to that page only, rather than being reusable, I would recommend changing to the following folder structure:

├── components                 
│   ├── Buttons
│   ├── ├── SignUpButton.jsx
│   ├── ├── SignUpButton.css
│   ├── ├── ... jsx and css files for other buttons
│   ├── LogHistory
│   ├── ├── ...logHistory components....
│   ├── Logo
│   ├── ├── ...logo components...
│   ├── Navbar
│   ├── ├── ...navbar components...
│   ├── UploadPhoto
│   ├── ├── ...UploadPhoto Components...           
└──

├── pages
│   ├── styles
│   ├── ├── homepage.css
│   ├── ├── dashboard.css
│   ├── ├── ...other css files containing styles for app pages...
│   ├── Dashboard.jsx
│   ├── Homepage.jsx
│   ├──...other pages...
└──

Buttons, Navbar, Logo are all things that we will likely reuse throughout the app, so structuring it this way makes it easier to emphasize this and import them in various pages as needed. Note I've left UploadPhoto and LogHistory, despite them being more specific to the pages, as is for now, since these two pages involve some modular parts (such as searchbar and pagination) that would be better to put into a component rather than the main page.

Additionally, within the pages folder, create a new folder for css styles for each page. This way, we can move most of the css from the global index file to the proper file for the page, making the css easier to read and manage.

Please feel free to let me know if you have any questions or comments, we can also go over this next week if needed!

frontend/src/components/Homepage/CTASection.jsx Outdated Show resolved Hide resolved
frontend/src/components/Homepage/CTASection.css Outdated Show resolved Hide resolved
frontend/src/components/Homepage/CTASection.jsx Outdated Show resolved Hide resolved
frontend/src/components/Dashboard/MainContent.jsx Outdated Show resolved Hide resolved
frontend/src/components/Dashboard/MainContent.css Outdated Show resolved Hide resolved
frontend/src/components/Navbar/Navbar.jsx Show resolved Hide resolved
frontend/src/components/NewLog/CTA.jsx Outdated Show resolved Hide resolved
frontend/src/index.css Outdated Show resolved Hide resolved
frontend/src/index.css Show resolved Hide resolved
@naheyansheikh naheyansheikh merged commit a783c5f into main Nov 16, 2024
4 checks passed
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.

2 participants