diff options
Diffstat (limited to 'app/models/dashboard.rb')
| -rw-r--r-- | app/models/dashboard.rb | 12 | 
1 files changed, 12 insertions, 0 deletions
| diff --git a/app/models/dashboard.rb b/app/models/dashboard.rb index 46c621266..bcd92de5a 100644 --- a/app/models/dashboard.rb +++ b/app/models/dashboard.rb @@ -27,4 +27,16 @@ class Dashboard    def current_organisation      context.send(:current_organisation)    end + +  def workbench +    @workbench ||= current_organisation.workbenches.default +  end + +  def workgroup +    workbench.workgroup +  end + +  def calendars +    workgroup.calendars.where('(organisation_id = ? OR shared = ?)', current_organisation.id, true) +  end  end | 
