blob: 4c8594d3c08cbc70d5a420d92c88d401956635c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
BlazeComponent.extendComponent({
onCreated() {
},
events() {
return [
{'click .js-add-gen-trigger'(event) {
let datas = this.data();
const actionSelected = this.find('#action').value;
const boardId = Session.get('currentBoard')
if(actionSelected == "created"){
Triggers.insert({activityType: "createCard","boardId":boardId},function(error,id){
datas.triggerIdVar.set(id);
});
}
if(actionSelected == "removed"){
Triggers.insert({activityType: "removeCard","boardId":boardId},function(error,id){
datas.triggerIdVar.set(id);
});
}
},
}];
},
}).register('boardTriggers');
|