Module: Controllers::AmazonProductsGrid
- Extended by:
- ActiveSupport::Concern
- Included in:
- Crm::AmazonProductsController, Crm::RetailersController
- Defined in:
- app/concerns/controllers/amazon_products_grid.rb
Overview
ActiveSupport::Concern mixin: amazon products grid.
Shared setup for the Amazon per-item operations grid (buy box, issues,
price, competitive price, freshness). Extracted from
Crm::AmazonProductsController#index so the grid can also be embedded as a
lazy tab on the retailer dashboard (Crm::RetailersController#tab_listings).
The including controller must render the shared
app/views/crm/amazon_products/_grid.html.erb partial with a grid_form_url
local pointing at the route that re-runs the setup (the standalone page, or
the retailer tab action).
Constant Summary collapse
- AMAZON_SELLER_IDS =
Amazon's seller IDs (US and Canada) - same as in AmazonPricingAutomationService
%w[A2R2RITDJNW1Q6 A3DWYIK6Y9EEQB].freeze
- GRID_FILTER_PARAMS =
Query params the grid understands, safe to forward between the standalone
route and the retailer tab. Anything else (host, id, …) must never be
splatted into a redirect or path helper. %i[buy_box suppressed stale state per_page fresh_data q issues].freeze