summaryrefslogtreecommitdiffstats
path: root/models/boards.js
diff options
context:
space:
mode:
authorAngelo Gallarello <angelo.gallarell@gmail.com>2018-08-16 16:54:29 +0200
committerAngelo Gallarello <angelo.gallarell@gmail.com>2018-08-16 16:54:29 +0200
commit9c6d374b950e8c4bd0c1c905cf36c953581a3156 (patch)
treeff2667017f5a30931bbef6807dfbff08ac5b2513 /models/boards.js
parent99e7c659072943b80b08564465ee8cb5c90d3905 (diff)
downloadwekan-9c6d374b950e8c4bd0c1c905cf36c953581a3156.tar.gz
wekan-9c6d374b950e8c4bd0c1c905cf36c953581a3156.tar.bz2
wekan-9c6d374b950e8c4bd0c1c905cf36c953581a3156.zip
Labels activities
Diffstat (limited to 'models/boards.js')
-rw-r--r--models/boards.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/models/boards.js b/models/boards.js
index 76a8f704..c77c9de2 100644
--- a/models/boards.js
+++ b/models/boards.js
@@ -254,6 +254,10 @@ Boards.helpers({
return _.findWhere(this.labels, { name, color });
},
+ getLabelById(labelId){
+ return _.findWhere(this.labels, { _id: labelId });
+ },
+
labelIndex(labelId) {
return _.pluck(this.labels, '_id').indexOf(labelId);
},