From 8b86959f13195e8db75e9bdc7c6b6f4bd7f5cb39 Mon Sep 17 00:00:00 2001 From: Philipp Rothmann Date: Wed, 22 Feb 2023 12:39:28 +0100 Subject: [PATCH] dashboard make show edit current order action more precise --- app/views/shared/_open_orders.html.haml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/views/shared/_open_orders.html.haml b/app/views/shared/_open_orders.html.haml index cef00797..80e4621f 100644 --- a/app/views/shared/_open_orders.html.haml +++ b/app/views/shared/_open_orders.html.haml @@ -9,6 +9,7 @@ %thead %tr %th= heading_helper Order, :name + %th %th= heading_helper Order, :pickup %th= heading_helper Order, :ends %th= t '.who_ordered' @@ -17,21 +18,23 @@ - total = 0 - orders.each do |order| %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_time(order.ends) unless order.ends.nil? - if group_order = order.group_order(ordergroup) - total += group_order.price %td= "#{show_user group_order.updated_by} (#{format_time(group_order.updated_on)})" %td.numeric - = link_to_ordering(order, show: true) do - = number_to_currency(group_order.price) + = number_to_currency(group_order.price) - else %td{:colspan => 2} - if total > 0 %tfooter %tr - %th(colspan="3") + %th(colspan="4") %th= t('.total_sum') + ':' %th.numeric= number_to_currency(total) - else