index.js
1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import { createRouter, createWebHistory } from 'vue-router'
const routes = [
{
path: '/',
redirect: '/company'
},
{
path: '/agents/:agentId?',
redirect: to => `/agent/${to.params.agentId || 'agent-creator'}`,
},
{
path: '/agent/:agentId/:convId?',
name: 'AgentChat',
component: () => import('@/views/AgentChat.vue'),
props: true,
},
{
path: '/:id/agents/:agentId?/:convId?',
name: 'CompanyAgentChat',
component: () => import('@/views/AgentChat.vue'),
props: true,
},
{
path: '/company',
name: 'CompanyList',
component: () => import('@/views/CompanyDashboard.vue'),
},
{
path: '/:id/:tab(overview|agents|pipelines|goals|sop|okr|team)',
name: 'CompanyDetail',
component: () => import('@/views/CompanyDashboard.vue'),
props: true
},
{
path: '/okr',
name: 'OkrDashboard',
component: () => import('@/views/OkrDashboard.vue'),
},
]
const router = createRouter({
history: createWebHistory(),
routes,
})
export default router