diff --git a/app/javascript/dashboard/components/layout/config/sidebarItems/settings.js b/app/javascript/dashboard/components/layout/config/sidebarItems/settings.js index 577d41c6b..176fd152c 100644 --- a/app/javascript/dashboard/components/layout/config/sidebarItems/settings.js +++ b/app/javascript/dashboard/components/layout/config/sidebarItems/settings.js @@ -69,13 +69,13 @@ const settings = accountId => ({ ), toStateName: 'attributes_list', }, - // { - // icon: 'automation', - // label: 'AUTOMATION', - // hasSubMenu: false, - // toState: frontendURL(`accounts/${accountId}/settings/automation/list`), - // toStateName: 'automation_list', - // }, + { + icon: 'automation', + label: 'AUTOMATION', + hasSubMenu: false, + toState: frontendURL(`accounts/${accountId}/settings/automation/list`), + toStateName: 'automation_list', + }, { icon: 'chat-multiple', label: 'CANNED_RESPONSES', diff --git a/app/javascript/dashboard/components/layout/sidebarComponents/SecondaryNavItem.vue b/app/javascript/dashboard/components/layout/sidebarComponents/SecondaryNavItem.vue index bc4cd3091..3a344d985 100644 --- a/app/javascript/dashboard/components/layout/sidebarComponents/SecondaryNavItem.vue +++ b/app/javascript/dashboard/components/layout/sidebarComponents/SecondaryNavItem.vue @@ -15,6 +15,13 @@ size="14" /> {{ $t(`SIDEBAR.${menuItem.label}`) }} + Beta +
Automation Rules
Automation can replace and automate existing processes that require manual effort. You can do many things with automation, including adding labels and assigning conversation to the best agent. So the team focuses on what they do best and spends more little time on manual tasks.
", @@ -64,7 +64,7 @@ }, "EDIT": { "TITLE": "Edit Automation Rule", - "SUBMIT": "Edit", + "SUBMIT": "Update", "CANCEL_BUTTON_TEXT": "Cancel", "API": { "SUCCESS_MESSAGE": "Automation rule updated successfully", @@ -84,6 +84,12 @@ "DELETE": "Delete", "CANCEL": "Cancel", "RESET_MESSAGE": "Changing event type will reset the conditions and events you have added below" + }, + "CONDITION": { + "DELETE_MESSAGE": "You need to have atleast one condition to save" + }, + "ACTION": { + "DELETE_MESSAGE": "You need to have atleast one action to save" } } } diff --git a/app/javascript/dashboard/routes/dashboard/settings/automation/AddAutomationRule.vue b/app/javascript/dashboard/routes/dashboard/settings/automation/AddAutomationRule.vue index 3f9d2d83e..814e90c25 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/automation/AddAutomationRule.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/automation/AddAutomationRule.vue @@ -351,7 +351,7 @@ export default { getActionDropdownValues(type) { switch (type) { case 'assign_team': - case 'send_message': + case 'send_email_to_team': return this.$store.getters['teams/getTeams']; case 'add_label': return this.$store.getters['labels/getLabels'].map(i => { @@ -365,12 +365,24 @@ export default { } }, appendNewCondition() { - this.automation.conditions.push({ - attribute_key: 'status', - filter_operator: 'equal_to', - values: '', - query_operator: 'and', - }); + switch (this.automation.event_name) { + case 'message_created': + this.automation.conditions.push({ + attribute_key: 'message_type', + filter_operator: 'equal_to', + values: '', + query_operator: 'and', + }); + break; + default: + this.automation.conditions.push({ + attribute_key: 'status', + filter_operator: 'equal_to', + values: '', + query_operator: 'and', + }); + break; + } }, appendNewAction() { this.automation.actions.push({ diff --git a/app/javascript/dashboard/routes/dashboard/settings/automation/EditAutomationRule.vue b/app/javascript/dashboard/routes/dashboard/settings/automation/EditAutomationRule.vue index 223c9577f..fd8d0a492 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/automation/EditAutomationRule.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/automation/EditAutomationRule.vue @@ -121,10 +121,10 @@ variant="clear" @click.prevent="onClose" > - {{ $t('AUTOMATION.ADD.CANCEL_BUTTON_TEXT') }} + {{ $t('AUTOMATION.EDIT.CANCEL_BUTTON_TEXT') }}