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',
|
2020-11-10 09:55:26 +00:00
|
|
|
'contacts_dashboard',
|
2021-01-24 19:29:44 +00:00
|
|
|
'notifications_dashboard',
|
2019-12-28 16:26:42 +00:00
|
|
|
'settings_account_reports',
|
2020-02-16 11:50:38 +00:00
|
|
|
'profile_settings',
|
|
|
|
'profile_settings_index',
|
2020-06-25 15:34:03 +00:00
|
|
|
'label_conversations',
|
|
|
|
'conversations_through_label',
|
2021-02-13 09:28:05 +00:00
|
|
|
'team_conversations',
|
|
|
|
'conversations_through_team',
|
2021-01-24 19:29:44 +00:00
|
|
|
'notifications_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',
|
|
|
|
},
|
2020-11-10 09:55:26 +00:00
|
|
|
contacts: {
|
2020-12-26 05:48:56 +00:00
|
|
|
icon: 'ion-person',
|
2020-11-10 09:55:26 +00:00
|
|
|
label: 'CONTACTS',
|
|
|
|
hasSubMenu: false,
|
|
|
|
toState: frontendURL(`accounts/${accountId}/contacts`),
|
|
|
|
toStateName: 'contacts_dashboard',
|
|
|
|
},
|
2021-01-24 19:29:44 +00:00
|
|
|
notifications: {
|
|
|
|
icon: 'ion-ios-bell',
|
|
|
|
label: 'NOTIFICATIONS',
|
|
|
|
hasSubMenu: false,
|
|
|
|
toState: frontendURL(`accounts/${accountId}/notifications`),
|
|
|
|
toStateName: 'notifications_dashboard',
|
|
|
|
},
|
2019-12-28 16:26:42 +00:00
|
|
|
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',
|
|
|
|
'canned_list',
|
2020-06-25 15:34:03 +00:00
|
|
|
'labels_list',
|
2019-12-28 16:26:42 +00:00
|
|
|
'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-06-22 07:49:26 +00:00
|
|
|
'settings_integrations_integration',
|
2020-04-06 16:47:07 +00:00
|
|
|
'general_settings',
|
|
|
|
'general_settings_index',
|
2021-03-15 13:05:56 +00:00
|
|
|
'settings_teams_list',
|
|
|
|
'settings_teams_new',
|
|
|
|
'settings_teams_add_agents',
|
|
|
|
'settings_teams_finish',
|
|
|
|
'settings_teams_edit',
|
|
|
|
'settings_teams_edit_members',
|
|
|
|
'settings_teams_edit_finish',
|
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',
|
|
|
|
},
|
2021-03-15 13:05:56 +00:00
|
|
|
teams: {
|
|
|
|
icon: 'ion-ios-people',
|
|
|
|
label: 'TEAMS',
|
|
|
|
hasSubMenu: false,
|
|
|
|
toState: frontendURL(`accounts/${accountId}/settings/teams/list`),
|
|
|
|
toStateName: 'settings_teams_list',
|
|
|
|
},
|
2019-12-28 16:26:42 +00:00
|
|
|
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',
|
|
|
|
},
|
2020-06-25 15:34:03 +00:00
|
|
|
labels: {
|
|
|
|
icon: 'ion-pricetags',
|
|
|
|
label: 'LABELS',
|
|
|
|
hasSubMenu: false,
|
|
|
|
toState: frontendURL(`accounts/${accountId}/settings/labels/list`),
|
|
|
|
toStateName: 'labels_list',
|
|
|
|
},
|
2019-12-28 16:26:42 +00:00
|
|
|
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
|
|
|
});
|