feat - Add filter for reports by agent, label and inboxes (#3084)
* Adds filter for agents, labels and inboxes
* Added Inboxes Reports Feature
* Fixed populating of filter dropdown issue
* If applied, fixes code climate style-lint warnings
* Fixes codeclimate warnings
* if applied, Refactors sidebar file to fix codclimate warnings
* if applied, fixes the download reports button for filtered report-data
* If applied, replaces native img tag with thumbnail component
* If applied, replaces hardcoded color string with variable
* If applied, adds a11y labels to multiselect dropdowns
* If applied, Renames reports methods to generic names
* If applied, Adds test cases for Labels and Inboxes
* If applied, write a test spec for fileDownload helper
* if applied, Moves fileDownload method to a utils folder
* If applied, Fixes the report file name type
* Test Spec for Reports Store module
* Fix specs - add restoreAllMocks
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-09-30 07:43:45 +00:00
|
|
|
import { frontendURL } from '../../helper/URLHelper';
|
|
|
|
|
|
|
|
const settings = accountId => ({
|
|
|
|
routes: [
|
|
|
|
'agent_list',
|
|
|
|
'canned_list',
|
|
|
|
'labels_list',
|
|
|
|
'settings_inbox',
|
|
|
|
'attributes_list',
|
|
|
|
'settings_inbox_new',
|
|
|
|
'settings_inbox_list',
|
|
|
|
'settings_inbox_show',
|
|
|
|
'settings_inboxes_page_channel',
|
|
|
|
'settings_inboxes_add_agents',
|
|
|
|
'settings_inbox_finish',
|
|
|
|
'settings_integrations',
|
|
|
|
'settings_integrations_webhook',
|
|
|
|
'settings_integrations_integration',
|
|
|
|
'settings_applications',
|
|
|
|
'settings_applications_webhook',
|
|
|
|
'settings_applications_integration',
|
|
|
|
'general_settings',
|
|
|
|
'general_settings_index',
|
|
|
|
'settings_teams_list',
|
|
|
|
'settings_teams_new',
|
|
|
|
'settings_teams_add_agents',
|
|
|
|
'settings_teams_finish',
|
|
|
|
'settings_teams_edit',
|
|
|
|
'settings_teams_edit_members',
|
|
|
|
'settings_teams_edit_finish',
|
2021-11-18 08:39:55 +00:00
|
|
|
'automation_list',
|
feat - Add filter for reports by agent, label and inboxes (#3084)
* Adds filter for agents, labels and inboxes
* Added Inboxes Reports Feature
* Fixed populating of filter dropdown issue
* If applied, fixes code climate style-lint warnings
* Fixes codeclimate warnings
* if applied, Refactors sidebar file to fix codclimate warnings
* if applied, fixes the download reports button for filtered report-data
* If applied, replaces native img tag with thumbnail component
* If applied, replaces hardcoded color string with variable
* If applied, adds a11y labels to multiselect dropdowns
* If applied, Renames reports methods to generic names
* If applied, Adds test cases for Labels and Inboxes
* If applied, write a test spec for fileDownload helper
* if applied, Moves fileDownload method to a utils folder
* If applied, Fixes the report file name type
* Test Spec for Reports Store module
* Fix specs - add restoreAllMocks
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-09-30 07:43:45 +00:00
|
|
|
],
|
|
|
|
menuItems: {
|
|
|
|
back: {
|
|
|
|
icon: 'ion-ios-arrow-back',
|
|
|
|
label: 'HOME',
|
|
|
|
hasSubMenu: false,
|
|
|
|
toStateName: 'home',
|
|
|
|
toState: frontendURL(`accounts/${accountId}/dashboard`),
|
|
|
|
},
|
|
|
|
agents: {
|
|
|
|
icon: 'ion-person-stalker',
|
|
|
|
label: 'AGENTS',
|
|
|
|
hasSubMenu: false,
|
|
|
|
toState: frontendURL(`accounts/${accountId}/settings/agents/list`),
|
|
|
|
toStateName: 'agent_list',
|
|
|
|
},
|
|
|
|
teams: {
|
|
|
|
icon: 'ion-ios-people',
|
|
|
|
label: 'TEAMS',
|
|
|
|
hasSubMenu: false,
|
|
|
|
toState: frontendURL(`accounts/${accountId}/settings/teams/list`),
|
|
|
|
toStateName: 'settings_teams_list',
|
|
|
|
},
|
|
|
|
inboxes: {
|
|
|
|
icon: 'ion-archive',
|
|
|
|
label: 'INBOXES',
|
|
|
|
hasSubMenu: false,
|
|
|
|
toState: frontendURL(`accounts/${accountId}/settings/inboxes/list`),
|
|
|
|
toStateName: 'settings_inbox_list',
|
|
|
|
},
|
|
|
|
labels: {
|
|
|
|
icon: 'ion-pricetags',
|
|
|
|
label: 'LABELS',
|
|
|
|
hasSubMenu: false,
|
|
|
|
toState: frontendURL(`accounts/${accountId}/settings/labels/list`),
|
|
|
|
toStateName: 'labels_list',
|
|
|
|
},
|
|
|
|
attributes: {
|
|
|
|
icon: 'ion-code',
|
2021-11-11 09:53:33 +00:00
|
|
|
label: 'CUSTOM_ATTRIBUTES',
|
feat - Add filter for reports by agent, label and inboxes (#3084)
* Adds filter for agents, labels and inboxes
* Added Inboxes Reports Feature
* Fixed populating of filter dropdown issue
* If applied, fixes code climate style-lint warnings
* Fixes codeclimate warnings
* if applied, Refactors sidebar file to fix codclimate warnings
* if applied, fixes the download reports button for filtered report-data
* If applied, replaces native img tag with thumbnail component
* If applied, replaces hardcoded color string with variable
* If applied, adds a11y labels to multiselect dropdowns
* If applied, Renames reports methods to generic names
* If applied, Adds test cases for Labels and Inboxes
* If applied, write a test spec for fileDownload helper
* if applied, Moves fileDownload method to a utils folder
* If applied, Fixes the report file name type
* Test Spec for Reports Store module
* Fix specs - add restoreAllMocks
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-09-30 07:43:45 +00:00
|
|
|
hasSubMenu: false,
|
2021-11-11 09:53:33 +00:00
|
|
|
toState: frontendURL(
|
|
|
|
`accounts/${accountId}/settings/custom-attributes/list`
|
|
|
|
),
|
feat - Add filter for reports by agent, label and inboxes (#3084)
* Adds filter for agents, labels and inboxes
* Added Inboxes Reports Feature
* Fixed populating of filter dropdown issue
* If applied, fixes code climate style-lint warnings
* Fixes codeclimate warnings
* if applied, Refactors sidebar file to fix codclimate warnings
* if applied, fixes the download reports button for filtered report-data
* If applied, replaces native img tag with thumbnail component
* If applied, replaces hardcoded color string with variable
* If applied, adds a11y labels to multiselect dropdowns
* If applied, Renames reports methods to generic names
* If applied, Adds test cases for Labels and Inboxes
* If applied, write a test spec for fileDownload helper
* if applied, Moves fileDownload method to a utils folder
* If applied, Fixes the report file name type
* Test Spec for Reports Store module
* Fix specs - add restoreAllMocks
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-09-30 07:43:45 +00:00
|
|
|
toStateName: 'attributes_list',
|
|
|
|
},
|
2021-11-18 08:39:55 +00:00
|
|
|
automation: {
|
|
|
|
icon: 'ion-wrench',
|
|
|
|
label: 'AUTOMATION',
|
|
|
|
hasSubMenu: false,
|
|
|
|
toState: frontendURL(`accounts/${accountId}/settings/automation/list`),
|
|
|
|
toStateName: 'automation_list',
|
|
|
|
},
|
feat - Add filter for reports by agent, label and inboxes (#3084)
* Adds filter for agents, labels and inboxes
* Added Inboxes Reports Feature
* Fixed populating of filter dropdown issue
* If applied, fixes code climate style-lint warnings
* Fixes codeclimate warnings
* if applied, Refactors sidebar file to fix codclimate warnings
* if applied, fixes the download reports button for filtered report-data
* If applied, replaces native img tag with thumbnail component
* If applied, replaces hardcoded color string with variable
* If applied, adds a11y labels to multiselect dropdowns
* If applied, Renames reports methods to generic names
* If applied, Adds test cases for Labels and Inboxes
* If applied, write a test spec for fileDownload helper
* if applied, Moves fileDownload method to a utils folder
* If applied, Fixes the report file name type
* Test Spec for Reports Store module
* Fix specs - add restoreAllMocks
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-09-30 07:43:45 +00:00
|
|
|
cannedResponses: {
|
|
|
|
icon: 'ion-chatbox-working',
|
|
|
|
label: 'CANNED_RESPONSES',
|
|
|
|
hasSubMenu: false,
|
|
|
|
toState: frontendURL(
|
|
|
|
`accounts/${accountId}/settings/canned-response/list`
|
|
|
|
),
|
|
|
|
toStateName: 'canned_list',
|
|
|
|
},
|
|
|
|
settings_integrations: {
|
|
|
|
icon: 'ion-flash',
|
|
|
|
label: 'INTEGRATIONS',
|
|
|
|
hasSubMenu: false,
|
|
|
|
toState: frontendURL(`accounts/${accountId}/settings/integrations`),
|
|
|
|
toStateName: 'settings_integrations',
|
|
|
|
},
|
|
|
|
settings_applications: {
|
|
|
|
icon: 'ion-asterisk',
|
|
|
|
label: 'APPLICATIONS',
|
|
|
|
hasSubMenu: false,
|
|
|
|
toState: frontendURL(`accounts/${accountId}/settings/applications`),
|
|
|
|
toStateName: 'settings_applications',
|
|
|
|
},
|
|
|
|
general_settings_index: {
|
|
|
|
icon: 'ion-gear-a',
|
|
|
|
label: 'ACCOUNT_SETTINGS',
|
|
|
|
hasSubMenu: false,
|
|
|
|
toState: frontendURL(`accounts/${accountId}/settings/general`),
|
|
|
|
toStateName: 'general_settings_index',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
export default settings;
|