Code Monkey home page Code Monkey logo

restaurants-reservation-api's People

Contributors

zj05409 avatar

Watchers

 avatar

restaurants-reservation-api's Issues

Tutorial

First, you can cd into the docker/ directory of the api project, and execute the command:
docker-compose -f docker-compose.dev.yml up
after finished, you will see:

image

Second, you cd into the root of the frontend project and run:
yarn && mkdir -p ../restaurants-reservation-api/public && yarn build && cp -r build/* ../restaurants-reservation-api/public

Then you have build and copy the frontend app into the backend app.

After that, you can open http://localhost:5000 in your Chrome, and see this:

image

Now you can input 'admin' as your username, 'hilton' as your password, click the 'Login' button, then you will login as a 'Admin' user, who is a builtin user who can only create a 'Employee' user, and nothing else. After login success, you'll see this:

image

In this page, you can input the infomation and create a 'Employee' user, who can list reservations from all 'Guest' users, and update them.

image

After you submit, the page will become empty again, and you can create another 'Employee' user.

Now you can click 'Logout' button, and go back to the login page.

Then you can click the 'Register now' link, and go to the 'Guest' user register page.
image

After you complete the information and submit, you'll goto the login page automaticly.
Then you can login as the 'Guest' user you just created.

image

in this page, i.e. the 'Reservations' page, you can add a reservation by clicking the 'Add' button and fill the form.

image

After submitting, you'll go back to the 'Reservations' page, and now you need to refresh the page, and see the newest reservation list:

image

You hit the 'Edit' button, then you can update the information and hit the 'Update' button to submit.

image

After you submit, you go back to the 'Reservations' page again.

Now you can logout and login as a employee that you created as a 'Admin' user in the first step.

image

In the page you see after login, you can not see the 'Add' button anymore. But you can see all the reservations in the app. (The Guest users can only see their own reservations.), and update them.
image

You can also change the reservation status from the default value 'Pending' into 'Completed' or 'Canceled'.(The 'Guest' users can only change theire own reservations from 'Pending' into 'Canceled'). But by now I only finished developing the Rest and GraphQL apis of the 'Change Status' function, not the frontend.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.