aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stif/dashboard.rb
blob: fafddec628cac42baeb9acdf962d38b5ec9194d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module Stif
  class Dashboard < ::Dashboard
    def workbench
      @workbench ||= current_organisation.workbenches.find_by(name: "Gestion de l'offre")
    end

    def referentials
      @referentials ||= @workbench.all_referentials
    end

    def calendars
      @calendars ||= Calendar.where('organisation_id = ? OR shared = ?', current_organisation.id, true)
    end
  end
end