forked from Code-4-Community/scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Confirm food delivered and Request Forms Dashboard #21
Open
dburkhart07
wants to merge
18
commits into
main
Choose a base branch
from
confirm-food-delivered
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ℹ️ 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).
Briefly list the changes made to the code:
✔️ 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
The only thing that I was unable to finish for this (and will continue to work on), is the photo paths in specific. I was able to get the user to be able to upload multiple photos (which are still not displaying all of the names of the uploaded photos, which was another feature I wanted to add), but the are just entered into the database as the name and extension (eg: "photo1.png").