summaryrefslogtreecommitdiffstats
path: root/models/boards.js
diff options
context:
space:
mode:
authorMaxime Quandalle <maxime@quandalle.com>2015-10-20 20:06:26 +0200
committerMaxime Quandalle <maxime@quandalle.com>2015-10-20 20:06:26 +0200
commit7a5f030cc807c6a0a5addd8da59dc853dd4bd426 (patch)
tree784e5197277b8971eced858e1be9efb88b973cfd /models/boards.js
parentf3fc154eb0cf25c46871510a0d4004037188ec15 (diff)
parent118b434a5aad35df8eefea85624ab9abafab56f0 (diff)
downloadwekan-7a5f030cc807c6a0a5addd8da59dc853dd4bd426.tar.gz
wekan-7a5f030cc807c6a0a5addd8da59dc853dd4bd426.tar.bz2
wekan-7a5f030cc807c6a0a5addd8da59dc853dd4bd426.zip
Merge branch 'xavierpriour-devel' into devel
Conflicts: models/import.js
Diffstat (limited to 'models/boards.js')
-rw-r--r--models/boards.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/models/boards.js b/models/boards.js
index 8a9d21e8..4d9fd7c0 100644
--- a/models/boards.js
+++ b/models/boards.js
@@ -111,6 +111,14 @@ Boards.helpers({
colorClass() {
return `board-color-${this.color}`;
},
+
+ // XXX currently mutations return no value so we have an issue when using addLabel in import
+ // XXX waiting on https://github.com/mquandalle/meteor-collection-mutations/issues/1 to remove...
+ pushLabel(name, color) {
+ const _id = Random.id(6);
+ Boards.direct.update(this._id, { $push: {labels: { _id, name, color }}});
+ return _id;
+ },
});
Boards.mutations({