Sha256: 72638e20e95ba1b9f508b9d8b6a3458d9b6af94cb0a2d883fc2f8587120c3567

Contents?: true

Size: 354 Bytes

Versions: 3

Compression:

Stored size: 354 Bytes

Contents

# frozen_string_literal: true

module SolidusReports
  class Configuration < Spree::Preferences::Configuration
    REPORT_TABS ||= [:reports].freeze

    new_item = Spree::BackendConfiguration::MenuItem.new(
      REPORT_TABS,
      'file',
      condition: -> { can?(:admin, :reports) }
    )
    Spree::Backend::Config.menu_items << new_item
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
solidus_reports-1.2.0 app/models/solidus_reports/configuration.rb
solidus_reports-1.1.0 app/models/solidus_reports/configuration.rb
solidus_reports-1.0.0 app/models/solidus_reports/configuration.rb