Sha256: d535c7d10d6c31ab275a4c168e2671e908459f5379c1a8eb4fe254496d343d68

Contents?: true

Size: 544 Bytes

Versions: 10

Compression:

Stored size: 544 Bytes

Contents

# frozen_string_literal: true

class Avo::SidebarComponent < Avo::BaseComponent
  prop :sidebar_open, default: false
  prop :for_mobile, default: false

  def dashboards
    return [] unless Avo.plugin_manager.installed?(:avo_dashboards)

    Avo::Dashboards.dashboard_manager.dashboards_for_navigation
  end

  def resources
    Avo.resource_manager.resources_for_navigation helpers._current_user
  end

  def tools
    Avo.tool_manager.tools_for_navigation
  end

  def stimulus_target
    @for_mobile ? "mobileSidebar" : "sidebar"
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
avo-3.15.1 app/components/avo/sidebar_component.rb
avo-3.15.0 app/components/avo/sidebar_component.rb
avo-3.14.5 app/components/avo/sidebar_component.rb
avo-3.14.4 app/components/avo/sidebar_component.rb
avo-3.14.3 app/components/avo/sidebar_component.rb
avo-3.14.2 app/components/avo/sidebar_component.rb
avo-3.14.1 app/components/avo/sidebar_component.rb
avo-3.14.0 app/components/avo/sidebar_component.rb
avo-3.13.7 app/components/avo/sidebar_component.rb
avo-3.13.6 app/components/avo/sidebar_component.rb