2022-12-19 17:08:30 +00:00
|
|
|
import { FEATURE_FLAGS } from '../../../../featureFlags';
|
2021-12-02 05:32:43 +00:00
|
|
|
import { frontendURL } from '../../../../helper/URLHelper';
|
|
|
|
|
|
|
|
const primaryMenuItems = accountId => [
|
|
|
|
{
|
|
|
|
icon: 'chat',
|
|
|
|
key: 'conversations',
|
|
|
|
label: 'CONVERSATIONS',
|
|
|
|
toState: frontendURL(`accounts/${accountId}/dashboard`),
|
|
|
|
toStateName: 'home',
|
|
|
|
roles: ['administrator', 'agent'],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
icon: 'book-contacts',
|
|
|
|
key: 'contacts',
|
|
|
|
label: 'CONTACTS',
|
2022-12-19 17:08:30 +00:00
|
|
|
featureFlag: FEATURE_FLAGS.CRM,
|
2021-12-02 05:32:43 +00:00
|
|
|
toState: frontendURL(`accounts/${accountId}/contacts`),
|
|
|
|
toStateName: 'contacts_dashboard',
|
|
|
|
roles: ['administrator', 'agent'],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
icon: 'arrow-trending-lines',
|
|
|
|
key: 'reports',
|
|
|
|
label: 'REPORTS',
|
2022-12-19 17:08:30 +00:00
|
|
|
featureFlag: FEATURE_FLAGS.REPORTS,
|
2021-12-02 05:32:43 +00:00
|
|
|
toState: frontendURL(`accounts/${accountId}/reports`),
|
|
|
|
toStateName: 'settings_account_reports',
|
|
|
|
roles: ['administrator'],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
icon: 'megaphone',
|
|
|
|
key: 'campaigns',
|
|
|
|
label: 'CAMPAIGNS',
|
2022-12-19 17:08:30 +00:00
|
|
|
featureFlag: FEATURE_FLAGS.CAMPAIGNS,
|
2021-12-02 05:32:43 +00:00
|
|
|
toState: frontendURL(`accounts/${accountId}/campaigns`),
|
|
|
|
toStateName: 'settings_account_campaigns',
|
|
|
|
roles: ['administrator'],
|
|
|
|
},
|
2022-09-18 20:08:30 +00:00
|
|
|
{
|
|
|
|
icon: 'library',
|
|
|
|
key: 'helpcenter',
|
|
|
|
label: 'HELP_CENTER.TITLE',
|
2022-12-19 17:08:30 +00:00
|
|
|
featureFlag: FEATURE_FLAGS.HELP_CENTER,
|
2022-09-18 20:08:30 +00:00
|
|
|
toState: frontendURL(`accounts/${accountId}/portals`),
|
2022-10-12 23:22:44 +00:00
|
|
|
toStateName: 'default_portal_articles',
|
2022-09-18 20:08:30 +00:00
|
|
|
roles: ['administrator'],
|
|
|
|
},
|
2021-12-02 05:32:43 +00:00
|
|
|
{
|
|
|
|
icon: 'settings',
|
|
|
|
key: 'settings',
|
|
|
|
label: 'SETTINGS',
|
|
|
|
toState: frontendURL(`accounts/${accountId}/settings`),
|
|
|
|
toStateName: 'settings_home',
|
|
|
|
roles: ['administrator', 'agent'],
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
export default primaryMenuItems;
|