Class: Impac::Dashboard
- Inherits:
-
BaseResource
- Object
- BaseResource
- Impac::Dashboard
- Defined in:
- app/models/mno_enterprise/impac/dashboard.rb
Instance Method Summary collapse
-
#full_name ⇒ Object
Instance methods ============================================ Return the full name of this dashboard Currently a simple accessor to the dashboard name (used to include the company name).
-
#organizations ⇒ Object
Return all the organizations linked to this dashboard and to which the user has access.
- #sorted_widgets ⇒ Object
- #to_audit_event ⇒ Object
Instance Method Details
#full_name ⇒ Object
Instance methods
Return the full name of this dashboard Currently a simple accessor to the dashboard name (used to include the company name)
15 16 17 |
# File 'app/models/mno_enterprise/impac/dashboard.rb', line 15 def full_name self.name end |
#organizations ⇒ Object
Return all the organizations linked to this dashboard and to which the user has access
21 22 23 24 25 |
# File 'app/models/mno_enterprise/impac/dashboard.rb', line 21 def organizations self.organization_ids.map do |uid| MnoEnterprise::Organization.find_by(uid: uid) end end |
#sorted_widgets ⇒ Object
27 28 29 30 |
# File 'app/models/mno_enterprise/impac/dashboard.rb', line 27 def order = self..map(&:to_i) | self..map{|w| w.id } order.map { |id| self..to_a.find{ |w| w.id == id} }.compact end |
#to_audit_event ⇒ Object
32 33 34 |
# File 'app/models/mno_enterprise/impac/dashboard.rb', line 32 def to_audit_event name end |