Can show card on event click

reviewable/pr1752/r1
Nicu Tofan 7 years ago
parent 3c4549fe64
commit 374e986579
No known key found for this signature in database
GPG Key ID: 7EE66E95E64FD0B7
  1. 4
      client/components/boards/boardBody.jade
  2. 24
      client/components/boards/boardBody.js

@ -29,7 +29,7 @@ template(name="boardBody")
+calendarView
template(name="calendarView")
.swimlane.list-group.js-lists
.calendar-view.swimlane
if currentCard
+cardDetails(currentCard)
+fullcalendar
+fullcalendar(calendarOptions)

@ -150,4 +150,28 @@ BlazeComponent.extendComponent({
onRendered() {
},
calendarOptions() {
return {
id: 'calendar-view',
defaultView: 'basicWeek',
events(start, end, timezone, callback) {
const currentBoard = Boards.findOne(Session.get('currentBoard'));
const events = [];
currentBoard.cardsInInterval(start.toDate(), end.toDate()).forEach(function(card){
events.push({
id: card.id,
title: card.title,
start: card.startAt,
end: card.endAt,
url: FlowRouter.url('card', {
boardId: currentBoard._id,
slug: currentBoard.slug,
cardId: card._id,
}),
});
});
callback(events);
},
};
},
}).register('calendarView');

Loading…
Cancel
Save