From aea68f1ecf517f04da638f199daac2fe5c4fb34a Mon Sep 17 00:00:00 2001 From: Pranav Date: Tue, 6 Aug 2024 20:58:04 -0700 Subject: [PATCH] feat: Update the design of the audit logs page (#9901) This is continuation of the design update, updates the design for audit logs listing page. --------- Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> --- .../layout/config/sidebarItems/settings.js | 3 +- .../dashboard/helper/featureHelper.js | 21 +- .../dashboard/i18n/locale/en/auditLogs.json | 36 ++-- .../dashboard/settings/auditlogs/Index.vue | 180 ++++++++---------- .../settings/auditlogs/audit.routes.js | 11 +- 5 files changed, 118 insertions(+), 133 deletions(-) diff --git a/app/javascript/dashboard/components/layout/config/sidebarItems/settings.js b/app/javascript/dashboard/components/layout/config/sidebarItems/settings.js index 390e8effa..e30c3bcb1 100644 --- a/app/javascript/dashboard/components/layout/config/sidebarItems/settings.js +++ b/app/javascript/dashboard/components/layout/config/sidebarItems/settings.js @@ -173,11 +173,10 @@ const settings = accountId => ({ meta: { permissions: ['administrator'], }, - toState: frontendURL(`accounts/${accountId}/settings/audit-log/list`), + toState: frontendURL(`accounts/${accountId}/settings/audit-logs/list`), toStateName: 'auditlogs_list', isEnterpriseOnly: true, featureFlag: FEATURE_FLAGS.AUDIT_LOGS, - beta: true, }, { icon: 'document-list-clock', diff --git a/app/javascript/dashboard/helper/featureHelper.js b/app/javascript/dashboard/helper/featureHelper.js index fb514f806..5a5edba6d 100644 --- a/app/javascript/dashboard/helper/featureHelper.js +++ b/app/javascript/dashboard/helper/featureHelper.js @@ -1,18 +1,19 @@ const FEATURE_HELP_URLS = { + agent_bots: 'https://chwt.app/hc/agent-bots', + audit_logs: 'https://chwt.app/hc/audit-logs', + campaigns: 'https://chwt.app/hc/campaigns', + canned_responses: 'https://chwt.app/hc/canned', channel_email: 'https://chwt.app/hc/email', channel_facebook: 'https://chwt.app/hc/fb', - help_center: 'https://chwt.app/hc/help-center', - agent_bots: 'https://chwt.app/hc/agent-bots', - team_management: 'https://chwt.app/hc/teams', - labels: 'https://chwt.app/hc/labels', custom_attributes: 'https://chwt.app/hc/custom-attributes', - canned_responses: 'https://chwt.app/hc/canned', - integrations: 'https://chwt.app/hc/integrations', - campaigns: 'https://chwt.app/hc/campaigns', - reports: 'https://chwt.app/hc/reports', - message_reply_to: 'https://chwt.app/hc/reply-to', - sla: 'https://chwt.app/hc/sla', dashboard_apps: 'https://chwt.app/hc/dashboard-apps', + help_center: 'https://chwt.app/hc/help-center', + integrations: 'https://chwt.app/hc/integrations', + labels: 'https://chwt.app/hc/labels', + message_reply_to: 'https://chwt.app/hc/reply-to', + reports: 'https://chwt.app/hc/reports', + sla: 'https://chwt.app/hc/sla', + team_management: 'https://chwt.app/hc/teams', }; export function getHelpUrlForFeature(featureName) { diff --git a/app/javascript/dashboard/i18n/locale/en/auditLogs.json b/app/javascript/dashboard/i18n/locale/en/auditLogs.json index 8a3fa7715..e51579d29 100644 --- a/app/javascript/dashboard/i18n/locale/en/auditLogs.json +++ b/app/javascript/dashboard/i18n/locale/en/auditLogs.json @@ -3,6 +3,8 @@ "HEADER": "Audit Logs", "HEADER_BTN_TXT": "Add Audit Logs", "LOADING": "Fetching Audit Logs", + "DESCRIPTION": "Audit Logs maintain a record of activities in your account, allowing you to track and audit your account, team, or services.", + "LEARN_MORE": "Learn more about audit logs", "SEARCH_404": "There are no items matching this query", "SIDEBAR_TXT": "

Audit Logs

Audit Logs are trails for events and actions in a Chatwoot System.

", "LIST": { @@ -50,22 +52,22 @@ "ADD": "%{agentName} created a new team (#%{id})", "EDIT": "%{agentName} updated a team (#%{id})", "DELETE": "%{agentName} deleted a team (#%{id})" - }, - "MACRO": { - "ADD": "%{agentName} created a new macro (#%{id})", - "EDIT": "%{agentName} updated a macro (#%{id})", - "DELETE": "%{agentName} deleted a macro (#%{id})" - }, - "INBOX_MEMBER": { - "ADD": "%{agentName} added %{user} to the inbox(#%{inbox_id})", - "REMOVE": "%{agentName} removed %{user} from the inbox(#%{inbox_id})" - }, - "TEAM_MEMBER": { - "ADD": "%{agentName} added %{user} to the team(#%{team_id})", - "REMOVE": "%{agentName} removed %{user} from the team(#%{team_id})" - }, - "ACCOUNT": { - "EDIT": "%{agentName} updated the account configuration (#%{id})" + }, + "MACRO": { + "ADD": "%{agentName} created a new macro (#%{id})", + "EDIT": "%{agentName} updated a macro (#%{id})", + "DELETE": "%{agentName} deleted a macro (#%{id})" + }, + "INBOX_MEMBER": { + "ADD": "%{agentName} added %{user} to the inbox(#%{inbox_id})", + "REMOVE": "%{agentName} removed %{user} from the inbox(#%{inbox_id})" + }, + "TEAM_MEMBER": { + "ADD": "%{agentName} added %{user} to the team(#%{team_id})", + "REMOVE": "%{agentName} removed %{user} from the team(#%{team_id})" + }, + "ACCOUNT": { + "EDIT": "%{agentName} updated the account configuration (#%{id})" + } } } -} diff --git a/app/javascript/dashboard/routes/dashboard/settings/auditlogs/Index.vue b/app/javascript/dashboard/routes/dashboard/settings/auditlogs/Index.vue index c6df5a87a..baaa90145 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/auditlogs/Index.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/auditlogs/Index.vue @@ -1,116 +1,104 @@ - diff --git a/app/javascript/dashboard/routes/dashboard/settings/auditlogs/audit.routes.js b/app/javascript/dashboard/routes/dashboard/settings/auditlogs/audit.routes.js index acf061288..51561ca0c 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/auditlogs/audit.routes.js +++ b/app/javascript/dashboard/routes/dashboard/settings/auditlogs/audit.routes.js @@ -1,18 +1,13 @@ import { frontendURL } from '../../../../helper/URLHelper'; -const SettingsContent = () => import('../Wrapper.vue'); +const SettingsWrapper = () => import('../SettingsWrapper.vue'); const AuditLogsHome = () => import('./Index.vue'); export default { routes: [ { - path: frontendURL('accounts/:accountId/settings/audit-log'), - component: SettingsContent, - props: { - headerTitle: 'AUDIT_LOGS.HEADER', - icon: 'key', - showNewButton: false, - }, + path: frontendURL('accounts/:accountId/settings/audit-logs'), + component: SettingsWrapper, children: [ { path: '',