diff options
Diffstat (limited to 'client/components/rules/triggers/boardTriggers.js')
-rw-r--r-- | client/components/rules/triggers/boardTriggers.js | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/client/components/rules/triggers/boardTriggers.js b/client/components/rules/triggers/boardTriggers.js index dcc1c187..067c1df8 100644 --- a/client/components/rules/triggers/boardTriggers.js +++ b/client/components/rules/triggers/boardTriggers.js @@ -6,51 +6,56 @@ BlazeComponent.extendComponent({ events() { return [ {'click .js-add-gen-trigger'(event) { - + const desc = Utils.getTriggerActionDesc(event,this); let datas = this.data(); const actionSelected = this.find('#gen-action').value; const boardId = Session.get('currentBoard') if(actionSelected == "created"){ - datas.triggerVar.set({activityType: "createCard","boardId":boardId,"listName":"*"}); + datas.triggerVar.set({activityType: "createCard","boardId":boardId,"listName":"*","desc":desc}); } if(actionSelected == "removed"){ - datas.triggerVar.set({activityType: "removeCard","boardId":boardId}); + datas.triggerVar.set({activityType: "removeCard","boardId":boardId,"desc":desc}); } + + }, 'click .js-add-create-trigger'(event) { - + const desc = Utils.getTriggerActionDesc(event,this); let datas = this.data(); const actionSelected = this.find('#create-action').value; const listName = this.find('#create-list-name').value; const boardId = Session.get('currentBoard') if(actionSelected == "created"){ - datas.triggerVar.set({activityType: "createCard","boardId":boardId,"listName":listName}); + datas.triggerVar.set({activityType: "createCard","boardId":boardId,"listName":listName,"desc":desc}); } if(actionSelected == "removed"){ - datas.triggerVar.set({activityType: "removeCard","boardId":boardId,"listName":listName}); + datas.triggerVar.set({activityType: "removeCard","boardId":boardId,"listName":listName,"desc":desc}); } }, 'click .js-add-moved-trigger'(event) { let datas = this.data(); + const desc = Utils.getTriggerActionDesc(event,this); + const actionSelected = this.find('#move-action').value; const listName = this.find('#move-list-name').value; const boardId = Session.get('currentBoard') if(actionSelected == "moved-to"){ - datas.triggerVar.set({activityType: "moveCard","boardId":boardId,"listName":listName,"oldListName":"*"}); + datas.triggerVar.set({activityType: "moveCard","boardId":boardId,"listName":listName,"oldListName":"*","desc":desc}); } if(actionSelected == "moved-from"){ - datas.triggerVar.set({activityType: "moveCard","boardId":boardId,"listName":"*","oldListName":listName}); + datas.triggerVar.set({activityType: "moveCard","boardId":boardId,"listName":"*","oldListName":listName,"desc":desc}); } }, 'click .js-add-arc-trigger'(event) { let datas = this.data(); + const desc = Utils.getTriggerActionDesc(event,this); const actionSelected = this.find('#arch-action').value; const boardId = Session.get('currentBoard') if(actionSelected == "archived"){ - datas.triggerVar.set({activityType: "archivedCard","boardId":boardId}); + datas.triggerVar.set({activityType: "archivedCard","boardId":boardId,"desc":desc}); } if(actionSelected == "unarchived"){ - datas.triggerVar.set({activityType: "restoredCard","boardId":boardId}); + datas.triggerVar.set({activityType: "restoredCard","boardId":boardId,"desc":desc}); } } |