diff --git a/app/javascript/dashboard/i18n/default-sidebar.js b/app/javascript/dashboard/i18n/default-sidebar.js index 75a0675cc..5dbe18f54 100644 --- a/app/javascript/dashboard/i18n/default-sidebar.js +++ b/app/javascript/dashboard/i18n/default-sidebar.js @@ -144,6 +144,7 @@ export const getSidebarItems = accountId => ({ 'canned_list', 'labels_list', 'settings_inbox', + 'attributes_list', 'settings_inbox_new', 'settings_inbox_list', 'settings_inbox_show', @@ -202,6 +203,13 @@ export const getSidebarItems = accountId => ({ toState: frontendURL(`accounts/${accountId}/settings/labels/list`), toStateName: 'labels_list', }, + attributes: { + icon: 'ion-code', + label: 'ATTRIBUTES', + hasSubMenu: false, + toState: frontendURL(`accounts/${accountId}/settings/attributes/list`), + toStateName: 'attributes_list', + }, cannedResponses: { icon: 'ion-chatbox-working', label: 'CANNED_RESPONSES', diff --git a/app/javascript/dashboard/i18n/locale/en/attributesMgmt.json b/app/javascript/dashboard/i18n/locale/en/attributesMgmt.json new file mode 100644 index 000000000..af8c41e6f --- /dev/null +++ b/app/javascript/dashboard/i18n/locale/en/attributesMgmt.json @@ -0,0 +1,6 @@ +{ + "ATTRIBUTES_MGMT": { + "HEADER": "Attributes", + "HEADER_BTN_TXT": "Add Attribute" + } +} diff --git a/app/javascript/dashboard/i18n/locale/en/index.js b/app/javascript/dashboard/i18n/locale/en/index.js index 4203b60ff..16581ce5b 100644 --- a/app/javascript/dashboard/i18n/locale/en/index.js +++ b/app/javascript/dashboard/i18n/locale/en/index.js @@ -17,6 +17,7 @@ import { default as _signup } from './signup.json'; import { default as _teamsSettings } from './teamsSettings.json'; import { default as _integrationApps } from './integrationApps.json'; import { default as _csatMgmtMgmt } from './csatMgmt.json'; +import { default as _attributesMgmt } from './attributesMgmt.json'; export default { ..._agentMgmt, @@ -38,4 +39,5 @@ export default { ..._teamsSettings, ..._integrationApps, ..._csatMgmtMgmt, + ..._attributesMgmt, }; diff --git a/app/javascript/dashboard/i18n/locale/en/settings.json b/app/javascript/dashboard/i18n/locale/en/settings.json index 6bbd35e32..25d0f6c18 100644 --- a/app/javascript/dashboard/i18n/locale/en/settings.json +++ b/app/javascript/dashboard/i18n/locale/en/settings.json @@ -138,6 +138,7 @@ "ACCOUNT_SETTINGS": "Account Settings", "APPLICATIONS": "Applications", "LABELS": "Labels", + "ATTRIBUTES": "Attributes", "TEAMS": "Teams", "ALL_CONTACTS": "All Contacts", "TAGGED_WITH": "Tagged with", diff --git a/app/javascript/dashboard/routes/dashboard/settings/attributes/Index.vue b/app/javascript/dashboard/routes/dashboard/settings/attributes/Index.vue new file mode 100644 index 000000000..2a62e3363 --- /dev/null +++ b/app/javascript/dashboard/routes/dashboard/settings/attributes/Index.vue @@ -0,0 +1,17 @@ + + + + + diff --git a/app/javascript/dashboard/routes/dashboard/settings/attributes/attributes.routes.js b/app/javascript/dashboard/routes/dashboard/settings/attributes/attributes.routes.js new file mode 100644 index 000000000..082cc2518 --- /dev/null +++ b/app/javascript/dashboard/routes/dashboard/settings/attributes/attributes.routes.js @@ -0,0 +1,30 @@ +import SettingsContent from '../Wrapper'; +import AttributesHome from './Index'; +import { frontendURL } from '../../../../helper/URLHelper'; + +export default { + routes: [ + { + path: frontendURL('accounts/:accountId/settings/attributes'), + component: SettingsContent, + props: { + headerTitle: 'ATTRIBUTES_MGMT.HEADER', + icon: 'ion-code', + showNewButton: false, + }, + children: [ + { + path: '', + name: 'attributes_wrapper', + redirect: 'list', + }, + { + path: 'list', + name: 'attributes_list', + component: AttributesHome, + roles: ['administrator'], + }, + ], + }, + ], +}; diff --git a/app/javascript/dashboard/routes/dashboard/settings/settings.routes.js b/app/javascript/dashboard/routes/dashboard/settings/settings.routes.js index 7591a199c..cf780094d 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/settings.routes.js +++ b/app/javascript/dashboard/routes/dashboard/settings/settings.routes.js @@ -10,6 +10,7 @@ import profile from './profile/profile.routes'; import reports from './reports/reports.routes'; import campaigns from './campaigns/campaigns.routes'; import teams from './teams/teams.routes'; +import attributes from './attributes/attributes.routes'; import store from '../../../store'; export default { @@ -35,6 +36,7 @@ export default { ...reports.routes, ...teams.routes, ...campaigns.routes, + ...attributes.routes, ...integrationapps.routes, ], };