chore: Add router views for agent_bots (#5600)

This commit is contained in:
Pranav Raj S
2022-10-11 17:58:52 -07:00
committed by GitHub
parent 38776906ab
commit 9b5c0de0ea
12 changed files with 168 additions and 61 deletions
@@ -0,0 +1,18 @@
<template>
<div>Agent Bot list</div>
</template>
<script>
import { mapGetters } from 'vuex';
export default {
computed: {
...mapGetters({
agentBots: 'agentBots/getBots',
uiFlags: 'agentBots/getUIFlags',
}),
},
mounted() {
this.$store.dispatch('agentBots/get');
},
};
</script>
@@ -0,0 +1,40 @@
import SettingsContent from '../Wrapper';
const Bot = () => import('./Index.vue');
const CsmlEditBot = () => import('./csml/Edit.vue');
const CsmlNewBot = () => import('./csml/New.vue');
import { frontendURL } from '../../../../helper/URLHelper';
export default {
routes: [
{
path: frontendURL('accounts/:accountId/settings/agent-bots'),
roles: ['administrator'],
component: SettingsContent,
props: {
headerTitle: 'AGENT_BOTS.HEADER',
icon: 'bot',
showNewButton: false,
},
children: [
{
path: '',
name: 'agent_bots',
component: Bot,
roles: ['administrator'],
},
{
path: 'csml/new',
name: 'agent_bots_csml_new',
component: CsmlNewBot,
roles: ['administrator'],
},
{
path: 'csml/:botId',
name: 'agent_bots_csml_edit',
component: CsmlEditBot,
roles: ['administrator'],
},
],
},
],
};
@@ -0,0 +1,6 @@
<template>
<div>Component to edit CSML Bots</div>
</template>
<script>
export default {};
</script>
@@ -0,0 +1,6 @@
<template>
<div>Component to create CSML Bots</div>
</template>
<script>
export default {};
</script>
@@ -1,19 +1,20 @@
import { frontendURL } from '../../../helper/URLHelper';
import account from './account/account.routes';
import agent from './agents/agent.routes';
import agentBot from './agentBots/agentBot.routes';
import attributes from './attributes/attributes.routes';
import automation from './automation/automation.routes';
import billing from './billing/billing.routes';
import campaigns from './campaigns/campaigns.routes';
import canned from './canned/canned.routes';
import inbox from './inbox/inbox.routes';
import integrations from './integrations/integrations.routes';
import integrationapps from './integrationapps/integrations.routes';
import integrations from './integrations/integrations.routes';
import labels from './labels/labels.routes';
import profile from './profile/profile.routes';
import reports from './reports/reports.routes';
import campaigns from './campaigns/campaigns.routes';
import teams from './teams/teams.routes';
import attributes from './attributes/attributes.routes';
import automation from './automation/automation.routes';
import store from '../../../store';
import billing from './billing/billing.routes';
import teams from './teams/teams.routes';
export default {
routes: [
@@ -30,6 +31,7 @@ export default {
},
...account.routes,
...agent.routes,
...agentBot.routes,
...attributes.routes,
...automation.routes,
...billing.routes,