-
Couldn't load subscription status.
- Fork 0
Confirm food delivered and Request Forms Dashboard #21
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
Conversation
…on the request page, properly collected form data to be used by API
making branch up to date with main
… with service,controller, etc.
…res. Just need to finish the photo uploads now
apps/frontend/src/components/forms/deliveryConfirmationModalButton.tsx
Outdated
Show resolved
Hide resolved
apps/frontend/src/components/forms/deliveryConfirmationModalButton.tsx
Outdated
Show resolved
Hide resolved
apps/frontend/src/components/forms/deliveryConfirmationModalButton.tsx
Outdated
Show resolved
Hide resolved
apps/frontend/src/components/forms/deliveryConfirmationModalButton.tsx
Outdated
Show resolved
Hide resolved
apps/frontend/src/components/forms/deliveryConfirmationModalButton.tsx
Outdated
Show resolved
Hide resolved
apps/frontend/src/components/forms/deliveryConfirmationModalButton.tsx
Outdated
Show resolved
Hide resolved
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.
lgtm
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.
Besides one comment everything looks good!
ℹ️ 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:
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.





Prefilled options on the previous request:
🏕️ (Optional) Future Work / Notes