diff options
author | shoetten <simon@hoetten.org> | 2016-01-29 21:10:22 +0100 |
---|---|---|
committer | shoetten <simon@hoetten.org> | 2016-11-21 15:15:16 +0100 |
commit | 89df0bda9bcdebea2a9129beafe653c38949ab29 (patch) | |
tree | 108ebf80f157f1bca02148f5fa7c329253889caf /models/cards.js | |
parent | 1ad41072010fb59fdbace80a0aa049634074dac1 (diff) | |
download | wekan-89df0bda9bcdebea2a9129beafe653c38949ab29.tar.gz wekan-89df0bda9bcdebea2a9129beafe653c38949ab29.tar.bz2 wekan-89df0bda9bcdebea2a9129beafe653c38949ab29.zip |
Adds start and due date to cards model.
Diffstat (limited to 'models/cards.js')
-rw-r--r-- | models/cards.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/models/cards.js b/models/cards.js index 84fbb6c2..9e7d58c8 100644 --- a/models/cards.js +++ b/models/cards.js @@ -56,6 +56,14 @@ Cards.attachSchema(new SimpleSchema({ type: [String], optional: true, }, + startAt: { + type: Date, + optional: true, + }, + dueAt: { + type: Date, + optional: true, + }, // XXX Should probably be called `authorId`. Is it even needed since we have // the `members` field? userId: { @@ -207,6 +215,22 @@ Cards.mutations({ unsetCover() { return { $unset: { coverId: '' }}; }, + + setStart(startAt) { + return { $set: { startAt }}; + }, + + unsetStart() { + return { $unset: { startAt: '' }}; + }, + + setDue(dueAt) { + return { $set: { dueAt }}; + }, + + unsetDue() { + return { $unset: { dueAt: '' }}; + }, }); if (Meteor.isServer) { |