feat: Add the ability to self-assign conversations in macros (#8048)

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
Sojan Jose
2023-10-09 21:08:23 -07:00
committed by GitHub
parent 759a66dd21
commit 6a07251007
5 changed files with 160 additions and 4 deletions

View File

@@ -7,7 +7,7 @@ export default {
case 'send_email_to_team':
return this.teams;
case 'assign_agent':
return this.agents;
return [{ id: 'self', name: 'Self' }, ...this.agents];
case 'add_label':
case 'remove_label':
return this.labels.map(i => {

View File

@@ -37,7 +37,10 @@ describe('webhookMixin', () => {
expect(wrapper.vm.getDropdownValues('assign_team')).toEqual(teams);
expect(wrapper.vm.getDropdownValues('send_email_to_team')).toEqual(teams);
expect(wrapper.vm.getDropdownValues('add_label')).toEqual(resolvedLabels);
expect(wrapper.vm.getDropdownValues('assign_agent')).toEqual(agents);
expect(wrapper.vm.getDropdownValues('assign_agent')).toEqual([
{ id: 'self', name: 'Self' },
...agents,
]);
expect(wrapper.vm.getDropdownValues('change_priority')).toEqual(
PRIORITY_CONDITION_VALUES
);