diff options
Diffstat (limited to 'client/components')
-rw-r--r-- | client/components/activities/activities.jade | 6 | ||||
-rw-r--r-- | client/components/activities/activities.js | 18 |
2 files changed, 24 insertions, 0 deletions
diff --git a/client/components/activities/activities.jade b/client/components/activities/activities.jade index bddc4dad..949400f6 100644 --- a/client/components/activities/activities.jade +++ b/client/components/activities/activities.jade @@ -114,6 +114,12 @@ template(name="boardActivities") if($eq activityType 'removedLabel') | {{{_ 'activity-removed-label' lastLabel cardLink}}}. + if($eq activityType 'setCustomField') + | {{{_ 'activity-set-customfield' lastCustomField lastCustomFieldValue cardLink}}}. + + if($eq activityType 'unsetCustomField') + | {{{_ 'activity-unset-customfield' lastCustomField cardLink}}}. + if($eq activityType 'unjoinMember') if($eq user._id member._id) | {{{_ 'activity-unjoined' cardLink}}}. diff --git a/client/components/activities/activities.js b/client/components/activities/activities.js index b3fe8f50..81995221 100644 --- a/client/components/activities/activities.js +++ b/client/components/activities/activities.js @@ -82,6 +82,24 @@ BlazeComponent.extendComponent({ } }, + lastCustomField(){ + const lastCustomField = CustomFields.findOne(this.currentData().customFieldId); + return lastCustomField.name; + }, + + lastCustomFieldValue(){ + const lastCustomField = CustomFields.findOne(this.currentData().customFieldId); + const value = this.currentData().value; + if (lastCustomField.settings.dropdownItems && lastCustomField.settings.dropdownItems.length > 0) { + const dropDownValue = _.find(lastCustomField.settings.dropdownItems, (item) => { + return item._id === value; + }); + if (dropDownValue) + return dropDownValue.name; + } + return value; + }, + listLabel() { return this.currentData().list().title; }, |