food court cashier
This commit is contained in:
@@ -199,13 +199,22 @@ class HomeController < ApplicationController
|
||||
redirect_to dashboard_path
|
||||
end
|
||||
elsif employee.role == "cashier"
|
||||
food_court = Lookup.find_by_lookup_type_and_value("food_court", "1")
|
||||
#check if cashier has existing open cashier
|
||||
shift = ShiftSale.current_open_shift(employee)
|
||||
if !shift.nil?
|
||||
redirect_to origami_dashboard_path
|
||||
# redirect_to origami_root_path
|
||||
if food_court
|
||||
if !shift.nil?
|
||||
redirect_to foodcourt_food_court_path
|
||||
else
|
||||
redirect_to new_foodcourt_shift_path
|
||||
end
|
||||
else
|
||||
redirect_to new_origami_shift_path
|
||||
if !shift.nil?
|
||||
redirect_to origami_dashboard_path
|
||||
# redirect_to origami_root_path
|
||||
else
|
||||
redirect_to new_origami_shift_path
|
||||
end
|
||||
end
|
||||
elsif employee.role == "manager"
|
||||
redirect_to dashboard_path
|
||||
|
||||
Reference in New Issue
Block a user