Merge branch 'addorder' of bitbucket.org:code2lab/sxrestaurant

This commit is contained in:
Yan
2017-08-30 19:16:20 +06:30
8 changed files with 265 additions and 53 deletions

View File

@@ -0,0 +1,9 @@
class Api::Restaurant::MenuItemInstancesController < Api::ApiController
skip_before_action :authenticate
#Description
# Pull the default menu details and also other available (active) menus
# Input Params - order_id
def show
@id = MenuItemInstance.find(params[:id])
end
end

View File

@@ -37,6 +37,7 @@ class Origami::AddordersController < BaseOrigamiController
def create
Rails.logger.debug "Order Source - " + params[:order_source].to_s
Rails.logger.debug "Table ID - " + params[:table_id].to_s
puts params[:order_items]
items_arr = []
JSON.parse(params[:order_items]).each { |i|
items = {"order_item_id": i["order_item_id"],"item_instance_code": i["item_instance_code"],"quantity": i["quantity"],"options": i["options"]}