mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Eager load distributors and cached_incoming_exchanges
This commit is contained in:
committed by
Matt-Yorkley
parent
f0d6cd1f59
commit
3152fef2ef
@@ -16,7 +16,7 @@ module Admin
|
||||
respond_to do |format|
|
||||
format.html do
|
||||
if view_context.subscriptions_setup_complete?(@shops)
|
||||
@order_cycles = OrderCycle.joins(:schedules).managed_by(spree_current_user)
|
||||
@order_cycles = OrderCycle.joins(:schedules).managed_by(spree_current_user).includes([:distributors, :cached_incoming_exchanges])
|
||||
@payment_methods = Spree::PaymentMethod.managed_by(spree_current_user).includes(:taggings)
|
||||
@shipping_methods = Spree::ShippingMethod.managed_by(spree_current_user)
|
||||
else
|
||||
@@ -172,7 +172,7 @@ module Admin
|
||||
includes(:taggings).
|
||||
where(taggings: { taggable_type: "Spree::PaymentMethod",
|
||||
taggable_id: Spree::PaymentMethod.from(Enterprise.managed_by(spree_current_user).
|
||||
select('enterprises.id').find_by_id(params[:enterprise_id])),
|
||||
select('enterprises.id').find_by(id: params[:enterprise_id])),
|
||||
context: 'tags' })
|
||||
|
||||
payment_method_tags.each_with_object({}) do |tag, hash|
|
||||
|
||||
@@ -9,8 +9,12 @@
|
||||
"storybook": "start-storybook"
|
||||
},
|
||||
"jest": {
|
||||
"testRegex": ["spec/javascripts/.*_test\\.js"],
|
||||
"transformIgnorePatterns": ["/node_modules/(?!(stimulus)/)"]
|
||||
"testRegex": [
|
||||
"spec/javascripts/.*_test\\.js"
|
||||
],
|
||||
"transformIgnorePatterns": [
|
||||
"/node_modules/(?!(stimulus)/)"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-controls": "^6.4.13",
|
||||
|
||||
Reference in New Issue
Block a user