43 lines
1.1 KiB
Ruby
43 lines
1.1 KiB
Ruby
class Origami::QuickServiceController < ApplicationController
|
|
# before_action :set_dining, only: [:detail]
|
|
|
|
def index
|
|
@menu = MenuCategory.all.active
|
|
@dining = DiningFacility.all.active
|
|
@customer = Customer.all
|
|
# @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')
|
|
render "origami/addorders/detail"
|
|
end
|
|
|
|
def get_menu_category ()
|
|
if (params[:id])
|
|
puts params[:id]
|
|
#Pull this menu
|
|
@menu = MenuCategory.find_by_id(params[:id])
|
|
# puts @menu.menu_items[1].item_attributes.to_json
|
|
return @menu
|
|
else
|
|
MenuCategory.current_menu
|
|
end
|
|
end
|
|
|
|
|
|
def get_menu_sub_category ()
|
|
id = params[:id]
|
|
if (id)
|
|
#Pull this menu
|
|
@sub_menu = MenuCategory.where("menu_category_id = #{id}").active
|
|
# puts @menu.menu_items[1].item_attributes.to_json
|
|
return @sub_menu
|
|
end
|
|
end
|
|
|
|
def get_all_product()
|
|
@product = Product.all
|
|
end
|
|
|
|
end
|