feat: Add macros routes and views (#5604)

This commit is contained in:
Fayaz Ahmed
2022-10-12 11:50:20 +05:30
committed by GitHub
parent 6c160ccad5
commit 32d885a19b
10 changed files with 112 additions and 26 deletions

View File

@@ -0,0 +1,11 @@
<template>
<div>
Macros
</div>
</template>
<script>
export default {};
</script>
<style></style>

View File

@@ -0,0 +1,9 @@
<template>
<div>MacrosEditor</div>
</template>
<script>
export default {};
</script>
<style></style>

View File

@@ -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'],
},
],
},
],
};

View File

@@ -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,