<%= notice %>
| Promotion Code | Start Date | End Date | Start Time | End Time | Promotion Day | Original Product | Created By | Created At | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| <%= link_to pro.promo_code, settings_promotion_path(pro) %> | <%= pro.promo_start_date %> | <%= pro.promo_end_date %> | <%= pro.promo_start_hour.utc.strftime("%I:%M %P") rescue "-" %> | <%= pro.promo_end_hour.utc.strftime("%I:%M %P") rescue "-" %> | <%= pro.promo_day %> | <% item = MenuItemInstance.find_by_item_instance_code(pro.original_product)%> <% if item.nil? %> <%= Product.find_by_item_code(pro.original_product).name rescue "-" %> <% else %> <%= item.menu_item.name rescue "-" %> - <%= item.item_instance_name rescue "-" %> <% end %> | <% if Employee.exists?(pro.created_by) %><%= Employee.find(pro.created_by).name %> | <% else %><%= pro.created_by %> | <% end %><%= pro.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %> | <%= link_to 'Edit', edit_settings_promotion_path(pro) %> | <%= link_to 'Destroy', settings_promotion_path(pro), method: :delete, data: { confirm: 'Are you sure?' } %> |