mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-28 21:07:16 +00:00
Search for orders that are finalized
Thus, we display the orders that contains at least one line item (whatever its state) + the finalized orders NB // Finalized state : complete canceled resumed awaiting_return returned
This commit is contained in:
@@ -24,6 +24,7 @@ class SearchOrders
|
||||
|
||||
def search_query
|
||||
base_query = ::Permissions::Order.new(current_user).editable_orders.not_empty
|
||||
.or(::Permissions::Order.new(current_user).editable_orders.finalized)
|
||||
|
||||
return base_query unless params[:shipping_method_id]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user