feat: Add automation route (#3410)

This commit is contained in:
Muhsin Keloth 2021-11-18 14:09:55 +05:30 committed by GitHub
parent b81a9f2010
commit c2b4991fd8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 59 additions and 0 deletions

View file

@ -0,0 +1,6 @@
{
"AUTOMATION": {
"HEADER": "Automation",
"HEADER_BTN_TXT": "Add Automation Rule"
}
}

View file

@ -18,6 +18,7 @@ import { default as _setNewPassword } from './setNewPassword.json';
import { default as _settings } from './settings.json'; import { default as _settings } from './settings.json';
import { default as _signup } from './signup.json'; import { default as _signup } from './signup.json';
import { default as _teamsSettings } from './teamsSettings.json'; import { default as _teamsSettings } from './teamsSettings.json';
import { default as _automation } from './automation.json';
export default { export default {
..._agentMgmt, ..._agentMgmt,
@ -40,4 +41,5 @@ export default {
..._settings, ..._settings,
..._signup, ..._signup,
..._teamsSettings, ..._teamsSettings,
..._automation,
}; };

View file

@ -140,6 +140,7 @@
"APPLICATIONS": "Applications", "APPLICATIONS": "Applications",
"LABELS": "Labels", "LABELS": "Labels",
"CUSTOM_ATTRIBUTES": "Custom Attributes", "CUSTOM_ATTRIBUTES": "Custom Attributes",
"AUTOMATION": "Automation",
"TEAMS": "Teams", "TEAMS": "Teams",
"ALL_CONTACTS": "All Contacts", "ALL_CONTACTS": "All Contacts",
"TAGGED_WITH": "Tagged with", "TAGGED_WITH": "Tagged with",

View file

@ -28,6 +28,7 @@ const settings = accountId => ({
'settings_teams_edit', 'settings_teams_edit',
'settings_teams_edit_members', 'settings_teams_edit_members',
'settings_teams_edit_finish', 'settings_teams_edit_finish',
'automation_list',
], ],
menuItems: { menuItems: {
back: { back: {
@ -74,6 +75,13 @@ const settings = accountId => ({
), ),
toStateName: 'attributes_list', toStateName: 'attributes_list',
}, },
automation: {
icon: 'ion-wrench',
label: 'AUTOMATION',
hasSubMenu: false,
toState: frontendURL(`accounts/${accountId}/settings/automation/list`),
toStateName: 'automation_list',
},
cannedResponses: { cannedResponses: {
icon: 'ion-chatbox-working', icon: 'ion-chatbox-working',
label: 'CANNED_RESPONSES', label: 'CANNED_RESPONSES',

View file

@ -0,0 +1,12 @@
<template>
<div class="column content-box">
<woot-button
color-scheme="success"
class-names="button--fixed-right-top"
icon="ion-android-add-circle"
>
{{ $t('AUTOMATION.HEADER_BTN_TXT') }}
</woot-button>
</div>
</template>
<script>

View file

@ -0,0 +1,30 @@
import SettingsContent from '../Wrapper';
import Automation from './Index';
import { frontendURL } from '../../../../helper/URLHelper';
export default {
routes: [
{
path: frontendURL('accounts/:accountId/settings/automation'),
component: SettingsContent,
props: {
headerTitle: 'AUTOMATION.HEADER',
icon: 'ion-wrench',
showNewButton: false,
},
children: [
{
path: '',
name: 'automation_wrapper',
redirect: 'list',
},
{
path: 'list',
name: 'automation_list',
component: Automation,
roles: ['administrator'],
},
],
},
],
};