Sort orders by last name, then first name i.e. the same way bulk order management works

This commit is contained in:
Cillian O'Ruanaidh
2023-07-28 14:20:29 +01:00
parent 774bb7a607
commit 276b94de5b
5 changed files with 20 additions and 11 deletions

View File

@@ -14,7 +14,7 @@
%th
= t(:products_distributor)
- columns = ['completed_at', 'number', 'state', 'payment_state', 'shipment_state', 'email', 'bill_address_lastname', 'total']
- columns = ['completed_at', 'number', 'state', 'payment_state', 'shipment_state', 'email', 'billing_address_name', 'total']
= render partial: "spree/admin/shared/stimulus_sortable_header", collection: columns, as: :column,
locals: { sorted: params.dig(:q, :s), default: "completed_at desc" }

View File

@@ -33,7 +33,7 @@
%a{ href: "mailto:#{order.email}", target: "_blank" }
= order.email
%td
= order.bill_address.full_name
= order.bill_address.full_name_for_sorting
%td.align-center
%span
= order.display_total