show custom fields on cards but still with dummy value

This commit is contained in:
Pouyan Savoli 2017-09-05 02:34:18 +02:00
parent 733b14dcd8
commit 6ff89b43b6
5 changed files with 89 additions and 30 deletions

View file

@ -190,6 +190,27 @@ Cards.helpers({
return _.pluck(this.customFields, '_id').indexOf(customFieldId);
},
// customFields with definitions
customFieldsWD() {
// get all definitions
const definitions = CustomFields.find({
boardId: this.boardId,
}).fetch();
// match right definition to each field
return this.customFields.map((customField) => {
return {
_id: customField._id,
value: customField.value,
definition: definitions.find((definition) => {
return definition._id == customField._id;
})
}
});
},
absoluteUrl() {
const board = this.board();
return FlowRouter.url('card', {