-
Notifications
You must be signed in to change notification settings - Fork 738
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
Ha create and list reservations #235
Open
halbert-anderson
wants to merge
76
commits into
Thinkful-Ed:main
Choose a base branch
from
halbert-anderson:ha--create-and-list-reservations
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Ha create and list reservations #235
halbert-anderson
wants to merge
76
commits into
Thinkful-Ed:main
from
halbert-anderson:ha--create-and-list-reservations
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…given migration file - 20210123122225_createReservationsTable.js
…ons folder and reservationCreate file
…he backend, updated the ReservationCreate.js file to include the form elements (first_name, last_name, mobile_number, reservation_date, reservation_time, and people), and useState hook for the state of the reserevation being created. Also, updated the submit handler and implemented a changeHandler. In the utils/api.js file created a createReservations() method to send POST requests to the backend API route /reservations
…and store a reservation, instead of sending it to the remote database. Did this just to test that the front end code is working. Will implement the actual listReservation and createReservation methods soon
…est, and updated the .env file, in the backend, to include the url's to those files, then Migrated and seeded those databases. In the frontend, put the /reservations/new route after the the /reservations route in the Routes file and added the URL's of the deployed backend app to the .env.devlopment and .env.production files
…vations Ha create and list reservations
…and used the contorller in the reservations.router.js file to create the post route, and also updated the src/app.js file to use the reservationsRouter
… validation middleware functions in the reservation.controller.js file, edited the reservations/reservations.controller.js and reservations.router.js files to implement Get /reservations route.
…vations Ha create and list reservations
…vations fixed typo
…vations Fixed typo in reservations.controller.js file: changed fisrt_name to …
…le: changed hasPhoneNumber, phone_number and regPhoneNum to hasMobileNumber, mobile_number and regMobileNum.
…vations Changed incorredtly labeled elements in reservations.controller.js fi…
…r.js file to test an input
…vations addded a console.log( reservation_date ) to the reservation.controlle…
…vations made another change to reservations.controller.js file to test an input
…vations made another change to reservations.controller.js file to test an input
…vations made another change to reservations.controller.js file to test an input
…{4}\-\d{1,2}\-\d{1,2}$/ to test an input
…rvations made another change to reservations.controller.js file regDate = /^\…
… to the reservations table, also included the service in the reservations.controller.js file and used teh service to change the create method so that it now uses the remte database isntead of doing everything locally
…rvations added code to reservations.service file to create a reservation entry…
…rvations added Previous,Today and Next buttons with onClick handlers and adde…
…ons.service files to include the date query paramete nad to order the results by time
…rvations updated the list handler in the reservations.controller and reservati…
…ons.service files to include the date query paramete and to order the results by time. fixed syntax for saving info from query string
…rvations updated the list handler in the reservations.controller and reservati…
…ons.service files to include the date query paramete and to order the results by time. fixed syntax for saving info from query string
…rvations updated the list handler in the reservations.controller and reservati…
…rvations Ha create and list reservations
…/halbert-anderson/starter-restaurant-reservation into ha--create-and-list-reservations
…rom routes.js to dashboard.js to include either the url query parameter date or todays date, adjusted code in the dashboard.js file to use whatever date is passed to it. added some frontend, jsx validation in the reservation create function by including a pattern field in the input element and using a regex to define the input.
…rom routes.js to dashboard.js to include either the url query parameter date or todays date, adjusted code in the dashboard.js file to use whatever date is passed to it. added some frontend, jsx validation in the reservation create function by including a pattern field in the input element and using a regex to define the input.
…code, added some form validation usig the 'pattern' attribute in the input element of the form, let the ResevationCreate.js component manage state and render UI elements
… error.message to the webpage, initalized reservations to an empty array, [], in the useState hook in the Dashboard.js file, cleared out some unused code
…on the ReservationForm to iclude a pattern atribute that includes number characters as well as alphabet charaters,pattern='^[a-zA-Z0-9'-. ]+$'. Also updated the reservations.contoller.js file in the backend to have the same regExp in the firstAndLastNameAreValid() validation middleware function
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.