summaryrefslogtreecommitdiffstats
path: root/models/cards.js
diff options
context:
space:
mode:
authorAndrés Manelli <andresmanelli@gmail.com>2018-04-20 23:52:13 -0300
committerAndrés Manelli <andresmanelli@gmail.com>2018-08-11 00:15:13 +0200
commitf0597ef0c496352cb102d85227a46831a8b04c57 (patch)
treeef43bd7b39f8bb33f965144f849be1127ecdfd78 /models/cards.js
parent10aab8a7336ff9a6c313eb34b22771b70b3df5d0 (diff)
downloadwekan-f0597ef0c496352cb102d85227a46831a8b04c57.tar.gz
wekan-f0597ef0c496352cb102d85227a46831a8b04c57.tar.bz2
wekan-f0597ef0c496352cb102d85227a46831a8b04c57.zip
Indicate board or card through icons. Indicate if archived
Diffstat (limited to 'models/cards.js')
-rw-r--r--models/cards.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/models/cards.js b/models/cards.js
index 8e1ffcaa..987ce330 100644
--- a/models/cards.js
+++ b/models/cards.js
@@ -721,6 +721,18 @@ Cards.helpers({
);
}
},
+
+ getArchived() {
+ if (this.isImportedCard()) {
+ const card = Cards.findOne({ _id: this.importedId });
+ return card.archived;
+ } else if (this.isImportedBoard()) {
+ const board = Boards.findOne({ _id: this.importedId});
+ return board.archived;
+ } else {
+ return this.archived;
+ }
+ },
});
Cards.mutations({