Class: Workarea::Search::AdminLegacyOrders
- Inherits:
-
Object
- Object
- Workarea::Search::AdminLegacyOrders
- Includes:
- AdminIndexSearch, AdminSorting, Pagination, Query
- Defined in:
- app/queries/workarea/search/admin_legacy_orders.rb
Instance Method Summary collapse
- #current_sort ⇒ Object
- #facets ⇒ Object
- #filters ⇒ Object
-
#initialize(params = {}) ⇒ AdminLegacyOrders
constructor
A new instance of AdminLegacyOrders.
Constructor Details
#initialize(params = {}) ⇒ AdminLegacyOrders
Returns a new instance of AdminLegacyOrders.
11 12 13 |
# File 'app/queries/workarea/search/admin_legacy_orders.rb', line 11 def initialize(params = {}) super(params.merge(type: 'legacy_order')) end |
Instance Method Details
#current_sort ⇒ Object
28 29 30 |
# File 'app/queries/workarea/search/admin_legacy_orders.rb', line 28 def current_sort AdminOrders.available_sorts.find(params[:sort]) end |
#facets ⇒ Object
15 16 17 |
# File 'app/queries/workarea/search/admin_legacy_orders.rb', line 15 def facets super + [TermsFacet.new(self, 'order_status')] end |
#filters ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'app/queries/workarea/search/admin_legacy_orders.rb', line 19 def filters [ DateFilter.new(self, 'placed_at', :gte), DateFilter.new(self, 'placed_at', :lte), RangeFilter.new(self, 'total_price', :gte), RangeFilter.new(self, 'total_price', :lt) ] end |