mirror of
https://github.com/wekan/wekan.git
synced 2026-02-05 16:11:47 +01:00
Link description
This commit is contained in:
parent
5644ef66af
commit
64367a01dd
7 changed files with 50 additions and 19 deletions
|
|
@ -393,6 +393,39 @@ Cards.helpers({
|
|||
isTopLevel() {
|
||||
return this.parentId === '';
|
||||
},
|
||||
|
||||
isImportedCard() {
|
||||
return this.type === 'cardType-importedCard';
|
||||
},
|
||||
|
||||
isImportedBoard() {
|
||||
return this.type === 'cardType-importedBoard';
|
||||
},
|
||||
|
||||
isImported() {
|
||||
return this.isImportedCard() || this.isImportedBoard();
|
||||
},
|
||||
|
||||
getDescription() {
|
||||
if (this.isImportedCard()) {
|
||||
const card = Cards.findOne({_id: this.importedId});
|
||||
if (card && card.description)
|
||||
return card.description;
|
||||
else
|
||||
return null;
|
||||
} else if (this.isImportedBoard()) {
|
||||
const board = Boards.findOne({_id: this.importedId});
|
||||
if (board && board.description)
|
||||
return board.description;
|
||||
else
|
||||
return null;
|
||||
} else {
|
||||
if (this.description)
|
||||
return this.description;
|
||||
else
|
||||
return null;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Cards.mutations({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue