listsGroup.js 569 B

12345678910111213
  1. BlazeComponent.extendComponent({
  2. currentCardIsInThisList(listId, swimlaneId) {
  3. const currentCard = Cards.findOne(Session.get('currentCard'));
  4. const currentBoardId = Session.get('currentBoard');
  5. const board = Boards.findOne(currentBoardId);
  6. if (board.view === 'board-view-lists')
  7. return currentCard && currentCard.listId === listId;
  8. else if (board.view === 'board-view-swimlanes')
  9. return currentCard && currentCard.listId === listId && currentCard.swimlaneId === swimlaneId;
  10. else
  11. return false;
  12. },
  13. }).register('listsGroup');