app/components/solidus_admin/orders/index/component.rb in solidus_admin-0.2.0 vs app/components/solidus_admin/orders/index/component.rb in solidus_admin-0.3.0
- old
+ new
@@ -41,11 +41,11 @@
end
def filters
[
{
- presentation: t('.filters.status'),
+ label: t('.filters.status'),
combinator: 'or',
attribute: "state",
predicate: "eq",
options: Spree::Order.state_machines[:state].states.map do |state|
[
@@ -53,11 +53,11 @@
state.value
]
end
},
{
- presentation: t('.filters.shipment_state'),
+ label: t('.filters.shipment_state'),
combinator: 'or',
attribute: "shipment_state",
predicate: "eq",
options: %i[backorder canceled partial pending ready shipped].map do |option|
[
@@ -65,11 +65,11 @@
option
]
end
},
{
- presentation: t('.filters.payment_state'),
+ label: t('.filters.payment_state'),
combinator: 'or',
attribute: "payment_state",
predicate: "eq",
options: %i[balance_due checkout completed credit_owed invalid paid pending processing void].map do |option|
[
@@ -77,15 +77,15 @@
option
]
end
},
{
- presentation: t('.filters.promotions'),
+ label: t('.filters.store'),
combinator: 'or',
- attribute: "promotions_id",
- predicate: "in",
- options: Spree::Promotion.all.pluck(:name, :id),
- },
+ attribute: "store_id",
+ predicate: "eq",
+ options: Spree::Store.all.pluck(:name, :id)
+ }
]
end
def columns
[