only display user's classes
This commit is contained in:
parent
08b1b1ef6d
commit
cd8d53c887
@ -104,8 +104,9 @@ Template.main.helpers({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
calendarOptions() {
|
calendarOptions() {
|
||||||
var cursor = work.find({});
|
|
||||||
var events = [];
|
var events = [];
|
||||||
|
userclasses = Meteor.user().profile.classes;
|
||||||
|
var cursor = work.find({class: {$in: userclasses}});
|
||||||
cursor.forEach(function(current) {
|
cursor.forEach(function(current) {
|
||||||
backgroundColor = calendarColors[current.type];
|
backgroundColor = calendarColors[current.type];
|
||||||
title = current.name;
|
title = current.name;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user