Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant into adminbsb_ui_changes
This commit is contained in:
@@ -18,9 +18,15 @@ class Origami::AddordersController < BaseOrigamiController
|
||||
if check_mobile
|
||||
@webview = true
|
||||
end
|
||||
@menus = Menu.all
|
||||
@menu = MenuCategory.active.where("menu_id =#{@menus[0].id}").order('order_by asc')
|
||||
|
||||
|
||||
# if params[:menus].present?
|
||||
# @menus = JSON.parse(params[:menus], object_class: OpenStruct)
|
||||
# @menu = MenuCategory.active.where("menu_id =#{@menus[0].id}").order('order_by asc')
|
||||
# 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)
|
||||
@booking = @table.get_booking
|
||||
@@ -57,7 +63,7 @@ class Origami::AddordersController < BaseOrigamiController
|
||||
end
|
||||
|
||||
def get_item_instance
|
||||
@id = MenuItemInstance.find(params[:id])
|
||||
@instance = MenuItemInstance.find(params[:id])
|
||||
end
|
||||
|
||||
def get_menu()
|
||||
@@ -113,8 +119,6 @@ class Origami::AddordersController < BaseOrigamiController
|
||||
end
|
||||
items_arr.push(items)
|
||||
}
|
||||
puts items_arr.to_json
|
||||
puts "sssssssssssssssssssssss"
|
||||
# begin
|
||||
# if params[:order_source] == "quick_service"
|
||||
# customer_id = "CUS-000000000002" # for no customer id from mobile
|
||||
|
||||
@@ -3,6 +3,8 @@ class Origami::DashboardController < BaseOrigamiController
|
||||
def index
|
||||
@shop = Shop.first
|
||||
|
||||
|
||||
|
||||
today = DateTime.now.strftime('%Y-%m-%d')
|
||||
# @orders = Sale::where("payment_status='new' and sale_status='bill' and DATE_FORMAT(receipt_date,'%Y-%m-%d') = '#{today}'").count()
|
||||
# @sales = Sale::where("payment_status='paid' and sale_status='completed' and DATE_FORMAT(receipt_date,'%Y-%m-%d') = '#{today}'").count()
|
||||
@@ -81,4 +83,8 @@ class Origami::DashboardController < BaseOrigamiController
|
||||
end
|
||||
end
|
||||
|
||||
def get_all_menu
|
||||
@menus = Menu.all
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user