diff options
Diffstat (limited to 'client/components/rules/actions/boardActions.js')
-rw-r--r-- | client/components/rules/actions/boardActions.js | 95 |
1 files changed, 48 insertions, 47 deletions
diff --git a/client/components/rules/actions/boardActions.js b/client/components/rules/actions/boardActions.js index 3eda039f..95771fce 100644 --- a/client/components/rules/actions/boardActions.js +++ b/client/components/rules/actions/boardActions.js @@ -12,34 +12,34 @@ BlazeComponent.extendComponent({ const listTitle = this.find('#listName').value; const boardId = Session.get('currentBoard'); const desc = Utils.getTriggerActionDesc(event, this); - if (actionSelected == "top") { + if (actionSelected === 'top') { const triggerId = Triggers.insert(trigger); const actionId = Actions.insert({ - actionType: "moveCardToTop", - "listTitle": listTitle, - "boardId": boardId, - "desc": desc + actionType: 'moveCardToTop', + listTitle, + boardId, + desc, }); Rules.insert({ title: ruleName, - triggerId: triggerId, - actionId: actionId, - "boardId": boardId + triggerId, + actionId, + boardId, }); } - if (actionSelected == "bottom") { + if (actionSelected === 'bottom') { const triggerId = Triggers.insert(trigger); const actionId = Actions.insert({ - actionType: "moveCardToBottom", - "listTitle": listTitle, - "boardId": boardId, - "desc": desc + actionType: 'moveCardToBottom', + listTitle, + boardId, + desc, }); Rules.insert({ title: ruleName, - triggerId: triggerId, - actionId: actionId, - "boardId": boardId + triggerId, + actionId, + boardId, }); } }, @@ -49,34 +49,34 @@ BlazeComponent.extendComponent({ const ruleName = this.data().ruleName.get(); const trigger = this.data().triggerVar.get(); const actionSelected = this.find('#move-gen-action').value; - if (actionSelected == "top") { + if (actionSelected === 'top') { const triggerId = Triggers.insert(trigger); const actionId = Actions.insert({ - actionType: "moveCardToTop", - "listTitle": "*", - "boardId": boardId, - "desc": desc + actionType: 'moveCardToTop', + 'listTitle': '*', + boardId, + desc, }); Rules.insert({ title: ruleName, - triggerId: triggerId, - actionId: actionId, - "boardId": boardId + triggerId, + actionId, + boardId, }); } - if (actionSelected == "bottom") { + if (actionSelected === 'bottom') { const triggerId = Triggers.insert(trigger); const actionId = Actions.insert({ - actionType: "moveCardToBottom", - "listTitle": "*", - "boardId": boardId, - "desc": desc + actionType: 'moveCardToBottom', + 'listTitle': '*', + boardId, + desc, }); Rules.insert({ title: ruleName, - triggerId: triggerId, - actionId: actionId, - "boardId": boardId + triggerId, + actionId, + boardId, }); } }, @@ -86,36 +86,37 @@ BlazeComponent.extendComponent({ const ruleName = this.data().ruleName.get(); const trigger = this.data().triggerVar.get(); const actionSelected = this.find('#arch-action').value; - if (actionSelected == "archive") { + if (actionSelected === 'archive') { const triggerId = Triggers.insert(trigger); const actionId = Actions.insert({ - actionType: "archive", - "boardId": boardId, - "desc": desc + actionType: 'archive', + boardId, + desc, }); Rules.insert({ title: ruleName, - triggerId: triggerId, - actionId: actionId, - "boardId": boardId + triggerId, + actionId, + boardId, }); } - if (actionSelected == "unarchive") { + if (actionSelected === 'unarchive') { const triggerId = Triggers.insert(trigger); const actionId = Actions.insert({ - actionType: "unarchive", - "boardId": boardId, - "desc": desc + actionType: 'unarchive', + boardId, + desc, }); Rules.insert({ title: ruleName, - triggerId: triggerId, - actionId: actionId, - "boardId": boardId + triggerId, + actionId, + boardId, }); } }, }]; }, -}).register('boardActions');
\ No newline at end of file +}).register('boardActions'); +/* eslint-no-undef */ |