fix addorder UI

This commit is contained in:
Zin Moe
2020-03-16 17:54:10 +06:30
parent 2cd816e20f
commit ce6785c70b
11 changed files with 166 additions and 119 deletions

View File

@@ -12,7 +12,7 @@ class BaseFoodcourtController < ActionController::Base
rescue_from CanCan::AccessDenied do |exception|
flash[:warning] = exception.message
# redirect_to origami_root_path
redirect_to origami_dashboard_path
redirect_to foodcourt_food_court_path
end
def check_user

View File

@@ -87,6 +87,14 @@ class Foodcourt::OrdersController < BaseFoodcourtController
@completed, @bookings = Sale.get_foodcourt_current_shift_orders
end
def current_shift_order_count
@current_shift = ShiftSale.current_shift
@pending_sales = Sale.where('shift_sale_id = ? AND sale_status NOT IN (?)', @current_shift.id, status)
@pending_orders = Sale.pending_order('food_court')
@occupied_table = @pending_sales.length + @pending_orders.length
render json: @occupied_table
end
def modify_order
@cashier_type = "food_court"
today = DateTime.now