Skip to content
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

Aruna(ampers) #21

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Aruna(ampers) #21

wants to merge 5 commits into from

Conversation

aruna79
Copy link

@aruna79 aruna79 commented May 28, 2018

TREK

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
What does it mean for code to be asynchronous? Many codes can be executed at the same time.
Describe a piece of your code that executes asynchronously. How did this affect the way you structured it? In $(document).ready(), several buttons will execute corresponding to request once clicked. The order of these functions doesn't affect the order they are execute
What kind of errors might the API give you? How did you choose to handle them? There are error when fail the validation, network, bad request etc. When the axios request fails, errors will be added on the page in .catch block.
Do you have any recommendations on how we could improve this project for the next cohort?

@CheezItMan
Copy link

TREK

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene You should have more commits in here! Good commit messages
Comprehension questions Check
Functionality
Click a button to list trips Check
Click a trip to see trip details Check
Fill out a form to reserve a spot Check
Errors are reported to the user You are reporting problems, but not the validation errors when the name or email fields are missing
Styling You have area styled, although it's odd that empty fields remain before they are updated by the callbacks. Also your code is not responsive and doesn't look good on small screens.
Under the Hood
Trip data is retrieved using from the API Check
JavaScript is well-organized and easy to read Check
HTML is semantic Too many divs!
Overall You hit all the learning goals. Things to improve on are the styling (making things responsive, more readable etc) and reporting the validation errors on failed post requests. Well done.

.catch((error) => {
console.log(error.response);

reportStatus(`Encountered an error: ${error.message}`);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should loop through the validation errors (if any) here as well as the error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants