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

Ha create and list reservations #235

Open
wants to merge 76 commits into
base: main
Choose a base branch
from

Conversation

halbert-anderson
Copy link

No description provided.

…given migration file - 20210123122225_createReservationsTable.js
…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
…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

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…
…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
…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
…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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant