change UI for promotions
This commit is contained in:
@@ -43,19 +43,21 @@
|
||||
<td>
|
||||
<% item = MenuItemInstance.find_by_item_instance_code(pro.original_product)%>
|
||||
<% if item.nil? %>
|
||||
<%= Product.find_by_item_code(pro.original_product).name rescue "-" %>
|
||||
<%= Product.find_by_item_code(pro.original_product).name rescue "-" %>
|
||||
<% else %>
|
||||
<%= item.menu_item.name rescue "-" %>
|
||||
- <%= item.item_instance_name rescue "-" %>
|
||||
<%= item.menu_item.name rescue "-" %>
|
||||
- <%= item.item_instance_name rescue "-" %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td style="padding: 2px">
|
||||
<% if Employee.exists?(pro.created_by) %>
|
||||
<%= Employee.find(pro.created_by).name %>
|
||||
<% else %>
|
||||
<%= pro.created_by %>
|
||||
<% end %>
|
||||
</td>
|
||||
<% if Employee.exists?(pro.created_by) %>
|
||||
<td><%= Employee.find(pro.created_by).name %></td>
|
||||
<% else %>
|
||||
<td><%= pro.created_by %></td>
|
||||
<% end %>
|
||||
<td><%= pro.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
|
||||
<td><%= link_to t("views.btn.edit"), edit_settings_promotion_path(pro),:class => 'btn btn-info btn-sm waves-effect' %>
|
||||
<td><%= link_to t("views.btn.edit"), edit_settings_promotion_path(pro),:class => 'btn btn-primary btn-sm waves-effect' %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user