* Chore: Enable Users to create multiple accounts Addresses: #402 - migrations to split roles and other attributes from users table - make changes in code to accommodate this change Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
50 lines
1.4 KiB
JavaScript
50 lines
1.4 KiB
JavaScript
/* eslint arrow-body-style: 0 */
|
|
import ConversationView from './ConversationView';
|
|
import { frontendURL } from '../../../helper/URLHelper';
|
|
|
|
export default {
|
|
routes: [
|
|
{
|
|
path: frontendURL('accounts/:accountId/dashboard'),
|
|
name: 'home',
|
|
roles: ['administrator', 'agent'],
|
|
component: ConversationView,
|
|
props: () => {
|
|
return { inboxId: 0 };
|
|
},
|
|
},
|
|
{
|
|
path: frontendURL('accounts/:accountId/inbox/:inbox_id'),
|
|
name: 'inbox_dashboard',
|
|
roles: ['administrator', 'agent'],
|
|
component: ConversationView,
|
|
props: route => {
|
|
return { inboxId: route.params.inbox_id };
|
|
},
|
|
},
|
|
{
|
|
path: frontendURL('accounts/:accountId/conversations/:conversation_id'),
|
|
name: 'inbox_conversation',
|
|
roles: ['administrator', 'agent'],
|
|
component: ConversationView,
|
|
props: route => {
|
|
return { inboxId: 0, conversationId: route.params.conversation_id };
|
|
},
|
|
},
|
|
{
|
|
path: frontendURL(
|
|
'accounts/:accountId/inbox/:inbox_id/conversations/:conversation_id'
|
|
),
|
|
name: 'conversation_through_inbox',
|
|
roles: ['administrator', 'agent'],
|
|
component: ConversationView,
|
|
props: route => {
|
|
return {
|
|
conversationId: route.params.conversation_id,
|
|
inboxId: route.params.inbox_id,
|
|
};
|
|
},
|
|
},
|
|
],
|
|
};
|