update qurick raw

This commit is contained in:
Aung Myo
2018-02-01 10:29:24 +06:30
parent a96091decb
commit 2f024e8691
18 changed files with 585 additions and 60 deletions

View File

@@ -0,0 +1,42 @@
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