diff options
author | Andrés Manelli <andresmanelli@gmail.com> | 2018-04-20 23:52:13 -0300 |
---|---|---|
committer | Andrés Manelli <andresmanelli@gmail.com> | 2018-08-11 00:15:13 +0200 |
commit | f0597ef0c496352cb102d85227a46831a8b04c57 (patch) | |
tree | ef43bd7b39f8bb33f965144f849be1127ecdfd78 /models/cards.js | |
parent | 10aab8a7336ff9a6c313eb34b22771b70b3df5d0 (diff) | |
download | wekan-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.js | 12 |
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({ |