fix addorder UI
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user