Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant into adminbsb_ui_changes
This commit is contained in:
@@ -18,17 +18,14 @@ class Origami::AddordersController < BaseOrigamiController
|
||||
if check_mobile
|
||||
@webview = true
|
||||
end
|
||||
puts params[:menu]
|
||||
puts "sssssssssssssssssssssssssss"
|
||||
if params[:menus].present?
|
||||
@menus = JSON.parse(params[:menus], object_class: OpenStruct)
|
||||
@menu = JSON.parse(params[:category], object_class: OpenStruct)
|
||||
puts @menus.to_json
|
||||
puts @menu.to_json
|
||||
else
|
||||
@menus = Menu.all
|
||||
@menu = MenuCategory.active.where("menu_id =#{@menus[0].id}").order('order_by asc')
|
||||
end
|
||||
|
||||
# if params[:menu] == "true"
|
||||
@menus = []
|
||||
@menu = []
|
||||
# else
|
||||
# @menus = Menu.all
|
||||
# @menu = MenuCategory.active.where("menu_id =#{@menus[0].id}").order('order_by asc')
|
||||
# end
|
||||
|
||||
@table_id = params[:id]
|
||||
@table = DiningFacility.find(@table_id)
|
||||
|
||||
@@ -30,9 +30,9 @@ class Origami::HomeController < BaseOrigamiController
|
||||
@membership = MembershipSetting::MembershipSetting
|
||||
@payment_methods = PaymentMethodSetting.all
|
||||
|
||||
bookings = Booking.all
|
||||
if !bookings.today.nil?
|
||||
@order_items_count = Hash.new
|
||||
# bookings = Booking.all
|
||||
# if !bookings.today.nil?
|
||||
# @order_items_count = Hash.new
|
||||
# bookings.each do |booking|
|
||||
# if booking.sale_id.nil? && booking.booking_status != 'moved'
|
||||
# if !booking.booking_orders.empty?
|
||||
@@ -60,7 +60,7 @@ class Origami::HomeController < BaseOrigamiController
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
end
|
||||
# end
|
||||
|
||||
@dining.bookings.active.each do |booking|
|
||||
if booking.sale_id.nil? && booking.booking_status != 'moved'
|
||||
|
||||
@@ -10,24 +10,30 @@ class Origami::QuickServiceController < ApplicationController
|
||||
def index
|
||||
today = DateTime.now
|
||||
day = Date.today.wday
|
||||
@menus = Menu.all
|
||||
@menu = MenuCategory.active.where("menu_id =#{@menus[0].id}").order('order_by asc')
|
||||
# if params[:menu] == "true"
|
||||
@menus = []
|
||||
@menu = []
|
||||
# else
|
||||
# @menus = Menu.all
|
||||
# @menu = MenuCategory.active.where("menu_id =#{@menus[0].id}").order('order_by asc')
|
||||
# end
|
||||
@zone = Zone.all
|
||||
@customer = Customer.all
|
||||
@tables = Table.all.active.order('status desc')
|
||||
@rooms = Room.all.active.order('status desc')
|
||||
# @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"
|
||||
render "origami/addorders/detail"
|
||||
end
|
||||
|
||||
def modify_order
|
||||
today = DateTime.now
|
||||
day = Date.today.wday
|
||||
@menus = Menu.all
|
||||
@menu = MenuCategory.active.where("menu_id =#{@menus[0].id}").order('order_by asc')
|
||||
# if params[:menu] == "true"
|
||||
@menus = []
|
||||
@menu = []
|
||||
# else
|
||||
# @menus = Menu.all
|
||||
# @menu = MenuCategory.active.where("menu_id =#{@menus[0].id}").order('order_by asc')
|
||||
# end
|
||||
if(params[:id][0,3] == "BKI")
|
||||
@table_id = nil
|
||||
@table = nil
|
||||
|
||||
Reference in New Issue
Block a user