Import board: map team permission, and refactor code to share with card import

This commit is contained in:
Xavier Priour 2015-10-19 20:14:29 +02:00
parent ec304de811
commit 8e0ad91191
2 changed files with 83 additions and 135 deletions

View file

@ -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({