1
0

Changed indexing from q_name -> q in compute

This commit is contained in:
cryptogopher
2020-03-24 21:59:57 +01:00
parent cfe225c014
commit 6919f9910c
3 changed files with 25 additions and 26 deletions

View File

@@ -50,9 +50,9 @@
onclick="$(this).closest('tr').prev('tr.primary').toggle(); $(this).closest('tr').prev('tr.primary').nextUntil('tr.primary', '.ingredient').toggle(); return false;">
<span class="icon icon-bullet-open"><%= i.name %></span>
</td>
<% @requested_n[index].each do |q_name, value| %>
<% @requested_n[index].each do |q, value| %>
<td class="primary quantity ellipsible">
<%= q_name %>
<%= q.name %>
<p class="value"><%= format_value(value) %></p>
</td>
<% end %>
@@ -62,9 +62,9 @@
<% next unless @quantities.length > 0 %>
<% @extra_n[index].each_slice(@quantities.length) do |values| %>
<tr class="extra <%= row_class %>" style="display:none">
<% values.each do |q_name, value| %>
<% values.each do |q, value| %>
<td class="extra quantity ellipsible">
<%= q_name %>
<%= q.name if value %>
<p class="value"><%= format_value(value) %></p>
</td>
<% end %>

View File

@@ -49,9 +49,9 @@
onclick="$(this).closest('tr').prev('tr.primary').toggle(); $(this).closest('tr').prev('tr.primary').nextUntil('tr.primary', '.measurement').toggle(); return false;">
<span class="icon icon-bullet-open"><%= format_datetime(m) %></span>
</td>
<% @requested_r[index].each do |q_name, value| %>
<% @requested_r[index].each do |q, value| %>
<td class="primary quantity ellipsible">
<%= q_name %>
<%= q.name %>
<p class="value"><%= format_value(value) %></p>
</td>
<% end %>
@@ -61,9 +61,9 @@
<% next unless @quantities.length > 0 %>
<% @extra_r[index].each_slice(@quantities.length).with_index do |values| %>
<tr class="extra <%= row_class %>" style="display:none">
<% values.each do |q_name, value| %>
<% values.each do |q, value| %>
<td class="extra quantity ellipsible">
<%= q_name %>
<%= q.name if value %>
<p class="value"><%= format_value(value) %></p>
</td>
<% end %>