mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-10 23:07:47 +00:00
Don't show flashes until everything else is done.
Mario reported that it was showing before the loading spinner had gone. Technically the loading spinner doesn't hide until after the reflex is finished, but hopefully this is close enough.
This commit is contained in:
@@ -39,12 +39,12 @@ class ProductsReflex < ApplicationReflex
|
||||
|
||||
if product_set.save
|
||||
flash[:success] = I18n.t('admin.products_v3.bulk_update.success')
|
||||
broadcast_admin_flashes
|
||||
elsif product_set.errors.present?
|
||||
@error_counts = { saved: product_set.saved_count, invalid: product_set.invalid.count }
|
||||
end
|
||||
|
||||
render_products_form
|
||||
broadcast_admin_flashes if flash.any?
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user