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 us 04 seat reservation #236

Open
wants to merge 91 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

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
…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…
… 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
…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.
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