Skip to content

michaelanthonyyy/circle_restaurant_mgmt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CircleCircle Restaurant Management License: MIT

This readme has been procedurally generated

Table of Contents

  1. Description
  2. Deployed link
  3. Installation
  4. Usage
  5. Code snippets
  6. Licenses
  7. Contributing
  8. Tests
  9. Questions

Description

Circle is a full-stack, well rounded restaurant management application. It allows users, such as customers, to add items to their order while also facilitating restaurant administrative functions. On the administrative side this would include additional features such as adding, editing and deleting existing orders. Main Page

Deployed link

Circle Restaurant Management


Installation

To install dependencies run the following command:

npm install

Usage

To use this repo you will need a working knowledge of Javascript, Express, Sequelize, Passport, HTML/Foundation CSS.

To run this tool use the following command.

node server.js

Admin Credentials:
username: admin
password: password


Code snippets

For our models, we had "Items" which holds all menu information, "Seating" which assigns users to a specific table for the food to be delivered, and "Orders" which is a join table between the two. Through table association Orders belongs to both Seating and Items with foreign-key's for each table allowing Orders to display itemId's correctly based on seatingId when Users are placing their orders.

Orders.associate = function (models) {
		models.Orders.belongsTo(models.Seating, {
				foreignKey: {
						allowNull: false,
						constraints: false,
				}
		});
		models.Orders.belongsTo(models.Items, {
				foreignKey: {
						allowNull: false,
						constraints: false,
				}
		});
};

We have several routes for items, orders, and seating. The items and seating routes are used to give the user and admin both functionality with adding orders, editing and deleting orders. The seating routes are used for displaying the orders and keeping track of customers.

app.get("/api/orders/seating/:id", function (req, res) {
		db.Orders.findAll({
				where: {
						SeatingId: req.params.id,
						submitted: 0,
						completed: 0
				},
				include: [
						{
								model: db.Items,
								required: false
						}
				]
		}).then(function (dbItem) {
				res.json(dbItem);
		})
});

To help align everything and make the menu items responsive, we added the following Foundation CSS.

  • 'grid-x': align all items in a row
  • 'grid-margin-x': add a space along the x-axis
  • 'small-up-2/medium-up-2/large-up-2": limit the number of menu items visible at various breakpoints.
<div class="tabs-panel is-active" data-menu-items="appetizers" id="menuAppetizers">
	<div class="grid-x grid-margin-x small-up-2 medium-up-4 large-up-6" id="appetizerItem"></div>
	<!-- Dynamically add Menu Items by category through jQuery-->
</div>

Licenses

This project uses a MIT License.


Contributing

If you would like to contribute, you will need to know Sequelize and Node.


Tests

To run tests run the following command:

NA

Questions

Created by Hudson Barnes, Pamela Gutierrez, Michael Medina, Muhammad A Khalid Family

Pictured: Hudson Barnes, Pamela Gutierrez, Michael Medina, Muhammad A Khalid

If you have any questions you can reach us at the following:

Hudson Barnes hudsonmbarnes@gmail.com LinkedIn GitHub
Pamela Gutierrez gtrz.pamela@gmail.com LinkedIn GitHub
Michael Medina michaelanthony.medinaa@gmail.com LinkedIn GitHub
Muhammad A Khalid akhalid.code@gmail.com LinkedIn GitHub

About

Contactless Ordering and Menu Management

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •