-
Notifications
You must be signed in to change notification settings - Fork 740
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 us 04 seat reservation #236
Open
halbert-anderson
wants to merge
91
commits into
Thinkful-Ed:main
Choose a base branch
from
halbert-anderson:ha--US-04-seat-reservation
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 us 04 seat reservation #236
halbert-anderson
wants to merge
91
commits into
Thinkful-Ed:main
from
halbert-anderson:ha--US-04-seat-reservation
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 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.
…rvations Ha create and list reservations
…rvations cleaning up files
…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
…rvations refactored some modules made a ReservationsForm.js file for the form…
…rvations cleaned up files
… 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
…rvations Ha create and list reservations
…s file to have a aform that allows the restaurant worker to assign tables to reservation, created tables/TableAssign.js file hold talbe Assignment and tableAssingError state variables, Updated the Dashboard.js file display Tables and capcity to seat people in therestaurant
…s file to have a aform that allows the restaurant worker to assign tables to reservation, created tables/TableAssign.js file hold talbe Assignment and tableAssingError state variables, Updated the Dashboard.js file display Tables and capcity to seat people in therestaurant
…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
…rvations updated the form validation for the first_name and last_name <input>…
…on. refined regualr expressins in front and backend validation statements
…ckend of project. Added NewTableForm, SeatReservationForm, TablesCreate.js and TableUpdate.js files to front end and added createTable, seatReservation, updateTable, updateReservation and seatReservation functions to the api.js file
…ontroller.js file
…rt-anderson/starter-restaurant-reservation into ha--US-04-seat-reservation
…ables.controller components, created hasProperties.js component for validation purposes. Updated tables.router.js and tables.services.js adding an updateSeat method to both. In the frontend did a lot of refactoring and created some custom hooks to handle repetitive code and separation of concerns: useSubmitForm to handle form submitting, useReservations for loading reservations and handling reservation state, useTables for loading tables and hadling tables state. Separated the forms display functionality from their state and logic: ReservationForm, SeatForm, and TableForm focus on rendering their respective forms and ReservationCreate, ReservationEdit, and SeatReservation concentrate on the state management and logic. Also update the API file to correctly call the backend and added a few more methods. renamed a bunch of components to make it make more sense..hopefully
…lder, useReservations, refactored ReservatinCreate and ReservationEdit componets to use the hooks, updated Routes componet to ensure correct routing. added route for search functionality will added code for it soon. backend: added more validation to tables.controller and reservatios.controller components updated tables.service andreservations.service files to account for endpoint functionalities. Also added api functions and corrected previous api functions to ensure they are operating as expected
…ional parameter by adding a default callback function, validationFunction = () => ({}). Updated the TableCreate function to use the useSUbmitHandler hook.
…n migration and seeding of databases
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.