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 reports = accountId => ({
|
|
|
|
routes: [
|
|
|
|
'settings_account_reports',
|
|
|
|
'csat_reports',
|
|
|
|
'agent_reports',
|
|
|
|
'label_reports',
|
|
|
|
'inbox_reports',
|
2021-10-06 18:23:51 +00:00
|
|
|
'team_reports',
|
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`),
|
|
|
|
},
|
|
|
|
reportOverview: {
|
|
|
|
icon: 'ion-arrow-graph-up-right',
|
|
|
|
label: 'REPORTS_OVERVIEW',
|
|
|
|
hasSubMenu: false,
|
|
|
|
toState: frontendURL(`accounts/${accountId}/reports/overview`),
|
|
|
|
toStateName: 'settings_account_reports',
|
|
|
|
},
|
|
|
|
csatReports: {
|
|
|
|
icon: 'ion-happy',
|
|
|
|
label: 'CSAT',
|
|
|
|
hasSubMenu: false,
|
|
|
|
toState: frontendURL(`accounts/${accountId}/reports/csat`),
|
|
|
|
toStateName: 'csat_reports',
|
|
|
|
},
|
|
|
|
agentReports: {
|
2021-10-06 18:23:51 +00:00
|
|
|
icon: 'ion-person-stalker',
|
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
|
|
|
label: 'REPORTS_AGENT',
|
|
|
|
hasSubMenu: false,
|
|
|
|
toState: frontendURL(`accounts/${accountId}/reports/agent`),
|
|
|
|
toStateName: 'agent_reports',
|
|
|
|
},
|
|
|
|
labelReports: {
|
|
|
|
icon: 'ion-pricetags',
|
|
|
|
label: 'REPORTS_LABEL',
|
|
|
|
hasSubMenu: false,
|
|
|
|
toState: frontendURL(`accounts/${accountId}/reports/label`),
|
|
|
|
toStateName: 'label_reports',
|
|
|
|
},
|
|
|
|
inboxReports: {
|
|
|
|
icon: 'ion-archive',
|
|
|
|
label: 'REPORTS_INBOX',
|
|
|
|
hasSubMenu: false,
|
|
|
|
toState: frontendURL(`accounts/${accountId}/reports/inboxes`),
|
|
|
|
toStateName: 'inbox_reports',
|
|
|
|
},
|
2021-10-06 18:23:51 +00:00
|
|
|
teamReports: {
|
|
|
|
icon: 'ion-ios-people',
|
|
|
|
label: 'REPORTS_TEAM',
|
|
|
|
hasSubMenu: false,
|
|
|
|
toState: frontendURL(`accounts/${accountId}/reports/teams`),
|
|
|
|
toStateName: 'team_reports',
|
|
|
|
},
|
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
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
export default reports;
|