aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stif/dashboard.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stif/dashboard.rb')
-rw-r--r--lib/stif/dashboard.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/stif/dashboard.rb b/lib/stif/dashboard.rb
new file mode 100644
index 000000000..fafddec62
--- /dev/null
+++ b/lib/stif/dashboard.rb
@@ -0,0 +1,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