summaryrefslogtreecommitdiffstats
path: root/client/components/rules/actions/boardActions.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/rules/actions/boardActions.js')
-rw-r--r--client/components/rules/actions/boardActions.js32
1 files changed, 32 insertions, 0 deletions
diff --git a/client/components/rules/actions/boardActions.js b/client/components/rules/actions/boardActions.js
new file mode 100644
index 00000000..53325ca0
--- /dev/null
+++ b/client/components/rules/actions/boardActions.js
@@ -0,0 +1,32 @@
+BlazeComponent.extendComponent({
+ onCreated() {
+
+ },
+
+
+
+ events() {
+ return [
+ {'click .js-add-move-action'(event) {
+
+ console.log(this.data());
+ console.log(this.data().triggerIdVar.get());
+ const ruleName = this.data().ruleName.get();
+ const triggerId = this.data().triggerIdVar.get();
+ const actionSelected = this.find('#action').value;
+
+ if(actionSelected == "top"){
+ Actions.insert({actionType: "moveCardToTop"},function(err,id){
+ Rules.insert({title: ruleName, triggerId: triggerId, actionId: id});
+ });
+ }
+ if(actionSelected == "bottom"){
+ Actions.insert({actionType: "moveCardToBottom"},function(err,id){
+ Rules.insert({title: ruleName, triggerId: triggerId, actionId: id});
+ });
+ }
+ },
+ }];
+},
+
+}).register('boardActions'); \ No newline at end of file