fixed cashier shift control & license
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<form action="/activate" method="POST" class="row">
|
||||
<%= form_tag activate_path, class: "row" do %>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1">Business Name</label>
|
||||
@@ -41,4 +41,4 @@
|
||||
<div class="col-md-12 text-center">
|
||||
<button type="submit" class="btn btn-primary">Activate</button>
|
||||
</div>
|
||||
</form>
|
||||
<% end %>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user