mirror of
https://github.com/wekan/wekan.git
synced 2026-02-02 06:31:47 +01:00
Refactoring rules description
This commit is contained in:
parent
e649c79bb7
commit
fc73dc5bbc
15 changed files with 270 additions and 69 deletions
|
|
@ -17,7 +17,6 @@ BlazeComponent.extendComponent({
|
|||
if(actionSelected == "top"){
|
||||
const triggerId = Triggers.insert(trigger);
|
||||
const actionId = Actions.insert({actionType: "moveCardToTop","listTitle":listTitle,"boardId":boardId});
|
||||
console.log("Action inserted");
|
||||
Rules.insert({title: ruleName, triggerId: triggerId, actionId: actionId,"boardId":boardId});
|
||||
}
|
||||
if(actionSelected == "bottom"){
|
||||
|
|
@ -49,12 +48,12 @@ BlazeComponent.extendComponent({
|
|||
const actionSelected = this.find('#arch-action').value;
|
||||
if(actionSelected == "archive"){
|
||||
const triggerId = Triggers.insert(trigger);
|
||||
const actionId = Actions.insert({actionType: "archive"});
|
||||
const actionId = Actions.insert({actionType: "archive","boardId":boardId});
|
||||
Rules.insert({title: ruleName, triggerId: triggerId, actionId: actionId,"boardId":boardId});
|
||||
}
|
||||
if(actionSelected == "unarchive"){
|
||||
const triggerId = Triggers.insert(trigger);
|
||||
const actionId = Actions.insert({actionType: "unarchive"});
|
||||
const actionId = Actions.insert({actionType: "unarchive","boardId":boardId});
|
||||
Rules.insert({title: ruleName, triggerId: triggerId, actionId: actionId,"boardId":boardId});
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ BlazeComponent.extendComponent({
|
|||
|
||||
labels(){
|
||||
const labels = Boards.findOne(Session.get('currentBoard')).labels;
|
||||
console.log(labels);
|
||||
for(let i = 0;i<labels.length;i++){
|
||||
if(labels[i].name == "" || labels[i].name == undefined){
|
||||
labels[i].name = labels[i].color.toUpperCase();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue