In admin settings, this Pr will add the UI for managing custom roles ( ref: https://github.com/chatwoot/chatwoot/pull/9995 ). It also handles the routing logic changes to accommodate fine-tuned permissions. --------- Co-authored-by: Pranav <pranavrajs@gmail.com> Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Co-authored-by: iamsivin <iamsivin@gmail.com> Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
47 lines
1.4 KiB
JavaScript
47 lines
1.4 KiB
JavaScript
import settings from './settings/settings.routes';
|
|
import conversation from './conversation/conversation.routes';
|
|
import { routes as searchRoutes } from '../../modules/search/search.routes';
|
|
import { routes as contactRoutes } from './contacts/routes';
|
|
import { routes as notificationRoutes } from './notifications/routes';
|
|
import { routes as inboxRoutes } from './inbox/routes';
|
|
import { frontendURL } from '../../helper/URLHelper';
|
|
import helpcenterRoutes from './helpcenter/helpcenter.routes';
|
|
|
|
const AppContainer = () => import('./Dashboard.vue');
|
|
const Captain = () => import('./Captain.vue');
|
|
const Suspended = () => import('./suspended/Index.vue');
|
|
|
|
export default {
|
|
routes: [
|
|
...helpcenterRoutes.routes,
|
|
{
|
|
path: frontendURL('accounts/:account_id'),
|
|
component: AppContainer,
|
|
children: [
|
|
{
|
|
path: frontendURL('accounts/:accountId/captain'),
|
|
name: 'captain',
|
|
component: Captain,
|
|
meta: {
|
|
permissions: ['administrator', 'agent'],
|
|
},
|
|
},
|
|
...inboxRoutes,
|
|
...conversation.routes,
|
|
...settings.routes,
|
|
...contactRoutes,
|
|
...searchRoutes,
|
|
...notificationRoutes,
|
|
],
|
|
},
|
|
{
|
|
path: frontendURL('accounts/:accountId/suspended'),
|
|
name: 'account_suspended',
|
|
meta: {
|
|
permissions: ['administrator', 'agent', 'custom_role'],
|
|
},
|
|
component: Suspended,
|
|
},
|
|
],
|
|
};
|