-
- <% @employees.each do |employee| %>
- <%if employee.role == "manager" %>
-
-
- <%if employee.image_path.present? %>
-
- <%= image_tag employee.image_path, :class => "style_image" %>
-
<%= employee.name%>
-
+ <% @roles.each do |role| %>
+ <%if role != "administrator" %>
+
+ <% @employees.each do |employee| %>
+ <%if employee.role == role %>
+
+
+ <%if employee.image_path.present? %>
+
+ <%= image_tag employee.image_path, :class => "style_image" %>
+
<%= employee.name%>
+
+
+ <% else %>
+
+
person
+
<%= employee.name%>
+
+
+ <% end %>
- <% else %>
-
-
person
-
<%= employee.name%>
-
-
- <% end %>
-
- <% end %>
+ <% end %>
+ <% end %>
+
<% end %>
-
-
- <% @employees.each do |employee| %>
- <%if employee.role == "supervisor" %>
-
-
- <%if employee.image_path.present? %>
-
- <%= image_tag employee.image_path, :class => "style_image" %>
-
<%= employee.name%>
-
-
- <% else %>
-
-
person
-
<%= employee.name%>
-
-
- <% end %>
-
- <% end %>
- <% end %>
-
-
-
- <% @employees.each do |employee| %>
- <%if employee.role == "cashier" %>
-
-
- <%if employee.image_path.present? %>
-
- <%= image_tag employee.image_path, :class => "style_image" %>
-
<%= employee.name%>
-
-
- <% else %>
-
-
person
-
<%= employee.name%>
-
-
- <% end %>
-
- <% end %>
- <% end %>
-
-
-
- <% @employees.each do |employee| %>
- <%if employee.role == "account" %>
-
-
- <%if employee.image_path.present? %>
-
- <%= image_tag employee.image_path, :class => "style_image" %>
-
<%= employee.name%>
-
-
- <% else %>
-
-
person
-
<%= employee.name%>
-
-
- <% end %>
-
- <% end %>
- <% end %>
-
-
-
- <% @employees.each do |employee| %>
- <%if employee.role == "waiter" %>
-
-
- <%if employee.image_path.present? %>
-
- <%= image_tag employee.image_path, :class => "style_image" %>
-
<%= employee.name%>
-
-
- <% else %>
-
-
person
-
<%= employee.name%>
-
-
- <% end %>
-
- <% end %>
- <% end %>
-
+ <% end %>