Progress on triggers UI

This commit is contained in:
Angelo Gallarello 2018-08-16 23:37:29 +02:00
parent fda4e954eb
commit 2f24dcfc7d
6 changed files with 100 additions and 87 deletions

View file

@ -1,6 +1,4 @@
RulesHelper = {
executeRules(activity){
const matchingRules = this.findMatchingRules(activity);
console.log(matchingRules);
@ -33,7 +31,7 @@ RulesHelper = {
return matchingRules;
},
buildMatchingFieldsMap(activity, matchingFields){
let matchingMap = {};
let matchingMap = {"activityType":activity.activityType};
for(let i = 0;i< matchingFields.length;i++){
// Creating a matching map with the actual field of the activity
// and with the wildcard (for example: trigger when a card is added

View file

@ -14,7 +14,7 @@ TriggersDef = {
joinMember:{
matchingFields: ["boardId","memberId"]
},
unJoinMember:{
unjoinMember:{
matchingFields: ["boardId","memberId"]
},
addChecklist:{
@ -23,23 +23,36 @@ TriggersDef = {
removeChecklist:{
matchingFields: ["boardId","checklistId"]
},
addChecklistItem:{
completeChecklist:{
matchingFields: ["boardId","checklistId"]
},
uncompleteChecklist:{
matchingFields: ["boardId","checklistId"]
},
addedChecklistItem:{
matchingFields: ["boardId","checklistItemId"]
},
removedChecklistItem:{
matchingFields: ["boardId","checklistItemId"]
},
checkedItem:{
matchingFields: ["boardId","checklistId"]
matchingFields: ["boardId","checklistItemId"]
},
uncheckedItem:{
matchingFields: ["boardId","checklistItemId"]
},
addAttachment:{
matchingFields: ["boardId","checklistId"]
matchingFields: ["boardId"]
},
deleteAttachment:{
matchingFields: ["boardId","checklistItemId"]
matchingFields: ["boardId"]
},
addedLabel:{
matchingFields: ["boardId","labelId"]
},
removedLabel:{
matchingFields: ["boardId","labelId"]
}
}