feat(ee): Add support for SLA in automation rules (#8910)

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
This commit is contained in:
Vishnu Narayanan
2024-02-22 12:18:55 +05:30
committed by Shivam Mishra
co-authored by Sivin Varghese
parent 2ad9cd2055
commit 6a1eb799a4
9 changed files with 125 additions and 6 deletions
@@ -129,7 +129,13 @@ export const agentList = agents => [
...(agents || []),
];
export const getActionOptions = ({ agents, teams, labels, type }) => {
export const getActionOptions = ({
agents,
teams,
labels,
slaPolicies,
type,
}) => {
const actionsMap = {
assign_agent: agentList(agents),
assign_team: teams,
@@ -137,6 +143,7 @@ export const getActionOptions = ({ agents, teams, labels, type }) => {
add_label: generateConditionOptions(labels, 'title'),
remove_label: generateConditionOptions(labels, 'title'),
change_priority: PRIORITY_CONDITION_VALUES,
add_sla: slaPolicies,
};
return actionsMap[type];
};