summaryrefslogtreecommitdiffstats
path: root/models/boards.js
diff options
context:
space:
mode:
Diffstat (limited to 'models/boards.js')
-rw-r--r--models/boards.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/models/boards.js b/models/boards.js
index 594bb7b9..84a715fb 100644
--- a/models/boards.js
+++ b/models/boards.js
@@ -31,6 +31,14 @@ Boards.attachSchema(new SimpleSchema({
}
},
},
+ view: {
+ type: String,
+ autoValue() { // eslint-disable-line consistent-return
+ if (this.isInsert) {
+ return 'board-view-swimlanes';
+ }
+ },
+ },
createdAt: {
type: Date,
autoValue() { // eslint-disable-line consistent-return
@@ -187,6 +195,10 @@ Boards.helpers({
return Lists.find({ boardId: this._id, archived: false }, { sort: { sort: 1 } });
},
+ swimlanes() {
+ return Swimlanes.find({ boardId: this._id, archived: false }, { sort: { sort: 1 } });
+ },
+
hasOvertimeCards(){
const card = Cards.findOne({isOvertime: true, boardId: this._id, archived: false} );
return card !== undefined;