Skip to content

Commit

Permalink
added: filter only active or beta action in list
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriele Panico committed Nov 3, 2023
1 parent 0644682 commit 153ecd2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class CdsAddActionMenuComponent implements OnInit, OnChanges {
type: key,
value: ACTIONS_LIST[key]
};
});
}).filter(el => el.value.status !== 'inactive');
break;
case TYPE_OF_MENU.EVENT:
this.menuItemsList = [];
Expand All @@ -57,7 +57,7 @@ export class CdsAddActionMenuComponent implements OnInit, OnChanges {
type: key,
value: ACTIONS_LIST[key]
};
});
}).filter(el => el.value.status !== 'inactive');
break;
}
}
Expand All @@ -68,7 +68,7 @@ export class CdsAddActionMenuComponent implements OnInit, OnChanges {
type: key,
value: ACTIONS_LIST[key]
};
});
}).filter(el => el.value.status !== 'inactive');;

// console.log('[CDS-ADD-ACTION-MENU] tdsContainerEleHeight (onchanges): ', this.tdsContainerEleHeight);
// this.contentHeight = this.tdsContainerEleHeight - 40;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class CdsPanelActionsComponent implements OnInit {
console.log('cds-panel-actions ngOnChanges:: ', this.pos, this.menuType, this.menuCategory);
switch (this.menuType) {
case TYPE_OF_MENU.ACTION:
this.menuItemsList = Object.values(ACTIONS_LIST).filter(el => el.category === TYPE_ACTION_CATEGORY[this.menuCategory]).map(element => {
this.menuItemsList = Object.values(ACTIONS_LIST).filter(el => (el.category === TYPE_ACTION_CATEGORY[this.menuCategory] && el.status !== 'inactive')).map(element => {
return {
type: TYPE_OF_MENU.ACTION,
value: element
Expand Down
2 changes: 1 addition & 1 deletion src/app/chatbot-design-studio/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export const ACTIONS_LIST: {[key: string]: {name: string, category: TYPE_ACTION_
OPEN_HOURS: { name: 'If Operating Hours', category: TYPE_ACTION_CATEGORY.MOST_USED, type: TYPE_ACTION.OPEN_HOURS, src: "assets/images/actions/open_hours.svg", status: "active", description: 'This action moves the flow to different blocks, based on the operating hours status.<br>During working hours the <b>TRUE block</b> will be triggered.<br>During offline hours the <b>FALSE block</b> will be triggered.<br>One of the two options can be unset. The flow will optionally stop only when a block-populated condition is met.<br>To optionally stop the flow set “Stop on met condition”. To always continue unset the same option.' },
ONLINE_AGENTS: { name: 'If Online Agent', category: TYPE_ACTION_CATEGORY.MOST_USED, type: TYPE_ACTION.ONLINE_AGENTS, src: "assets/images/actions/online_agents.svg", status: "active", description: 'This action moves the flow to different blocks, based on the agents’ availability.<br>If there are agents available the <b>TRUE block</b> will be triggered.<br>If there are no agents available the <b>FALSE block</b> will be triggered.<br>One of the two options can be unset. The flow will optionally stop only when a block-populated condition is met.<br>To optionally stop the flow set “Stop on met condition”. To always continue unset Stop on met condition.' },
JSON_CONDITION: { name: 'Condition', category: TYPE_ACTION_CATEGORY.FLOW, type: TYPE_ACTION.JSON_CONDITION, src: "assets/images/actions/condition.svg", status: "active", },
INTENT : { name: 'Connect block', category: TYPE_ACTION_CATEGORY.FLOW, type: TYPE_ACTION.INTENT, src:"assets/images/actions/connect_intent.svg", status: "active", description: 'This action moves the flow to the specified block.<br> Keep in mind that if there are other actions in the current block actions-pipeline they will be executed too, generating a parallel-execution of all the branches affering to each block triggered through this Connect-block action.'},
INTENT : { name: 'Connect block', category: TYPE_ACTION_CATEGORY.FLOW, type: TYPE_ACTION.INTENT, src:"assets/images/actions/connect_intent.svg", status: "inactive", description: 'This action moves the flow to the specified block.<br> Keep in mind that if there are other actions in the current block actions-pipeline they will be executed too, generating a parallel-execution of all the branches affering to each block triggered through this Connect-block action.'},
ASSIGN_VARIABLE: { name: 'Set attribute', category: TYPE_ACTION_CATEGORY.FLOW, type: TYPE_ACTION.ASSIGN_VARIABLE, src: "assets/images/actions/assign_var.svg", status: "active", },
DELETE_VARIABLE: { name: 'Delete attribute', category: TYPE_ACTION_CATEGORY.FLOW, type: TYPE_ACTION.DELETE_VARIABLE, src: "assets/images/actions/delete_var.svg", status: "active", },
REPLACE_BOT: { name: 'Replace bot', category: TYPE_ACTION_CATEGORY.FLOW, type: TYPE_ACTION.REPLACE_BOT, src: "assets/images/actions/replace_bot.svg", status: "active", description: "Choose a chatbot to replace the current one in the conversation" },
Expand Down

0 comments on commit 153ecd2

Please sign in to comment.