2019-08-25 14:29:28 +00:00
|
|
|
import { frontendURL } from '../helper/URLHelper';
|
2020-03-09 17:57:10 +00:00
|
|
|
|
2020-05-26 17:08:48 +00:00
|
|
|
export const getSidebarItems = accountId => ({
|
2019-12-28 16:26:42 +00:00
|
|
|
common: {
|
|
|
|
routes: [
|
|
|
|
'home',
|
|
|
|
'inbox_dashboard',
|
|
|
|
'inbox_conversation',
|
2020-02-22 08:54:51 +00:00
|
|
|
'conversation_through_inbox',
|
2019-12-28 16:26:42 +00:00
|
|
|
'settings_account_reports',
|
2020-02-16 11:50:38 +00:00
|
|
|
'profile_settings',
|
|
|
|
'profile_settings_index',
|
2019-12-28 16:26:42 +00:00
|
|
|
],
|
|
|
|
menuItems: {
|
|
|
|
assignedToMe: {
|
|
|
|
icon: 'ion-chatbox-working',
|
2020-04-06 16:47:07 +00:00
|
|
|
label: 'CONVERSATIONS',
|
2019-12-28 16:26:42 +00:00
|
|
|
hasSubMenu: false,
|
|
|
|
key: '',
|
2020-03-09 17:57:10 +00:00
|
|
|
toState: frontendURL(`accounts/${accountId}/dashboard`),
|
2019-12-28 16:26:42 +00:00
|
|
|
toolTip: 'Conversation from all subscribed inboxes',
|
|
|
|
toStateName: 'home',
|
|
|
|
},
|
|
|
|
report: {
|
|
|
|
icon: 'ion-arrow-graph-up-right',
|
2020-04-06 16:47:07 +00:00
|
|
|
label: 'REPORTS',
|
2019-12-28 16:26:42 +00:00
|
|
|
hasSubMenu: false,
|
2020-03-09 17:57:10 +00:00
|
|
|
toState: frontendURL(`accounts/${accountId}/reports`),
|
2019-12-28 16:26:42 +00:00
|
|
|
toStateName: 'settings_account_reports',
|
|
|
|
},
|
|
|
|
settings: {
|
|
|
|
icon: 'ion-settings',
|
2020-04-06 16:47:07 +00:00
|
|
|
label: 'SETTINGS',
|
2019-12-28 16:26:42 +00:00
|
|
|
hasSubMenu: false,
|
2020-03-09 17:57:10 +00:00
|
|
|
toState: frontendURL(`accounts/${accountId}/settings`),
|
2019-12-28 16:26:42 +00:00
|
|
|
toStateName: 'settings_home',
|
2019-08-14 09:48:44 +00:00
|
|
|
},
|
|
|
|
},
|
2019-12-28 16:26:42 +00:00
|
|
|
},
|
|
|
|
settings: {
|
|
|
|
routes: [
|
|
|
|
'agent_list',
|
|
|
|
'agent_new',
|
|
|
|
'canned_list',
|
|
|
|
'canned_new',
|
|
|
|
'settings_inbox',
|
|
|
|
'settings_inbox_new',
|
|
|
|
'settings_inbox_list',
|
|
|
|
'settings_inbox_show',
|
|
|
|
'settings_inboxes_page_channel',
|
|
|
|
'settings_inboxes_add_agents',
|
|
|
|
'settings_inbox_finish',
|
2020-02-29 12:13:49 +00:00
|
|
|
'settings_integrations',
|
|
|
|
'settings_integrations_webhook',
|
2020-04-06 16:47:07 +00:00
|
|
|
'general_settings',
|
|
|
|
'general_settings_index',
|
2019-12-28 16:26:42 +00:00
|
|
|
],
|
|
|
|
menuItems: {
|
|
|
|
back: {
|
|
|
|
icon: 'ion-ios-arrow-back',
|
2020-04-06 16:47:07 +00:00
|
|
|
label: 'HOME',
|
2019-12-28 16:26:42 +00:00
|
|
|
hasSubMenu: false,
|
|
|
|
toStateName: 'home',
|
2020-03-09 17:57:10 +00:00
|
|
|
toState: frontendURL(`accounts/${accountId}/dashboard`),
|
2019-12-28 16:26:42 +00:00
|
|
|
},
|
|
|
|
agents: {
|
|
|
|
icon: 'ion-person-stalker',
|
2020-04-06 16:47:07 +00:00
|
|
|
label: 'AGENTS',
|
2019-12-28 16:26:42 +00:00
|
|
|
hasSubMenu: false,
|
2020-03-09 17:57:10 +00:00
|
|
|
toState: frontendURL(`accounts/${accountId}/settings/agents/list`),
|
2019-12-28 16:26:42 +00:00
|
|
|
toStateName: 'agent_list',
|
|
|
|
},
|
|
|
|
inboxes: {
|
|
|
|
icon: 'ion-archive',
|
2020-04-06 16:47:07 +00:00
|
|
|
label: 'INBOXES',
|
2019-12-28 16:26:42 +00:00
|
|
|
hasSubMenu: false,
|
2020-03-09 17:57:10 +00:00
|
|
|
toState: frontendURL(`accounts/${accountId}/settings/inboxes/list`),
|
2019-12-28 16:26:42 +00:00
|
|
|
toStateName: 'settings_inbox_list',
|
|
|
|
},
|
|
|
|
cannedResponses: {
|
|
|
|
icon: 'ion-chatbox-working',
|
2020-04-06 16:47:07 +00:00
|
|
|
label: 'CANNED_RESPONSES',
|
2019-12-28 16:26:42 +00:00
|
|
|
hasSubMenu: false,
|
2020-03-09 17:57:10 +00:00
|
|
|
toState: frontendURL(
|
|
|
|
`accounts/${accountId}/settings/canned-response/list`
|
|
|
|
),
|
2019-12-28 16:26:42 +00:00
|
|
|
toStateName: 'canned_list',
|
|
|
|
},
|
2020-02-29 12:13:49 +00:00
|
|
|
settings_integrations: {
|
|
|
|
icon: 'ion-flash',
|
2020-04-06 16:47:07 +00:00
|
|
|
label: 'INTEGRATIONS',
|
2019-12-28 16:26:42 +00:00
|
|
|
hasSubMenu: false,
|
2020-03-09 17:57:10 +00:00
|
|
|
toState: frontendURL(`accounts/${accountId}/settings/integrations`),
|
2020-02-29 12:13:49 +00:00
|
|
|
toStateName: 'settings_integrations',
|
2019-08-14 09:48:44 +00:00
|
|
|
},
|
2020-05-26 17:08:48 +00:00
|
|
|
general_settings_index: {
|
2020-04-06 16:47:07 +00:00
|
|
|
icon: 'ion-gear-a',
|
|
|
|
label: 'ACCOUNT_SETTINGS',
|
|
|
|
hasSubMenu: false,
|
|
|
|
toState: frontendURL(`accounts/${accountId}/settings/general`),
|
2020-05-26 17:08:48 +00:00
|
|
|
toStateName: 'general_settings_index',
|
2020-04-06 16:47:07 +00:00
|
|
|
},
|
2019-08-14 09:48:44 +00:00
|
|
|
},
|
|
|
|
},
|
2020-05-26 17:08:48 +00:00
|
|
|
});
|