dashboard make show edit current order action more precise

This commit is contained in:
Philipp Rothmann 2023-02-22 12:39:28 +01:00
parent fead6a1c0d
commit 8b86959f13

View file

@ -9,6 +9,7 @@
%thead %thead
%tr %tr
%th= heading_helper Order, :name %th= heading_helper Order, :name
%th
%th= heading_helper Order, :pickup %th= heading_helper Order, :pickup
%th= heading_helper Order, :ends %th= heading_helper Order, :ends
%th= t '.who_ordered' %th= t '.who_ordered'
@ -17,21 +18,23 @@
- total = 0 - total = 0
- orders.each do |order| - orders.each do |order|
%tr %tr
%td= link_to_ordering(order) %td
= link_to_ordering(order, show: true)
%td
.btn-small= link_to_ordering(order){ t 'ui.edit' }
%td= format_date(order.pickup) unless order.pickup.nil? %td= format_date(order.pickup) unless order.pickup.nil?
%td= format_time(order.ends) unless order.ends.nil? %td= format_time(order.ends) unless order.ends.nil?
- if group_order = order.group_order(ordergroup) - if group_order = order.group_order(ordergroup)
- total += group_order.price - total += group_order.price
%td= "#{show_user group_order.updated_by} (#{format_time(group_order.updated_on)})" %td= "#{show_user group_order.updated_by} (#{format_time(group_order.updated_on)})"
%td.numeric %td.numeric
= link_to_ordering(order, show: true) do
= number_to_currency(group_order.price) = number_to_currency(group_order.price)
- else - else
%td{:colspan => 2} %td{:colspan => 2}
- if total > 0 - if total > 0
%tfooter %tfooter
%tr %tr
%th(colspan="3") %th(colspan="4")
%th= t('.total_sum') + ':' %th= t('.total_sum') + ':'
%th.numeric= number_to_currency(total) %th.numeric= number_to_currency(total)
- else - else