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>
This commit is contained in:
57
app/javascript/dashboard/i18n/sidebarItems/reports.js
Normal file
57
app/javascript/dashboard/i18n/sidebarItems/reports.js
Normal file
@@ -0,0 +1,57 @@
|
||||
import { frontendURL } from '../../helper/URLHelper';
|
||||
|
||||
const reports = accountId => ({
|
||||
routes: [
|
||||
'settings_account_reports',
|
||||
'csat_reports',
|
||||
'agent_reports',
|
||||
'label_reports',
|
||||
'inbox_reports',
|
||||
],
|
||||
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: {
|
||||
icon: 'ion-ios-people',
|
||||
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',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export default reports;
|
||||
Reference in New Issue
Block a user