Class: Avo::SidebarComponent

Inherits:
BaseComponent show all
Defined in:
app/components/avo/sidebar_component.rb

Constant Summary

Constants included from Concerns::FindAssociationField

Concerns::FindAssociationField::ASSOCIATIONS

Instance Method Summary collapse

Methods inherited from BaseComponent

#has_with_trial

Methods included from Concerns::FindAssociationField

#find_association_field

Instance Method Details

#dashboardsObject



7
8
9
10
11
# File 'app/components/avo/sidebar_component.rb', line 7

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

  Avo::Dashboards.dashboard_manager.dashboards_for_navigation
end

#resourcesObject



13
14
15
# File 'app/components/avo/sidebar_component.rb', line 13

def resources
  Avo.resource_manager.resources_for_navigation helpers._current_user
end

#stimulus_targetObject



21
22
23
# File 'app/components/avo/sidebar_component.rb', line 21

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

#toolsObject



17
18
19
# File 'app/components/avo/sidebar_component.rb', line 17

def tools
  Avo.tool_manager.tools_for_navigation
end