Potential fix for one of the issues mentioned in #49

Reduces the number of SQL queries used on group_orders/index and
group_orders/archive, but adds extra  complexity to the code
This commit is contained in:
Florian Lentsch 2020-07-12 10:26:36 +02:00 committed by Patrick Gansterer
parent 602f663245
commit 5eb8abf431
7 changed files with 45 additions and 9 deletions

View file

@ -5,9 +5,9 @@
.row-fluid
.span6
%h2= t '.title_open'
= render :partial => "orders", :locals => {:orders => Order.finished_not_closed, :pagination => false}
= render partial: 'orders', locals: {orders: @finished_not_closed_orders_including_group_order, pagination: false}
.span6
%h2= t '.title_closed'
#closed_orders
= render :partial => "orders", :locals => {:orders => @closed_orders, :pagination => true}
= render partial: 'orders', locals: {orders: @closed_orders_including_group_order, pagination: true}