diff --git a/app/javascript/dashboard/helper/featureHelper.js b/app/javascript/dashboard/helper/featureHelper.js index c3dd3d880..a7fa21616 100644 --- a/app/javascript/dashboard/helper/featureHelper.js +++ b/app/javascript/dashboard/helper/featureHelper.js @@ -11,6 +11,7 @@ const FEATURE_HELP_URLS = { help_center: 'https://chwt.app/hc/help-center', integrations: 'https://chwt.app/hc/integrations', labels: 'https://chwt.app/hc/labels', + macros: 'https://chwt.app/hc/macros', message_reply_to: 'https://chwt.app/hc/reply-to', reports: 'https://chwt.app/hc/reports', sla: 'https://chwt.app/hc/sla', diff --git a/app/javascript/dashboard/i18n/locale/en/macros.json b/app/javascript/dashboard/i18n/locale/en/macros.json index 246d60c26..559c680ff 100644 --- a/app/javascript/dashboard/i18n/locale/en/macros.json +++ b/app/javascript/dashboard/i18n/locale/en/macros.json @@ -1,10 +1,11 @@ { "MACROS": { "HEADER": "Macros", + "DESCRIPTION": "A macro is a set of saved actions that help customer service agents easily complete tasks. The agents can define a set of actions like tagging a conversation with a label, sending an email transcript, updating a custom attribute, etc., and they can run these actions in a single click.", + "LEARN_MORE": "Learn more about macros", "HEADER_BTN_TXT": "Add a new macro", "HEADER_BTN_TXT_SAVE": "Save macro", "LOADING": "Fetching macros", - "SIDEBAR_TXT": "

Macros

A macro is a set of saved actions that help customer service agents easily complete tasks. The agents can define a set of actions like tagging a conversation with a label, sending an email transcript, updating a custom attribute, etc., and they can run these actions in a single click. When the agents run the macro, the actions would be performed sequentially in the order they are defined. Macros improve productivity and increase consistency in actions.

A macro can be helpful in 2 ways.

As an agent assist: If an agent performs a set of actions multiple times, they can save it as a macro and execute all the actions together using a single click.

As an option to onboard a team member: Every agent has to perform many different checks/actions during each conversation. Onboarding a new support team member will be easy if pre-defined macros are available on the account. Instead of describing each step in detail, the manager/team lead can point to the macros used in different scenarios.

", "ERROR": "Something went wrong. Please try again", "ORDER_INFO": "Macros will run in the order you add your actions. You can rearrange them by dragging them by the handle beside each node.", "ADD": { @@ -24,7 +25,12 @@ } }, "LIST": { - "TABLE_HEADER": ["Name", "Created by", "Last updated by", "Visibility"], + "TABLE_HEADER": [ + "Name", + "Created by", + "Last updated by", + "Visibility" + ], "404": "No macros found" }, "DELETE": { diff --git a/app/javascript/dashboard/routes/dashboard/settings/macros/Index.vue b/app/javascript/dashboard/routes/dashboard/settings/macros/Index.vue index 5217f0199..195f0e2f5 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/macros/Index.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/macros/Index.vue @@ -1,117 +1,112 @@ - diff --git a/app/javascript/dashboard/routes/dashboard/settings/macros/MacrosTableRow.vue b/app/javascript/dashboard/routes/dashboard/settings/macros/MacrosTableRow.vue index 6eee853ea..d79024adc 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/macros/MacrosTableRow.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/macros/MacrosTableRow.vue @@ -1,59 +1,56 @@ - - - diff --git a/app/javascript/dashboard/routes/dashboard/settings/macros/macros.routes.js b/app/javascript/dashboard/routes/dashboard/settings/macros/macros.routes.js index 06d0014b9..6f77e0c18 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/macros/macros.routes.js +++ b/app/javascript/dashboard/routes/dashboard/settings/macros/macros.routes.js @@ -1,6 +1,7 @@ import { frontendURL } from 'dashboard/helper/URLHelper'; const SettingsContent = () => import('../Wrapper.vue'); +const SettingsWrapper = () => import('../SettingsWrapper.vue'); const Macros = () => import('./Index.vue'); const MacroEditor = () => import('./MacroEditor.vue'); @@ -8,16 +9,7 @@ export default { routes: [ { path: frontendURL('accounts/:accountId/settings/macros'), - component: SettingsContent, - props: params => { - const showBackButton = params.name !== 'macros_wrapper'; - return { - headerTitle: 'MACROS.HEADER', - headerButtonText: 'MACROS.HEADER_BTN_TXT', - icon: 'flash-settings', - showBackButton, - }; - }, + component: SettingsWrapper, children: [ { path: '', @@ -27,6 +19,27 @@ export default { permissions: ['administrator', 'agent'], }, }, + ], + }, + { + path: frontendURL('accounts/:accountId/settings/macros'), + component: SettingsContent, + props: () => { + return { + headerTitle: 'MACROS.HEADER', + icon: 'flash-settings', + showBackButton: true, + }; + }, + children: [ + { + path: ':macroId/edit', + name: 'macros_edit', + component: MacroEditor, + meta: { + permissions: ['administrator', 'agent'], + }, + }, { path: 'new', name: 'macros_new', @@ -35,14 +48,6 @@ export default { permissions: ['administrator', 'agent'], }, }, - { - path: ':macroId/edit', - name: 'macros_edit', - component: MacroEditor, - meta: { - permissions: ['administrator', 'agent'], - }, - }, ], }, ],