mirror of
https://github.com/lingble/chatwoot.git
synced 2025-10-30 02:32:29 +00:00
29 lines
767 B
JavaScript
29 lines
767 B
JavaScript
import agent from './agents/agent.routes';
|
|
import inbox from './inbox/inbox.routes';
|
|
import canned from './canned/canned.routes';
|
|
import reports from './reports/reports.routes';
|
|
import billing from './billing/billing.routes';
|
|
import Auth from '../../../api/auth';
|
|
import { frontendURL } from '../../../helper/URLHelper';
|
|
|
|
export default {
|
|
routes: [
|
|
{
|
|
path: frontendURL('settings'),
|
|
name: 'settings_home',
|
|
roles: ['administrator', 'agent'],
|
|
redirect: () => {
|
|
if (Auth.isAdmin()) {
|
|
return frontendURL('settings/agents');
|
|
}
|
|
return frontendURL('settings/canned-response');
|
|
},
|
|
},
|
|
...inbox.routes,
|
|
...agent.routes,
|
|
...canned.routes,
|
|
...reports.routes,
|
|
...billing.routes,
|
|
],
|
|
};
|