From 68915c78a5fb75485973a53bfda322f0d57506cd Mon Sep 17 00:00:00 2001 From: Rainer Dema Date: Wed, 20 Sep 2023 13:14:14 +0200 Subject: [PATCH 01/15] Remove order promotions promotion code value from search key Removing "_or_order_promotions_promotion_code_value" from the `order_search_key` preference. This part of the search key was causing exceptions during pagination due to missing columns in the SQLite database. Specifically, the exception was : "ActiveRecord::StatementInvalid (SQLite3::SQLException: no such column: order_promotions_spree_orders.promotion_code_id)". Note: This bug fix will be evaluated in a separate PR. --- admin/lib/solidus_admin/configuration.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/lib/solidus_admin/configuration.rb b/admin/lib/solidus_admin/configuration.rb index 4a745cb7d8c..cdb8fc9ad4b 100644 --- a/admin/lib/solidus_admin/configuration.rb +++ b/admin/lib/solidus_admin/configuration.rb @@ -75,10 +75,10 @@ class Configuration < Spree::Preferences::Configuration # The key that specifies the attributes for searching orders within the admin interface. # This preference controls which attributes of an order are used in search queries. # By default, it is set to - # 'number_shipments_number_or_bill_address_name_or_email_order_promotions_promotion_code_value_cont', - # enabling a search across order number, shipment number, billing address name, email, and promotion code value. + # 'number_or_shipments_number_or_bill_address_name_or_email_cont', + # enabling a search across order number, shipment number, billing address name, email. # @return [String] The search key used to determine order attributes for search. - preference :order_search_key, :string, default: :number_or_shipments_number_or_bill_address_name_or_email_or_order_promotions_promotion_code_value_cont + preference :order_search_key, :string, default: :number_or_shipments_number_or_bill_address_name_or_email_cont # @!attribute [rw] products_per_page # @return [Integer] The number of products to display per page in the admin interface. From 679001cf2e1f31cdbbf922ef11b461c3e0804bb4 Mon Sep 17 00:00:00 2001 From: Rainer Dema Date: Thu, 28 Sep 2023 17:35:15 +0200 Subject: [PATCH 02/15] Include search_param in `ui/table` component The ransack search param can now be dynamically set through the `ui/table` component with a default value of `:q`. --- .../app/components/solidus_admin/ui/table/component.html.erb | 4 ++-- admin/app/components/solidus_admin/ui/table/component.rb | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/admin/app/components/solidus_admin/ui/table/component.html.erb b/admin/app/components/solidus_admin/ui/table/component.html.erb index d391bab0648..fe2d7f758ec 100644 --- a/admin/app/components/solidus_admin/ui/table/component.html.erb +++ b/admin/app/components/solidus_admin/ui/table/component.html.erb @@ -27,8 +27,8 @@