mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
Merge pull request #13593 from openfoodfoundation/dependabot/bundler/flipper-1.3.6
Bump flipper from 1.3.0 to 1.3.6
This commit is contained in:
@@ -326,7 +326,7 @@ GEM
|
||||
websocket-driver (>= 0.6, < 0.8)
|
||||
ffaker (2.23.0)
|
||||
ffi (1.16.3)
|
||||
flipper (1.3.0)
|
||||
flipper (1.3.6)
|
||||
concurrent-ruby (< 2)
|
||||
flipper-active_record (1.3.0)
|
||||
activerecord (>= 4.2, < 8)
|
||||
|
||||
@@ -49,7 +49,7 @@ module Admin
|
||||
errors: @importer.errors.full_messages
|
||||
}
|
||||
|
||||
if helpers.feature?(:inventory, spree_current_user.enterprises)
|
||||
if helpers.feature?(:inventory, *spree_current_user.enterprises)
|
||||
json[:results][:inventory_created] = @importer.inventory_created_count
|
||||
json[:results][:inventory_updated] = @importer.inventory_updated_count
|
||||
end
|
||||
@@ -175,7 +175,7 @@ module Admin
|
||||
|
||||
# Return an error if trying to import into inventories when inventory is disable
|
||||
def can_import_into_inventories?
|
||||
return true if helpers.feature?(:inventory, spree_current_user.enterprises) ||
|
||||
return true if helpers.feature?(:inventory, *spree_current_user.enterprises) ||
|
||||
params.dig(:settings, "import_into") != 'inventories'
|
||||
|
||||
redirect_to admin_product_import_url, notice: I18n.t(:product_import_inventory_disable)
|
||||
|
||||
@@ -28,7 +28,7 @@ module Admin
|
||||
show_connected_apps = can?(:manage_connected_apps, enterprise) &&
|
||||
(connected_apps_enabled(enterprise).present? ||
|
||||
dfc_platforms_available?)
|
||||
show_inventory_settings = feature?(:inventory, spree_current_user.enterprises) && is_shop
|
||||
show_inventory_settings = feature?(:inventory, *spree_current_user.enterprises) && is_shop
|
||||
|
||||
show_options = {
|
||||
show_properties:,
|
||||
|
||||
@@ -193,7 +193,7 @@ module ProductImport
|
||||
order('is_primary_producer ASC, name').
|
||||
map { |e| @editable_enterprises[e.name] = e.id }
|
||||
|
||||
return unless OpenFoodNetwork::FeatureToggle.enabled?(:inventory, @current_user.enterprises)
|
||||
return unless OpenFoodNetwork::FeatureToggle.enabled?(:inventory, *@current_user.enterprises)
|
||||
|
||||
@inventory_permissions = permissions.variant_override_enterprises_per_hub
|
||||
end
|
||||
|
||||
@@ -213,7 +213,7 @@ module Spree
|
||||
managed_product_enterprises.include? variant.supplier
|
||||
end
|
||||
|
||||
if OpenFoodNetwork::FeatureToggle.enabled?(:inventory, user.enterprises)
|
||||
if OpenFoodNetwork::FeatureToggle.enabled?(:inventory, *user.enterprises)
|
||||
can [:admin, :index, :read, :update, :bulk_update, :bulk_reset], VariantOverride do |vo|
|
||||
next false unless vo.hub.present? && vo.variant&.supplier.present?
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
%h6= t('admin.product_import.index.choose_import_type')
|
||||
%br
|
||||
- options = { "#{t('admin.product_import.index.product_list')}" => :product_list }
|
||||
- options = options.merge("#{t('admin.product_import.index.inventories')}" => :inventories) if feature?(:inventory, spree_current_user.enterprises)
|
||||
- options = options.merge("#{t('admin.product_import.index.inventories')}" => :inventories) if feature?(:inventory, *spree_current_user.enterprises)
|
||||
= select_tag "settings[import_into]",
|
||||
options_for_select(options),
|
||||
{ "data-controller": "tom-select", class: "primary inline no-search", "ng-model": "settings.import_into" }
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
%i.icon-external-link
|
||||
= t('admin.product_import.index.product_list_template')
|
||||
|
||||
- if feature?(:inventory, spree_current_user.enterprises)
|
||||
- if feature?(:inventory, *spree_current_user.enterprises)
|
||||
%a.download{href: '/inventory_template.csv'}
|
||||
%i.icon-external-link
|
||||
= t('admin.product_import.index.inventory_template')
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
%ul#sub_nav.inline-menu
|
||||
= tab :products, :products_v3, url: admin_products_path
|
||||
= tab :properties
|
||||
= tab :variant_overrides, url: main_app.admin_inventory_path, match_path: '/inventory' if feature?(:inventory, spree_current_user.enterprises)
|
||||
= tab :variant_overrides, url: main_app.admin_inventory_path, match_path: '/inventory' if feature?(:inventory, *spree_current_user.enterprises)
|
||||
= tab :import, url: main_app.admin_product_import_path, match_path: '/product_import'
|
||||
|
||||
Reference in New Issue
Block a user