aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stif
diff options
context:
space:
mode:
authorcedricnjanga2018-01-24 19:55:56 -0800
committercedricnjanga2018-01-24 19:55:56 -0800
commitf32d869cc3f34a939764cc3fa4d612a5d6544d08 (patch)
tree87d5a6b4f589a39e038451e3dd6290ba975f7986 /lib/stif
parent0f59b9c1d0133393f68194a366aafc27ca23392b (diff)
downloadchouette-core-f32d869cc3f34a939764cc3fa4d612a5d6544d08.tar.bz2
update calendar build_links for table builder
Diffstat (limited to 'lib/stif')
-rw-r--r--lib/stif/dashboard.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/stif/dashboard.rb b/lib/stif/dashboard.rb
index 7dd83efbc..46c635091 100644
--- a/lib/stif/dashboard.rb
+++ b/lib/stif/dashboard.rb
@@ -4,12 +4,16 @@ module Stif
@workbench ||= current_organisation.workbenches.find_by(name: "Gestion de l'offre")
end
+ def workgroup
+ workbench.workgroup
+ end
+
def referentials
@referentials ||= self.workbench.all_referentials
end
def calendars
- @calendars ||= Calendar.where('workgroup_id = ? OR shared = ?', @workbench.workgroup_id, true)
+ @calendars ||= Calendar.where('(organisation_id = ? OR shared = ?) AND workgroup_id = ?', current_organisation.id, true, workgroup.id)
end
end
end