mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-02 21:57:17 +00:00
Controllers provide current order cycle for product splitting
This commit is contained in:
@@ -2,9 +2,10 @@ require 'open_food_web/split_products_by_distribution'
|
||||
|
||||
Spree::HomeController.class_eval do
|
||||
include EnterprisesHelper
|
||||
include OrderCyclesHelper
|
||||
include OpenFoodWeb::SplitProductsByDistribution
|
||||
|
||||
respond_override :index => { :html => { :success => lambda {
|
||||
@products, @products_local, @products_remote = split_products_by_distribution @products, current_distributor
|
||||
@products, @products_local, @products_remote = split_products_by_distribution @products, current_distributor, current_order_cycle
|
||||
} } }
|
||||
end
|
||||
|
||||
@@ -2,10 +2,11 @@ require 'open_food_web/split_products_by_distribution'
|
||||
|
||||
Spree::ProductsController.class_eval do
|
||||
include EnterprisesHelper
|
||||
include OrderCyclesHelper
|
||||
include OpenFoodWeb::SplitProductsByDistribution
|
||||
|
||||
respond_override :index => { :html => { :success => lambda {
|
||||
@products, @products_local, @products_remote = split_products_by_distribution @products, current_distributor
|
||||
@products, @products_local, @products_remote = split_products_by_distribution @products, current_distributor, current_order_cycle
|
||||
} } }
|
||||
|
||||
end
|
||||
|
||||
@@ -2,9 +2,10 @@ require 'open_food_web/split_products_by_distribution'
|
||||
|
||||
Spree::TaxonsController.class_eval do
|
||||
include EnterprisesHelper
|
||||
include OrderCyclesHelper
|
||||
include OpenFoodWeb::SplitProductsByDistribution
|
||||
|
||||
respond_override :show => { :html => { :success => lambda {
|
||||
@products, @products_local, @products_remote = split_products_by_distribution @products, current_distributor
|
||||
@products, @products_local, @products_remote = split_products_by_distribution @products, current_distributor, current_order_cycle
|
||||
} } }
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user