-
Notifications
You must be signed in to change notification settings - Fork 42
Ampers: Nicoleta Brandolini #19
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
| let userData = { | ||
| 'name': $('input[name="user-name"]').val(), | ||
| 'email': $('input[name="email"]').val(), | ||
| }; |
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.
Since this is JavaScript, all property names (keys) are assumed to be strings, so you can write this as:
let userData = {
name: $('input[name="user-name"]').val(),
email: $('input[name="email"]').val(),
};| //RESERVE TRIP | ||
|
|
||
| const reserveTrip = (id) => { | ||
| reportStatus(''); |
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 this?
| <input type="text" name="email" /> | ||
| </div> | ||
| <div class="submit-container"> | ||
| <input type="submit" name="add-reservation" value="Reserve" class="reserve" id="reserve${response.data.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.
Out of curiosity, why do you make the id="reserve..."? Why not just id="${response.data.id}"? Because of this you need to add the .substr(7) part on line 105
| // ACTION | ||
| $(document).ready(() => { | ||
| $('#load').click(loadTrips); | ||
| $('#tbody').on('click', 'tr', function () { |
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.
something with the ID tbody doesn't make much sense 😆 because tbody doesn't help me understand what is unique about it, and IDs are to help me know what the unique identifier is. Also, it's on an element tbody
| tripsList.empty(); | ||
|
|
||
| reportStatus('Loading trips! Please wait...'); | ||
| $('#table').show(); |
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.
same comment as below, but: the ID #table isn't a very helpful ID name! Which table is it?
TREKWhat We're Looking For
One huge thing: your indentation is totally off! That being said... Good job with this project! It does everything correctly. I added a few comments, but otherwise good work |
TREK
Congratulations! You're submitting your assignment!
Comprehension Questions