Merge branch 'foodcourt' of gitlab.com:code2lab/SXRestaurant into foodcourt

This commit is contained in:
Myat Zin Wai Maw
2019-12-03 17:49:21 +06:30
200 changed files with 3397 additions and 2690 deletions

View File

@@ -17,14 +17,15 @@ class Foodcourt::FoodCourtController < ApplicationController
# @menus = Menu.all
# @menu = MenuCategory.active.where("menu_id =#{@menus[0].id}").order('order_by asc')
# end
@zone = Zone.all.where("shop_code='#{@shop.shop_code}' and is_active= true")
shop = Shop.current_shop
@zone = Zone.all.where("is_active= true")
@customer = Customer.all
@tables = Table.all.active.where("shop_code='#{@shop.shop_code}'").order('status desc')
@rooms = Room.all.active.where("shop_code='#{@shop.shop_code}'").order('status desc')
@tables = Table.all.active.order('status desc')
@rooms = Room.all.active.order('status desc')
@cashier_type = "food_court"
#checked quick_service only
@quick_service_only = true
lookup_dine_in = Lookup.where("shop_code='#{@shop.shop_code}'").collection_of('dinein_cashier')
lookup_dine_in = Lookup.collection_of('dinein_cashier')
if !lookup_dine_in.empty?
lookup_dine_in.each do |dine_in|
if dine_in[0].downcase == "dineincashier"
@@ -161,7 +162,7 @@ class Foodcourt::FoodCourtController < ApplicationController
end
def get_all_product()
@product = Product..where("shop_code='#{@shop.shop_code}'")
@product = Product.where("shop_code='#{Shop.current_shop.shop_code}'")
end
# render json for http status code