mirror of
https://github.com/wekan/wekan.git
synced 2026-01-26 03:06:09 +01:00
Refactoring rules description
This commit is contained in:
parent
e649c79bb7
commit
fc73dc5bbc
15 changed files with 270 additions and 69 deletions
|
|
@ -1,15 +1,24 @@
|
|||
BlazeComponent.extendComponent({
|
||||
onCreated() {
|
||||
this.subscribe('allRules');
|
||||
this.subscribe('allTriggers');
|
||||
this.subscribe('allActions');
|
||||
|
||||
},
|
||||
|
||||
trigger(){
|
||||
const rule = Rules.findOne({_id:ruleId});
|
||||
return Triggers.findOne({_id:rule.triggerId});
|
||||
const ruleId = this.data().ruleId;
|
||||
const rule = Rules.findOne({_id: ruleId.get()});
|
||||
const trigger = Triggers.findOne({_id:rule.triggerId});
|
||||
console.log(trigger);
|
||||
return trigger.description();
|
||||
},
|
||||
action(){
|
||||
const rule = Rules.findOne({_id:ruleId});
|
||||
return Triggers.findOne({_id:rule.actionId});
|
||||
const ruleId = this.data().ruleId;
|
||||
const rule = Rules.findOne({_id: ruleId.get()});
|
||||
const action = Actions.findOne({_id:rule.actionId});
|
||||
console.log(action);
|
||||
return action.description();
|
||||
},
|
||||
|
||||
events() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue