Skip to content

Conversation

@dburkhart07
Copy link

@dburkhart07 dburkhart07 commented Jan 26, 2025

ℹ️ Issue

Closes Confirm food delivered and Request Forms

📝 Description

I added a confirm delivery modal button and integrated that into the dashboard. The dashboard consists of a requestId, date requested, status, fulfilled by (which I did not really use as of much yet), expected delivery date (which as of now is set when the food is delivered), and an action section, containing the modal button. I allowed for proper navigation of pantryIds as well to make it so the dashboard's information is based entirely on the requests associated with the specified pantryId in the path. This form also utilizes the food request modal button to allow for users to make new food requests (or the last one that they did, based on the most recent request id). In terms of the backend, I extended the food-requests API to get a specific request id associated with a food request form, and update the delivery date, feedback, and photos for it accordingly. In order to do all of this, I had to add dummy data for the pantry and user to allow for food requests to be made (which as of right now, defaults it to pantryId 1).

NOTE: Update to Pull Request
I also added a feature to integrate the AWS S3 API to send the uploaded photos to the AWS S3 Bucket (confirm-delivery-photos is the bucket). I also added in specific features so that once a delivery is confirmed, the button is no longer accessible. This can be replicable by just adding in the proper AWS S3 credentials (the bucket name, access key id, and secret access key to the .env file). I also made it so that the delivery date is not a future date (must be current or previous). I also cleaned up code to do alerts rather than console.errors for invalid data throughout the components.

Briefly list the changes made to the code:

  1. Added confirm delivery form button popup modal
  2. Added new food requests functionality in request forms
  3. Created interactive dashboard, utilizing APIs to get accurate, pantry-specific information from database.

NOTE: Update to Pull Request
4. Included AWS S3 photo uploading, storing the public URLs to the database
5. Updated the request forms page to only allow confirming delivery once, and available dates only being current or previous.

✔️ Verification

What steps did you take to verify your changes work? These should be clear enough for someone to be able to clone the branch and follow the steps themselves.

I verified the frontend by providing specific routes in the app.tsx file, where going to /request-forms/1 where 1 is the pantryId (works for any valid pantryId in the database), and practiced creating new food requests (and doing it based on the previous requests), as well as confirming the deliveries and making sure the UI updated accordingly. To verify the backend, I checked with the database to make sure that, when the UI was updating, the backend was also displaying corresponding information.

Provide screenshots of any new components, styling changes, or pages.
image
image
Prefilled options on the previous request:
image
image
image

🏕️ (Optional) Future Work / Notes

dburkhart07 and others added 20 commits January 19, 2025 21:33
…on the request page, properly collected form data to be used by API
making branch up to date with main
…res. Just need to finish the photo uploads now
Copy link

@fanzzz368 fanzzz368 left a comment

Choose a reason for hiding this comment

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

lgtm

@Juwang110 Juwang110 self-requested a review February 5, 2025 20:19
Copy link

@Juwang110 Juwang110 left a comment

Choose a reason for hiding this comment

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

Besides one comment everything looks good!

@dburkhart07 dburkhart07 merged commit e724faa into main Feb 7, 2025
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.

4 participants