merge with addorder

This commit is contained in:
Yan
2017-08-17 18:59:22 +06:30
17 changed files with 563 additions and 34 deletions

View File

@@ -1,11 +1,11 @@
class Api::Restaurant::MenuController < Api::ApiController
class Api::Restaurant::MenuCategoriesController < Api::ApiController
skip_before_action :authenticate
#Description
# Pull the default menu details and also other available (active) menus
# Input Params - order_id
def index
@menus = Menu.all
@current_menu = Menu.current_menu
@menus = MenuCategory.all
@current_menu = MenuCategory.current_menu
end
@@ -21,10 +21,10 @@ class Api::Restaurant::MenuController < Api::ApiController
def menu_detail (menu_id)
if (menu_id)
#Pull this menu
menu = Menu.find_by_id(menu_id)
menu = MenuCategory.find_by_id(menu_id)
return menu
else
Menu.current_menu
MenuCategory.current_menu
end
end

View File

@@ -1,5 +1,5 @@
class Api::Restaurant::MenuController < Api::ApiController
skip_before_action :authenticate
#Description
# Pull the default menu details and also other available (active) menus
# Input Params - order_id

View File

@@ -0,0 +1,22 @@
class Origami::AddordersController < BaseOrigamiController
before_action :set_dining, only: [:show]
def index
@tables = Table.all.active.order('zone_id asc').group("zone_id")
@rooms = Room.all.active.order('zone_id asc').group("zone_id")
@all_table = Table.all.active.order('status desc')
@all_room = Room.all.active.order('status desc')
end
def show
@menu = MenuCategory.all
@table_id = params[:id]
end
private
def set_dining
@dining = DiningFacility.find(params[:id])
end
end