menu updated | edit qty updated

This commit is contained in:
Nweni
2017-07-01 17:15:12 +06:30
parent 99986b1fb9
commit 5f3708e11d
5 changed files with 43 additions and 13 deletions

View File

@@ -77,7 +77,13 @@ class HomeController < ApplicationController
def route_by_role(employee)
if employee.role == "administrator"
redirect_to dashboard_path
# redirect_to dashboard_path
shift = ShiftSale.current_open_shift(employee.id)
if !shift.nil?
redirect_to origami_root_path
else
redirect_to new_origami_shift_path
end
elsif employee.role == "cashier"
#check if cashier has existing open cashier
shift = ShiftSale.current_open_shift(employee.id)