-
Notifications
You must be signed in to change notification settings - Fork 42
tor - trek - octos #34
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
|
|
||
| event.preventDefault(); | ||
|
|
||
| const reservationURL = baseURL + '/' + $('input[name="id"]').val() + '/reservations' |
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.
Good - I like this stored in the hidden field in the form
|
|
||
| axios.post(reservationURL, tripData) | ||
| .then(() => { | ||
| $('input[name="name"]').val(''); // clearing text field |
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.
Good - I like this being done only if it succeeds
| switch(searchCat) { | ||
| case 'continent': | ||
| $('#search-filters').html( | ||
| `<div class='dropdown'> |
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'd love to see each of these dropdowns returned from separate functions to clean up this function
| .then((response) => { | ||
| $('#trip-list').empty(); | ||
| $('#trip-list').append('<h3>All Trips<h3>'); | ||
| buildTripTable(response); |
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.
Yes this is awesome! I like that the you saw the opportunity to DRY up this code when adding some of the optionals
TREKWhat We're Looking For
|
TREK
Congratulations! You're submitting your assignment!
Comprehension Questions