fixed cashier shift control & license

This commit is contained in:
NyanLinHtut
2020-06-23 11:36:10 +06:30
parent 276e437a07
commit e7ac530314
2 changed files with 15 additions and 5 deletions

View File

@@ -51,8 +51,18 @@
<% end %>
<% if can? :index, :home %>
<% if current_login_employee.role != "kitchen" %>
<% if current_user.role == "cashier"
shift = ShiftSale.current_open_shift(current_user.id)
if !shift.nil?
path = origami_dashboard_path
else
path = new_origami_shift_path
end
else current_user.role == "administrator"
path = origami_dashboard_path
end %>
<li class="menu-up">
<a href="<%= origami_dashboard_path %>">
<a href="<%= path %>">
<i class="material-icons">monetization_on</i>
<span><%= t :origami %></span>
</a>