diff --git a/admin/app/components/solidus_admin/orders/index/component.rb b/admin/app/components/solidus_admin/orders/index/component.rb index c75436888ae..5c412db937e 100644 --- a/admin/app/components/solidus_admin/orders/index/component.rb +++ b/admin/app/components/solidus_admin/orders/index/component.rb @@ -43,7 +43,7 @@ def scopes def filters [ { - presentation: t('.filters.status'), + label: t('.filters.status'), combinator: 'or', attribute: "state", predicate: "eq", @@ -55,7 +55,7 @@ def filters end }, { - presentation: t('.filters.shipment_state'), + label: t('.filters.shipment_state'), combinator: 'or', attribute: "shipment_state", predicate: "eq", @@ -67,7 +67,7 @@ def filters end }, { - presentation: t('.filters.payment_state'), + label: t('.filters.payment_state'), combinator: 'or', attribute: "payment_state", predicate: "eq", @@ -79,7 +79,7 @@ def filters end }, { - presentation: t('.filters.promotions'), + label: t('.filters.promotions'), combinator: 'or', attribute: "promotions_id", predicate: "in", diff --git a/admin/app/components/solidus_admin/products/index/component.rb b/admin/app/components/solidus_admin/products/index/component.rb index 07363b42824..27b7446c7a0 100644 --- a/admin/app/components/solidus_admin/products/index/component.rb +++ b/admin/app/components/solidus_admin/products/index/component.rb @@ -63,7 +63,7 @@ def scopes def filters Spree::OptionType.all.map do |option_type| { - presentation: option_type.presentation, + label: option_type.presentation, combinator: 'or', attribute: "variants_option_values", predicate: "in", diff --git a/admin/app/components/solidus_admin/promotions/index/component.rb b/admin/app/components/solidus_admin/promotions/index/component.rb index 81c1d5d89c5..b44b5114db3 100644 --- a/admin/app/components/solidus_admin/promotions/index/component.rb +++ b/admin/app/components/solidus_admin/promotions/index/component.rb @@ -50,7 +50,7 @@ def scopes def filters [ { - presentation: Spree::PromotionCategory.model_name.human.pluralize, + label: Spree::PromotionCategory.model_name.human.pluralize, attribute: "promotion_category_id", predicate: "in", options: Spree::PromotionCategory.pluck(:name, :id) diff --git a/admin/app/components/solidus_admin/stock_items/index/component.rb b/admin/app/components/solidus_admin/stock_items/index/component.rb index 11f7fd521d9..2ad4e782dd7 100644 --- a/admin/app/components/solidus_admin/stock_items/index/component.rb +++ b/admin/app/components/solidus_admin/stock_items/index/component.rb @@ -30,7 +30,7 @@ def scopes def filters [ { - presentation: t('.filters.stock_locations'), + label: t('.filters.stock_locations'), combinator: 'or', attribute: "stock_location_id", predicate: "eq", @@ -42,7 +42,7 @@ def filters end }, { - presentation: t('.filters.variants'), + label: t('.filters.variants'), combinator: 'or', attribute: "variant_id", predicate: "eq", diff --git a/admin/app/components/solidus_admin/tax_rates/index/component.rb b/admin/app/components/solidus_admin/tax_rates/index/component.rb index 2c08eea16d8..148d280a682 100644 --- a/admin/app/components/solidus_admin/tax_rates/index/component.rb +++ b/admin/app/components/solidus_admin/tax_rates/index/component.rb @@ -41,13 +41,13 @@ def batch_actions def filters [ { - presentation: Spree::Zone.model_name.human, + label: Spree::Zone.model_name.human, attribute: :zone_id, predicate: :eq, options: Spree::Zone.pluck(:name, :id), }, { - presentation: Spree::TaxCategory.model_name.human, + label: Spree::TaxCategory.model_name.human, attribute: :tax_categories_id, predicate: :in, options: Spree::TaxCategory.pluck(:name, :id), diff --git a/admin/app/components/solidus_admin/ui/table/component.rb b/admin/app/components/solidus_admin/ui/table/component.rb index 59277a9c7e6..7aaed74c3df 100644 --- a/admin/app/components/solidus_admin/ui/table/component.rb +++ b/admin/app/components/solidus_admin/ui/table/component.rb @@ -3,7 +3,7 @@ class SolidusAdmin::UI::Table::Component < SolidusAdmin::BaseComponent BatchAction = Struct.new(:label, :icon, :action, :method, keyword_init: true) # rubocop:disable Lint/StructNewOverride Column = Struct.new(:header, :data, :col, :wrap, keyword_init: true) - Filter = Struct.new(:presentation, :combinator, :attribute, :predicate, :options, keyword_init: true) + Filter = Struct.new(:label, :combinator, :attribute, :predicate, :options, keyword_init: true) Scope = Struct.new(:name, :label, :default, keyword_init: true) Sortable = Struct.new(:url, :param, :animation, :handle, keyword_init: true) private_constant :BatchAction, :Column, :Filter, :Scope, :Sortable @@ -115,7 +115,7 @@ def render_batch_action_button(batch_action) def render_ransack_filter_dropdown(filter, index) render component("ui/table/ransack_filter").new( - presentation: filter.presentation, + presentation: filter.label, search_param: @search.name, combinator: filter.combinator, attribute: filter.attribute, diff --git a/admin/app/components/solidus_admin/users/index/component.rb b/admin/app/components/solidus_admin/users/index/component.rb index 04247c74b66..5b555b0912e 100644 --- a/admin/app/components/solidus_admin/users/index/component.rb +++ b/admin/app/components/solidus_admin/users/index/component.rb @@ -50,7 +50,7 @@ def scopes def filters [ { - presentation: Spree::Role.model_name.human.pluralize, + label: Spree::Role.model_name.human.pluralize, attribute: "spree_roles_id", predicate: "in", options: Spree::Role.pluck(:name, :id)