diff options
author | Lauri Ojansivu <x@xet7.org> | 2019-11-20 21:10:11 +0200 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2019-11-20 21:10:11 +0200 |
commit | 788dd0a81a06efee165007a92780f9e8c2c754ac (patch) | |
tree | d792bf13b001a1903e03a485bc7577a30afda71d /client/components/lists | |
parent | 82d76e55e5d989d387a85d1e3bb7787355d434af (diff) | |
download | wekan-788dd0a81a06efee165007a92780f9e8c2c754ac.tar.gz wekan-788dd0a81a06efee165007a92780f9e8c2c754ac.tar.bz2 wekan-788dd0a81a06efee165007a92780f9e8c2c754ac.zip |
Fix lint errors.
Diffstat (limited to 'client/components/lists')
-rw-r--r-- | client/components/lists/list.js | 24 | ||||
-rw-r--r-- | client/components/lists/listHeader.js | 20 |
2 files changed, 22 insertions, 22 deletions
diff --git a/client/components/lists/list.js b/client/components/lists/list.js index d97f4404..e58ea430 100644 --- a/client/components/lists/list.js +++ b/client/components/lists/list.js @@ -22,9 +22,9 @@ BlazeComponent.extendComponent({ function userIsMember() { return ( - Meteor.user() && - Meteor.user().isBoardMember() && - !Meteor.user().isCommentOnly() + Meteor.user() + && Meteor.user().isBoardMember() + && !Meteor.user().isCommentOnly() ); } @@ -74,14 +74,14 @@ BlazeComponent.extendComponent({ const currentBoard = Boards.findOne(Session.get('currentBoard')); let swimlaneId = ''; if ( - Utils.boardView() === 'board-view-swimlanes' || - currentBoard.isTemplatesBoard() + Utils.boardView() === 'board-view-swimlanes' + || currentBoard.isTemplatesBoard() ) swimlaneId = Blaze.getData(ui.item.parents('.swimlane').get(0))._id; else if ( - Utils.boardView() === 'board-view-lists' || - Utils.boardView() === 'board-view-cal' || - !Utils.boardView + Utils.boardView() === 'board-view-lists' + || Utils.boardView() === 'board-view-cal' + || !Utils.boardView ) swimlaneId = currentBoard.getDefaultSwimline()._id; @@ -124,12 +124,10 @@ BlazeComponent.extendComponent({ if (currentUser) { showDesktopDragHandles = (currentUser.profile || {}) .showDesktopDragHandles; + } else if (cookies.has('showDesktopDragHandles')) { + showDesktopDragHandles = true; } else { - if (cookies.has('showDesktopDragHandles')) { - showDesktopDragHandles = true; - } else { - showDesktopDragHandles = false; - } + showDesktopDragHandles = false; } if (!Utils.isMiniScreen() && showDesktopDragHandles) { diff --git a/client/components/lists/listHeader.js b/client/components/lists/listHeader.js index 4ef431fb..34322fa9 100644 --- a/client/components/lists/listHeader.js +++ b/client/components/lists/listHeader.js @@ -7,9 +7,9 @@ BlazeComponent.extendComponent({ canSeeAddCard() { const list = Template.currentData(); return ( - !list.getWipLimit('enabled') || - list.getWipLimit('soft') || - !this.reachedWipLimit() + !list.getWipLimit('enabled') + || list.getWipLimit('soft') + || !this.reachedWipLimit() ); }, @@ -47,6 +47,8 @@ BlazeComponent.extendComponent({ const currentUser = Meteor.user(); if (currentUser) { return Meteor.user().getLimitToShowCardsCount(); + } else { + return false; } }, @@ -64,8 +66,8 @@ BlazeComponent.extendComponent({ reachedWipLimit() { const list = Template.currentData(); return ( - list.getWipLimit('enabled') && - list.getWipLimit('value') <= list.cards().count() + list.getWipLimit('enabled') + && list.getWipLimit('value') <= list.cards().count() ); }, @@ -175,8 +177,8 @@ BlazeComponent.extendComponent({ const list = Template.currentData(); if ( - list.getWipLimit('soft') && - list.getWipLimit('value') < list.cards().count() + list.getWipLimit('soft') + && list.getWipLimit('value') < list.cards().count() ) { list.setWipLimit(list.cards().count()); } @@ -187,8 +189,8 @@ BlazeComponent.extendComponent({ const list = Template.currentData(); // Prevent user from using previously stored wipLimit.value if it is less than the current number of cards in the list if ( - !list.getWipLimit('enabled') && - list.getWipLimit('value') < list.cards().count() + !list.getWipLimit('enabled') + && list.getWipLimit('value') < list.cards().count() ) { list.setWipLimit(list.cards().count()); } |