-
Notifications
You must be signed in to change notification settings - Fork 47
Maddie Shields - Edges - Trek #46
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: master
Are you sure you want to change the base?
Conversation
TREKWhat We're Looking For
Great work on this Maddie! I've added a few comments about a few small things. Otherwise, I'd consider your code to be very functional, very action-packed, and very fancy. Good work! |
| .then((response) => { | ||
| tripInfo.append(getInfo(response.data)) | ||
| .append(loadForm()); | ||
| $('#reservation-form').submit(function(event) { createReservation(event, tripID); }); |
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.
nice anonymous function!
| event.preventDefault(); | ||
| axios.post(getReservationURL(tripID), reservationFormData()) | ||
| .then((response) => { | ||
| reportStatus(`Successfully added a reservation with ID ${response.data.trip_id}!`); |
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.
This text says that the reservation has an ID... but you put into the message the trip's ID! hahaha
|
|
||
| $('#load-trips-button').on('click', function() { | ||
| $('#list').slideDown('slow'); | ||
| loadTrips(null); |
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.
do you need to pass in null?
| .promise().done(function() { | ||
| getTrip(event.target.classList[1]); | ||
| $('.side-info').slideDown('slow'); | ||
| }); |
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.
FFFAAANCY
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.
This could be even fancier if you found a way to move the getTrip() call into the loadTrips function when you create each trip listing.
TREK
Congratulations! You're submitting your assignment!
Comprehension Questions
Tripin the list by it's ID field. Would it be advantageous to keep the list in order by the id field? Explain why or why not.