From fda2b7b07349fd20cc70d68bf1544a7f51841f70 Mon Sep 17 00:00:00 2001 From: Alban Peignier Date: Sat, 30 Sep 2017 14:17:28 +0200 Subject: Create DashboardController with STIF implementation. Refs #4655 --- lib/stif/dashboard.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 lib/stif/dashboard.rb (limited to 'lib/stif/dashboard.rb') 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 -- cgit v1.2.3