-
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
Edit Trip Implementation #73
Conversation
Two bugs: 1. Form input boxes should be value instead of placeholder when editing a trip. 2. The list of collaborators shows up in each individual box rather than one in each box.
…d for either placeholder or defaultValue props.
…e values rather than placeholders.
…ause duplicate current users when saving trip. Fix invlolves removing current user from list of collaborators when editting collaborator and add Issue #71 to let collaborators remove themselves from a trip.
…e for ease of use anywhere in component class.
This reverts commit 6ac1b0c.
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.
deleted comment, addressed in review
…ure default value works for date form inputs.
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.
I think I have already been doing this in all of my PRs. But I will make sure to do another sweep to make sure I didn't miss any annotations. |
What is a quick description of the change?
Adds to the infrastructure in #70 to allow a user to edit an existing trip in the 'Edit Trip' modal when clicking on the 'Edit Trip' button for a trip.
Is this fixing an issue?
fixes #69.
Are there more details that are relevant?
The main addition of this PR is to the
ViewTrips
directory with the following files:index.js
:showEditTripModal
passed down to TripContainer and Trip to be called with that trips id and data soSaveTripModal
can be loaded with default values from the current trip data.placeholderObj
rename todefaultformObj
for accuracy.showAddTripModal
removed as there are placeholders for empty form inputs in both types of modals.save-trip-modal.js
:defaultValue
props that are used for edit trip modal but not for add trip.collaboratorsRefArr
such that an add trip modal displays one empty input box for collaborators and edit trip shows all collaborators except for current user (Capability for Current User to Leave a Trip #71 to remove current user later).trip-container.js
andtrip.js
: Changes so that current trip info is passed in usable format toshowEditTripModal
-->SaveTripModal
.Check lists (check
x
in[ ]
of list items)No additional unit tests were written because the
SaveTripModal
component uses the same (logical / non-React generating) code as AddTripModal for adding and editing trips with slight modifications to the code responsible for rendering the React Bootstrap form.As of now, integration (end-to-end) tests were deemed non-critical. Thus, functions related to react and firestore will be tested at a later time. Unit tests for "logical" functions will be included in this PR and for the remaining PRs needed to complete the MVP.
Any additional comments?
GIF walking through editing a trip: