-
Notifications
You must be signed in to change notification settings - Fork 0
Food manufacturer dashboard #36
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
base: main
Are you sure you want to change the base?
Conversation
…tails to frontend,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments:
-
The frontend error handling for an invalid food manufacturer ID is inconsistent - for example, if I create a food manufacturer with ID 1,
/food-manufacturer-dashboard/0will cause the dashboard to show up but with all the values blank, while/food-manufacturer-dashboard/2will giveOops!
Sorry, an unexpected error has occurred.
Cannot read properties of undefined (reading 'firstName')Could we make both of these cases give a more user-friendly error message saying the manufacturer could not be found?
-
For the "Update Frequency of Donations" section of the dashboard:
- Is the "x" after "Current Frequency:" a placeholder?
- When
donation_frequencyis NULL, could we make the "Current Frequency" line show something more meaningful? Currently, it shows "Current Frequency: x donations," just without the frequency at the end. - Can we make it so that when you update the donation frequency, the current frequency updates on the dashboard without having to refresh the page?
- I know this section had to be made different than the original design now that we want the number of donations per week, month, etc. to always be 1, but could we change the "A donation" text before the dropdown to something clearer (maybe "New Frequency:")? I was confused what that meant when I first saw it.
I like the overall appearance of the dashboard, and the backend looks good!
…ge, utilizing get helper for getManufacturerDetails
Justin: I think I addressed all of the above |
ℹ️ Issue
Closes Food Manufacturer Dashboard
📝 Description
I added support for the Food Manufacturer Dashboard. This page features a hamburger menu for various page navigation. It also displays details about the current manufacturer such as email, number of donations, etc. Here you can also update the frequency of donations that a manufacturer wants (weekly, monthly, etc.). This information is stored and updated in the database. This page is important because it will serve as a hub for food manufacturers to look at their own information and navigate to places they need as well as update their requested donation frequency.
Briefly list the changes made to the code:
✔️ Verification
I verified that data displayed on my page matched with the database for the given manufacturer using manually inputted data. To verify the put request for donation frequency I changed it in the frontend and verified these changes took place in PGAdmin.
🏕️ (Optional) Future Work / Notes
The hamburger menu doesn't have functionality for the following routes: profile, orders, donation statistics, sign out. Sign out functionality and orders page are waiting to be merged in so we can update this page once that is done.