|
1 | 1 | <% num_locations = event.data.storage_locations.length %> |
2 | | -<% event.data.storage_locations.values.each_with_index do |loc, loc_index| %> |
3 | | - <tr style="background-color: #e9e4f3;"> |
4 | | - <% if loc_index == 0 %> |
5 | | - <td rowspan="<%= num_locations %>"><%= event.id %></td> |
6 | | - <td rowspan="<%= num_locations %>">Snapshot</td> |
7 | | - <td rowspan="<%= num_locations %>"></td> |
8 | | - <td rowspan="<%= num_locations %>"><%= event.event_time.to_s %></td> |
| 2 | + |
| 3 | +<tr style="background-color: #e9e4f3;"> |
| 4 | + <td><%= event.user&.name || "No Name Provided" %></td> |
| 5 | + <td>Snapshot</td> |
| 6 | + <td> |
| 7 | + <%= link_to event.eventable_id, event.eventable %> |
| 8 | + <%= link_to( |
| 9 | + events_path(eventable_type: event.eventable_type, eventable_id: event.eventable_id), |
| 10 | + class: 'btn btn-md') do %> |
| 11 | + <i class="fa fa-filter"></i> |
9 | 12 | <% end %> |
10 | | - <td colspan="2"> |
| 13 | + </td> |
| 14 | + <td><%= event.event_time.to_s %></td> |
| 15 | + <td> |
| 16 | + <% event.data.storage_locations.values.each_with_index do |loc, loc_index| %> |
| 17 | + |
11 | 18 | <%= link_to storage_locs.find { |i| i.id == loc.id}.name, storage_location_path(loc.id) %> |
12 | | - <td> |
| 19 | + |
13 | 20 | <% loc.items.values.each do |entry| %> |
14 | 21 | <% item = items.find { |i| i.id == entry.item_id} %> |
15 | 22 | <% if item %> |
16 | 23 | <%= link_to items.find { |i| i.id == entry.item_id}.name, item_path(entry.item_id) %>: |
17 | 24 | <% else %> |
18 | 25 | Item <%= entry.item_id %> (deleted) |
19 | 26 | <% end %> |
20 | | - <%= entry.quantity %><br> |
| 27 | + <%= entry.quantity %> |
21 | 28 | <% end %> |
22 | | - </td> |
23 | | - </tr> |
24 | | -<% end %> |
| 29 | + <br> |
| 30 | + <% end %> |
| 31 | + </td> |
| 32 | + <td> </td> |
| 33 | + <td> </td> |
| 34 | +</tr> |
| 35 | + |
0 commit comments