Giter VIP home page Giter VIP logo

restaurant-backend's Introduction

Overview

......

Installation

  1. With Docker : https://github.com/nadeeth/php-dev-environment/tree/restaurant-backend

or

  1. Checkout this repository.
  2. run composer install
  3. update .env file (copy and modify .env.example)
  4. run dev/build?flush=1

GraphQL queries

To test GraphiQl Queries http://localhost:8100/dev/graphiql

Pages query { readPages { MenuTitle Title ID URLSegment Content ShowInMenus ShowInFooterMenu ClassName Banner { ID URL Title Name Filename File } } }

Home Page query { readHomePages(URLSegment: "home") { MenuTitle Title ID URLSegment Content ShowInMenus ClassName Banner { ID URL Title Name Filename File } Background { ID URL Title Name Filename File } } }

Menu Page and Menu query { readMenuPages(URLSegment: "menu") { MenuTitle Title ID URLSegment Content ShowInMenus ClassName Banner { ID URL Title Name Filename File } MenuItems { edges { node { Title Price Description Category { Title } Image { URL Filename } } } } } }

Create an enquiry / contact form submission mutation { createEnquiry( Email: "[email protected]", Name: "John Doe", Phone: "022 7634567", Message: "Test Enquiry." ) { ID Email Name Phone Message } }

Read Members and Groups query { readMembers { ID Email FirstName Groups { edges { node { ID Title } } } } }

Create/Update Orders - Check Order Model for all the Order Statuses, ommit ID whne creating mutation { createOrder( ID: 2 Email: "[email protected]", Name: "John Doe", Phone: "022 76345677", PickUpTime: "Date", Message: "Test Order", Status: "CustomerConfirmed" Total: 0, Tax: 12.5, Discount: 10, NetTotal: 0, Items: "[{'Title':'ItemOne','Price':'14.50','Qty':2},{'Title':'ItemTwo','Price':'3.50','Qty':1}]" ) { ID Email Name Phone PickUpTime Message Status Total Tax Discount NetTotal } }

Create Order Items mutation { createOrderItem( OrderID: 2, Title: "Pasta Salad", Price: 8.50, Qty: 2 ) { ID Title Price Qty } }

Delete Order Items mutation { deleteOrderItem( ID: 1 ) { ID Title Price } }

Read Orders query { readOrders(Email: "[email protected]") { ID Name Email Phone PickUpTime Status Total Tax Discount NetTotal OrderItems { edges { node { Title Qty Price } } } } }

Read SiteConfig query { readSiteConfig { Title Tagline Logo { ID URL Title Name Filename File } OrderTax OrderDiscount FooterText OpenTime CloseTime Facebook Instagram Twitter YouTube } }

User Roles

TODO : Document the user roles and configuration

CORS

TODO : Document CORS configuration.

restaurant-backend's People

Contributors

weaselshark avatar

Watchers

Nadeeth avatar

restaurant-backend's Issues

Meta data

add page Meta Data to the readPage query

Check permission when changing Order Status

Customers/admins should have different levels of permissions
ie. The customers should not be able to change orders to RestaurantConfirmed etc.

Clarify the logic around status change notifications.

logo

Add a filed to upload a logo in site config. label with ideal size.
Add it to the site config GraphQL query.

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.