feat: Add macros routes and views (#5604)
This commit is contained in:
@@ -5,34 +5,37 @@ const settings = accountId => ({
|
||||
routes: [
|
||||
'agent_bots',
|
||||
'agent_list',
|
||||
'canned_list',
|
||||
'labels_list',
|
||||
'settings_inbox',
|
||||
'attributes_list',
|
||||
'settings_inbox_new',
|
||||
'settings_inbox_list',
|
||||
'settings_inbox_show',
|
||||
'settings_inboxes_page_channel',
|
||||
'settings_inboxes_add_agents',
|
||||
'settings_inbox_finish',
|
||||
'settings_integrations',
|
||||
'settings_integrations_webhook',
|
||||
'settings_integrations_integration',
|
||||
'settings_applications',
|
||||
'settings_integrations_dashboard_apps',
|
||||
'settings_applications_webhook',
|
||||
'settings_applications_integration',
|
||||
'general_settings',
|
||||
'automation_list',
|
||||
'billing_settings_index',
|
||||
'canned_list',
|
||||
'general_settings_index',
|
||||
'general_settings',
|
||||
'labels_list',
|
||||
'macros_edit',
|
||||
'macros_new',
|
||||
'macros_wrapper',
|
||||
'settings_applications_integration',
|
||||
'settings_applications_webhook',
|
||||
'settings_applications',
|
||||
'settings_inbox_finish',
|
||||
'settings_inbox_list',
|
||||
'settings_inbox_new',
|
||||
'settings_inbox_show',
|
||||
'settings_inbox',
|
||||
'settings_inboxes_add_agents',
|
||||
'settings_inboxes_page_channel',
|
||||
'settings_integrations_dashboard_apps',
|
||||
'settings_integrations_integration',
|
||||
'settings_integrations_webhook',
|
||||
'settings_integrations',
|
||||
'settings_teams_add_agents',
|
||||
'settings_teams_edit_finish',
|
||||
'settings_teams_edit_members',
|
||||
'settings_teams_edit',
|
||||
'settings_teams_finish',
|
||||
'settings_teams_list',
|
||||
'settings_teams_new',
|
||||
'settings_teams_add_agents',
|
||||
'settings_teams_finish',
|
||||
'settings_teams_edit',
|
||||
'settings_teams_edit_members',
|
||||
'settings_teams_edit_finish',
|
||||
'billing_settings_index',
|
||||
'automation_list',
|
||||
],
|
||||
menuItems: [
|
||||
{
|
||||
@@ -89,6 +92,15 @@ const settings = accountId => ({
|
||||
toStateName: 'agent_bots',
|
||||
featureFlagKey: 'agent_bots',
|
||||
},
|
||||
{
|
||||
icon: 'flash-settings',
|
||||
label: 'MACROS',
|
||||
hasSubMenu: false,
|
||||
toState: frontendURL(`accounts/${accountId}/settings/macros`),
|
||||
toStateName: 'macros_wrapper',
|
||||
beta: true,
|
||||
featureFlagKey: 'macros',
|
||||
},
|
||||
{
|
||||
icon: 'chat-multiple',
|
||||
label: 'CANNED_RESPONSES',
|
||||
|
||||
@@ -18,6 +18,7 @@ import integrationApps from './integrationApps.json';
|
||||
import integrations from './integrations.json';
|
||||
import labelsMgmt from './labelsMgmt.json';
|
||||
import login from './login.json';
|
||||
import macros from './macros.json';
|
||||
import report from './report.json';
|
||||
import resetPassword from './resetPassword.json';
|
||||
import setNewPassword from './setNewPassword.json';
|
||||
@@ -47,6 +48,7 @@ export default {
|
||||
...integrations,
|
||||
...labelsMgmt,
|
||||
...login,
|
||||
...macros,
|
||||
...report,
|
||||
...resetPassword,
|
||||
...setNewPassword,
|
||||
|
||||
5
app/javascript/dashboard/i18n/locale/en/macros.json
Normal file
5
app/javascript/dashboard/i18n/locale/en/macros.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"MACROS": {
|
||||
"HEADER": "Macros"
|
||||
}
|
||||
}
|
||||
@@ -99,7 +99,11 @@
|
||||
},
|
||||
"AVAILABILITY": {
|
||||
"LABEL": "Availability",
|
||||
"STATUSES_LIST": ["Online", "Busy", "Offline"]
|
||||
"STATUSES_LIST": [
|
||||
"Online",
|
||||
"Busy",
|
||||
"Offline"
|
||||
]
|
||||
},
|
||||
"EMAIL": {
|
||||
"LABEL": "Your email address",
|
||||
@@ -186,6 +190,7 @@
|
||||
"LABELS": "Labels",
|
||||
"CUSTOM_ATTRIBUTES": "Custom Attributes",
|
||||
"AUTOMATION": "Automation",
|
||||
"MACROS": "Macros",
|
||||
"TEAMS": "Teams",
|
||||
"BILLING": "Billing",
|
||||
"CUSTOM_VIEWS_FOLDER": "Folders",
|
||||
@@ -230,7 +235,6 @@
|
||||
"DESCRIPTION": "View your previous invoices, edit your billing details, or cancel your subscription.",
|
||||
"BUTTON_TXT": "Go to the billing portal"
|
||||
},
|
||||
|
||||
"CHAT_WITH_US": {
|
||||
"TITLE": "Need help?",
|
||||
"DESCRIPTION": "Do you face any issues in billing? We are here to help.",
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<template>
|
||||
<div>
|
||||
Macros
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {};
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
@@ -0,0 +1,9 @@
|
||||
<template>
|
||||
<div>MacrosEditor</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {};
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
@@ -0,0 +1,38 @@
|
||||
import SettingsContent from '../Wrapper';
|
||||
import Macros from './Index';
|
||||
const MacroEditor = () => import('./MacroEditor');
|
||||
import { frontendURL } from 'dashboard/helper/URLHelper';
|
||||
|
||||
export default {
|
||||
routes: [
|
||||
{
|
||||
path: frontendURL('accounts/:accountId/settings/macros'),
|
||||
component: SettingsContent,
|
||||
props: {
|
||||
headerTitle: 'MACROS.HEADER',
|
||||
icon: 'flash-settings',
|
||||
showNewButton: false,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'macros_wrapper',
|
||||
component: Macros,
|
||||
roles: ['administrator', 'agent'],
|
||||
},
|
||||
{
|
||||
path: 'new',
|
||||
name: 'macros_new',
|
||||
component: MacroEditor,
|
||||
roles: ['administrator', 'agent'],
|
||||
},
|
||||
{
|
||||
path: ':macroId/edit',
|
||||
name: 'macros_edit',
|
||||
component: MacroEditor,
|
||||
roles: ['administrator', 'agent'],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -11,6 +11,7 @@ import inbox from './inbox/inbox.routes';
|
||||
import integrationapps from './integrationapps/integrations.routes';
|
||||
import integrations from './integrations/integrations.routes';
|
||||
import labels from './labels/labels.routes';
|
||||
import macros from './macros/macros.routes';
|
||||
import profile from './profile/profile.routes';
|
||||
import reports from './reports/reports.routes';
|
||||
import store from '../../../store';
|
||||
@@ -41,6 +42,7 @@ export default {
|
||||
...integrationapps.routes,
|
||||
...integrations.routes,
|
||||
...labels.routes,
|
||||
...macros.routes,
|
||||
...profile.routes,
|
||||
...reports.routes,
|
||||
...teams.routes,
|
||||
|
||||
Reference in New Issue
Block a user