diff options
author | Andrés Manelli <andresmanelli@gmail.com> | 2018-01-22 23:43:47 -0300 |
---|---|---|
committer | Andrés Manelli <andresmanelli@gmail.com> | 2018-01-22 23:43:47 -0300 |
commit | af119ff7c096e6cb077ba40e1eb0df8d3cc09821 (patch) | |
tree | d9b1a37c3da4a89d46fadf76568886c501927a99 /client/components | |
parent | 7b04f14e3c33db0b1c3ecff003262e7689383a15 (diff) | |
download | wekan-af119ff7c096e6cb077ba40e1eb0df8d3cc09821.tar.gz wekan-af119ff7c096e6cb077ba40e1eb0df8d3cc09821.tar.bz2 wekan-af119ff7c096e6cb077ba40e1eb0df8d3cc09821.zip |
Add card on first swimlane found
Diffstat (limited to 'client/components')
-rw-r--r-- | client/components/lists/listBody.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js index 2ca654b2..6cc94371 100644 --- a/client/components/lists/listBody.js +++ b/client/components/lists/listBody.js @@ -36,7 +36,14 @@ BlazeComponent.extendComponent({ const members = formComponent.members.get(); const labelIds = formComponent.labels.get(); - const swimlaneId = this.parentComponent().parentComponent().data()._id; + const boardId = this.data().board()._id; + const board = Boards.findOne(boardId); + let swimlaneId = ''; + if (board.view === 'board-view-swimlanes') + swimlaneId = this.parentComponent().parentComponent().data()._id; + else + swimlaneId = Swimlanes.findOne({boardId})._id; + if (title) { const _id = Cards.insert({ title, |