mirror of
https://github.com/wekan/wekan.git
synced 2026-03-06 05:40:16 +01:00
Almost full circle
This commit is contained in:
parent
93cc7f0232
commit
9b0eb0a9f1
24 changed files with 492 additions and 165 deletions
32
client/components/rules/actions/boardActions.js
Normal file
32
client/components/rules/actions/boardActions.js
Normal file
|
|
@ -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');
|
||||
Loading…
Add table
Add a link
Reference in a new issue