|
-
-
-
+
{{ $t('NOTIFICATIONS_PAGE.LIST.LOADING_MESSAGE') }}
-
-
+
+
+
+ {{ $t('ATTRIBUTES_MGMT.HEADER_BTN_TXT') }}
+
+
+
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/auditlogs/Index.vue b/app/javascript/dashboard/routes/dashboard/settings/auditlogs/Index.vue
index 414ea7911..baaa90145 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/auditlogs/Index.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/auditlogs/Index.vue
@@ -1,43 +1,104 @@
-
-
-
-
-
-
- {{ $t('AUDIT_LOGS.LIST.404') }}
-
-
+
+
+
+
+
+
+
+
+
+ {{ $t('AUDIT_LOGS.LIST.404') }}
+
+
+
-
|
{{ thHeader }}
|
-
+
- |
+ |
{{ generateLogText(auditLogItem) }}
|
-
+ |
{{
messageTimestamp(
auditLogItem.created_at,
@@ -45,93 +106,20 @@
)
}}
|
-
+ |
{{ auditLogItem.remote_address }}
|
+
-
-
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: '',
diff --git a/app/javascript/dashboard/routes/dashboard/settings/automation/AddAutomationRule.vue b/app/javascript/dashboard/routes/dashboard/settings/automation/AddAutomationRule.vue
index 152b55aae..63c352dbb 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/automation/AddAutomationRule.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/automation/AddAutomationRule.vue
@@ -1,156 +1,17 @@
-
-
-
-
-
-
-
-
-
-
- {{ $t('AUTOMATION.FORM.RESET_MESSAGE') }}
-
-
-
-
-
-
-
-
-
- {{ $t('AUTOMATION.ADD.CONDITION_BUTTON_LABEL') }}
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('AUTOMATION.ADD.ACTION_BUTTON_LABEL') }}
-
-
-
-
-
-
-
-
- {{ $t('AUTOMATION.ADD.CANCEL_BUTTON_TEXT') }}
-
-
- {{ $t('AUTOMATION.ADD.SUBMIT') }}
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ {{ $t('AUTOMATION.FORM.RESET_MESSAGE') }}
+
+
+
+
+
+
+
+
+
+ {{ $t('AUTOMATION.ADD.CONDITION_BUTTON_LABEL') }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('AUTOMATION.ADD.ACTION_BUTTON_LABEL') }}
+
+
+
+
+
+
+
+
+ {{ $t('AUTOMATION.ADD.CANCEL_BUTTON_TEXT') }}
+
+
+ {{ $t('AUTOMATION.ADD.SUBMIT') }}
+
+
+
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/automation/AutomationRuleRow.vue b/app/javascript/dashboard/routes/dashboard/settings/automation/AutomationRuleRow.vue
new file mode 100644
index 000000000..950819193
--- /dev/null
+++ b/app/javascript/dashboard/routes/dashboard/settings/automation/AutomationRuleRow.vue
@@ -0,0 +1,79 @@
+
+
+
+
+ | {{ automation.name }} |
+ {{ automation.description }} |
+
+
+ |
+
+ {{ readableDate(automation.created_on) }}
+ |
+
+
+
+
+
+
+ |
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/automation/EditAutomationRule.vue b/app/javascript/dashboard/routes/dashboard/settings/automation/EditAutomationRule.vue
index 1b2b5a9fe..b7e913cad 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/automation/EditAutomationRule.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/automation/EditAutomationRule.vue
@@ -1,153 +1,18 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('AUTOMATION.ADD.CONDITION_BUTTON_LABEL') }}
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('AUTOMATION.ADD.ACTION_BUTTON_LABEL') }}
-
-
-
-
-
-
-
-
- {{ $t('AUTOMATION.EDIT.CANCEL_BUTTON_TEXT') }}
-
-
- {{ $t('AUTOMATION.EDIT.SUBMIT') }}
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('AUTOMATION.ADD.CONDITION_BUTTON_LABEL') }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('AUTOMATION.ADD.ACTION_BUTTON_LABEL') }}
+
+
+
+
+
+
+
+
+ {{ $t('AUTOMATION.EDIT.CANCEL_BUTTON_TEXT') }}
+
+
+ {{ $t('AUTOMATION.EDIT.SUBMIT') }}
+
+
+
+
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/integrations/DashboardApps/Index.vue b/app/javascript/dashboard/routes/dashboard/settings/integrations/DashboardApps/Index.vue
index 5c94793c0..3c67dfdcf 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/integrations/DashboardApps/Index.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/integrations/DashboardApps/Index.vue
@@ -1,99 +1,18 @@
-
-
-
- {{ $t('INTEGRATION_SETTINGS.DASHBOARD_APPS.HEADER_BTN_TXT') }}
-
-
-
-
- {{ $t('INTEGRATION_SETTINGS.DASHBOARD_APPS.LIST.404') }}
-
-
-
-
- |
- {{ thHeader }}
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ {{ $t('INTEGRATION_SETTINGS.DASHBOARD_APPS.HEADER_BTN_TXT') }}
+
+
+
+
+
+ {{ $t('INTEGRATION_SETTINGS.DASHBOARD_APPS.LIST.404') }}
+
+
+
+
+ |
+ {{ thHeader }}
+ |
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/integrations/Index.vue b/app/javascript/dashboard/routes/dashboard/settings/integrations/Index.vue
index 5ab8cd74b..6a79ca325 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/integrations/Index.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/integrations/Index.vue
@@ -1,58 +1,51 @@
+
+
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
+ :logo="item.logo"
+ :name="item.name"
+ :description="item.description"
+ :enabled="item.enabled"
+ />
-
-
+
+
-
diff --git a/app/javascript/dashboard/routes/dashboard/settings/integrations/Integration.vue b/app/javascript/dashboard/routes/dashboard/settings/integrations/Integration.vue
index 32e239fea..6c6f5f5be 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/integrations/Integration.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/integrations/Integration.vue
@@ -1,14 +1,75 @@
+
+
-
+
-
+
{{ integrationName }}
@@ -49,7 +110,7 @@
@@ -71,67 +132,3 @@
/>
-
diff --git a/app/javascript/dashboard/routes/dashboard/settings/integrations/IntegrationHelpText.vue b/app/javascript/dashboard/routes/dashboard/settings/integrations/IntegrationHelpText.vue
deleted file mode 100644
index 21b13ca58..000000000
--- a/app/javascript/dashboard/routes/dashboard/settings/integrations/IntegrationHelpText.vue
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/app/javascript/dashboard/routes/dashboard/settings/integrationapps/IntegrationHooks.vue b/app/javascript/dashboard/routes/dashboard/settings/integrations/IntegrationHooks.vue
similarity index 81%
rename from app/javascript/dashboard/routes/dashboard/settings/integrationapps/IntegrationHooks.vue
rename to app/javascript/dashboard/routes/dashboard/settings/integrations/IntegrationHooks.vue
index 96819bcab..0f8b9155e 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/integrationapps/IntegrationHooks.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/integrations/IntegrationHooks.vue
@@ -1,51 +1,8 @@
-
-
-
- {{ $t('INTEGRATION_APPS.ADD_BUTTON') }}
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ {{ $t('INTEGRATION_APPS.ADD_BUTTON') }}
+
+
+
+
+
+
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/integrations/IntegrationItem.vue b/app/javascript/dashboard/routes/dashboard/settings/integrations/IntegrationItem.vue
new file mode 100644
index 000000000..7162596a2
--- /dev/null
+++ b/app/javascript/dashboard/routes/dashboard/settings/integrations/IntegrationItem.vue
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+ ![]()
+ ![]()
+
+
+
+
+
+ {{ name }}
+
+
+ {{ $t('INTEGRATION_APPS.CONFIGURE') }}
+
+
+
+
+ {{ useInstallationName(description, globalConfig.installationName) }}
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/integrationapps/MultipleIntegrationHooks.vue b/app/javascript/dashboard/routes/dashboard/settings/integrations/MultipleIntegrationHooks.vue
similarity index 88%
rename from app/javascript/dashboard/routes/dashboard/settings/integrationapps/MultipleIntegrationHooks.vue
rename to app/javascript/dashboard/routes/dashboard/settings/integrations/MultipleIntegrationHooks.vue
index aea851ee7..e80c8fa2b 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/integrationapps/MultipleIntegrationHooks.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/integrations/MultipleIntegrationHooks.vue
@@ -1,3 +1,48 @@
+
+
-
diff --git a/app/javascript/dashboard/routes/dashboard/settings/integrationapps/NewHook.vue b/app/javascript/dashboard/routes/dashboard/settings/integrations/NewHook.vue
similarity index 89%
rename from app/javascript/dashboard/routes/dashboard/settings/integrationapps/NewHook.vue
rename to app/javascript/dashboard/routes/dashboard/settings/integrations/NewHook.vue
index 454f03dac..935268592 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/integrationapps/NewHook.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/integrations/NewHook.vue
@@ -1,55 +1,23 @@
-
-
-
-
-
-
-
-
- {{ $t('INTEGRATION_APPS.ADD.FORM.SUBMIT') }}
-
-
- {{ $t('INTEGRATION_APPS.ADD.FORM.CANCEL') }}
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ {{ $t('INTEGRATION_APPS.ADD.FORM.SUBMIT') }}
+
+
+ {{ $t('INTEGRATION_APPS.ADD.FORM.CANCEL') }}
+
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/integrations/ShowIntegration.vue b/app/javascript/dashboard/routes/dashboard/settings/integrations/ShowIntegration.vue
index d9f5e5d9e..6b86dcf82 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/integrations/ShowIntegration.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/integrations/ShowIntegration.vue
@@ -1,34 +1,4 @@
-
-
-
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/integrationapps/SingleIntegrationHooks.vue b/app/javascript/dashboard/routes/dashboard/settings/integrations/SingleIntegrationHooks.vue
similarity index 62%
rename from app/javascript/dashboard/routes/dashboard/settings/integrationapps/SingleIntegrationHooks.vue
rename to app/javascript/dashboard/routes/dashboard/settings/integrations/SingleIntegrationHooks.vue
index 3f8dfccea..cd17058c3 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/integrationapps/SingleIntegrationHooks.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/integrations/SingleIntegrationHooks.vue
@@ -1,14 +1,36 @@
+
+
![]()
+
@@ -40,15 +62,3 @@
-
diff --git a/app/javascript/dashboard/routes/dashboard/settings/integrations/Slack.vue b/app/javascript/dashboard/routes/dashboard/settings/integrations/Slack.vue
index 24dc2993a..d82adda9d 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/integrations/Slack.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/integrations/Slack.vue
@@ -1,44 +1,7 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/integrations/Slack/SelectChannelWarning.vue b/app/javascript/dashboard/routes/dashboard/settings/integrations/Slack/SelectChannelWarning.vue
index 6c698898d..8267a6c52 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/integrations/Slack/SelectChannelWarning.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/integrations/Slack/SelectChannelWarning.vue
@@ -1,90 +1,23 @@
-
-
-
-
-
-
-
-
- {{
- $t('INTEGRATION_SETTINGS.SLACK.SELECT_CHANNEL.ATTENTION_REQUIRED')
- }}
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ {{
+ $t('INTEGRATION_SETTINGS.SLACK.SELECT_CHANNEL.ATTENTION_REQUIRED')
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/integrations/Slack/SlackIntegrationHelpText.vue b/app/javascript/dashboard/routes/dashboard/settings/integrations/Slack/SlackIntegrationHelpText.vue
index 9a0476f13..ee6cad7e2 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/integrations/Slack/SlackIntegrationHelpText.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/integrations/Slack/SlackIntegrationHelpText.vue
@@ -1,3 +1,21 @@
+
+
-
diff --git a/app/javascript/dashboard/routes/dashboard/settings/integrations/Webhooks/EditWebHook.vue b/app/javascript/dashboard/routes/dashboard/settings/integrations/Webhooks/EditWebHook.vue
index 739ec467c..c9b315443 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/integrations/Webhooks/EditWebHook.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/integrations/Webhooks/EditWebHook.vue
@@ -1,26 +1,10 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/integrations/Webhooks/Index.vue b/app/javascript/dashboard/routes/dashboard/settings/integrations/Webhooks/Index.vue
index d1ee7ba9b..e9ec855dc 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/integrations/Webhooks/Index.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/integrations/Webhooks/Index.vue
@@ -1,99 +1,8 @@
-
-
-
- {{ $t('INTEGRATION_SETTINGS.WEBHOOK.HEADER_BTN_TXT') }}
-
-
-
-
-
- {{ $t('INTEGRATION_SETTINGS.WEBHOOK.LIST.404') }}
-
-
-
-
-
- |
- {{ thHeader }}
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ {{ $t('INTEGRATION_SETTINGS.WEBHOOK.HEADER_BTN_TXT') }}
+
+
+
+
+
+ {{ $t('INTEGRATION_SETTINGS.WEBHOOK.LIST.404') }}
+
+
+
+
+
+ |
+ {{ thHeader }}
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/integrations/Webhooks/NewWebHook.vue b/app/javascript/dashboard/routes/dashboard/settings/integrations/Webhooks/NewWebHook.vue
index 6fd7ec81b..43b1d2843 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/integrations/Webhooks/NewWebHook.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/integrations/Webhooks/NewWebHook.vue
@@ -1,32 +1,12 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/integrations/Webhooks/WebhookForm.vue b/app/javascript/dashboard/routes/dashboard/settings/integrations/Webhooks/WebhookForm.vue
index a917ddec5..d399adbdd 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/integrations/Webhooks/WebhookForm.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/integrations/Webhooks/WebhookForm.vue
@@ -1,61 +1,6 @@
-
-
-
-
+
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/labels/labels.routes.js b/app/javascript/dashboard/routes/dashboard/settings/labels/labels.routes.js
index 088c565d0..9f5edc2dd 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/labels/labels.routes.js
+++ b/app/javascript/dashboard/routes/dashboard/settings/labels/labels.routes.js
@@ -1,18 +1,13 @@
import { frontendURL } from '../../../../helper/URLHelper';
-const SettingsContent = () => import('../Wrapper.vue');
+const SettingsWrapper = () => import('../SettingsWrapper.vue');
const Index = () => import('./Index.vue');
export default {
routes: [
{
path: frontendURL('accounts/:accountId/settings/labels'),
- component: SettingsContent,
- props: {
- headerTitle: 'LABEL_MGMT.HEADER',
- icon: 'tag',
- showNewButton: false,
- },
+ component: SettingsWrapper,
children: [
{
path: '',
diff --git a/app/javascript/dashboard/routes/dashboard/settings/labels/validations.js b/app/javascript/dashboard/routes/dashboard/settings/labels/validations.js
index 61a644b2b..32e3cfadb 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/labels/validations.js
+++ b/app/javascript/dashboard/routes/dashboard/settings/labels/validations.js
@@ -1,4 +1,4 @@
-import { required, minLength } from 'vuelidate/lib/validators';
+import { required, minLength } from '@vuelidate/validators';
export const validLabelCharacters = (str = '') => !!str && !str.includes(' ');
diff --git a/app/javascript/dashboard/routes/dashboard/settings/macros/Index.vue b/app/javascript/dashboard/routes/dashboard/settings/macros/Index.vue
index f32bb6f17..195f0e2f5 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/macros/Index.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/macros/Index.vue
@@ -1,112 +1,112 @@
-
-
-
-
-
- {{ $t('MACROS.HEADER_BTN_TXT') }}
-
-
-
-
-
-
- {{ $t('MACROS.LIST.404') }}
-
-
-
-
-
- |
- {{ thHeader }}
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ {{ $t('MACROS.HEADER_BTN_TXT') }}
+
+
+
+
+
+
+
+
+ |
+ {{ thHeader }}
+ |
+
+
+
+
+
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/macros/MacroEditor.vue b/app/javascript/dashboard/routes/dashboard/settings/macros/MacroEditor.vue
index 7c9f476e4..f29d822ff 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/macros/MacroEditor.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/macros/MacroEditor.vue
@@ -1,142 +1,137 @@
+
+
-
+
-
-
-
diff --git a/app/javascript/dashboard/routes/dashboard/settings/macros/MacroForm.vue b/app/javascript/dashboard/routes/dashboard/settings/macros/MacroForm.vue
index 3cebed550..d5dd35d74 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/macros/MacroForm.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/macros/MacroForm.vue
@@ -1,52 +1,32 @@
-
-
-
-
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/macros/MacroNodes.vue b/app/javascript/dashboard/routes/dashboard/settings/macros/MacroNodes.vue
index b67fb021e..c400ba628 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/macros/MacroNodes.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/macros/MacroNodes.vue
@@ -1,75 +1,18 @@
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('MACROS.EDITOR.ADD_BTN_TOOLTIP') }}
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('MACROS.EDITOR.ADD_BTN_TOOLTIP') }}
+
+
+
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/macros/macros.routes.js b/app/javascript/dashboard/routes/dashboard/settings/macros/macros.routes.js
index 06d0014b9..6f77e0c18 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/macros/macros.routes.js
+++ b/app/javascript/dashboard/routes/dashboard/settings/macros/macros.routes.js
@@ -1,6 +1,7 @@
import { frontendURL } from 'dashboard/helper/URLHelper';
const SettingsContent = () => import('../Wrapper.vue');
+const SettingsWrapper = () => import('../SettingsWrapper.vue');
const Macros = () => import('./Index.vue');
const MacroEditor = () => import('./MacroEditor.vue');
@@ -8,16 +9,7 @@ export default {
routes: [
{
path: frontendURL('accounts/:accountId/settings/macros'),
- component: SettingsContent,
- props: params => {
- const showBackButton = params.name !== 'macros_wrapper';
- return {
- headerTitle: 'MACROS.HEADER',
- headerButtonText: 'MACROS.HEADER_BTN_TXT',
- icon: 'flash-settings',
- showBackButton,
- };
- },
+ component: SettingsWrapper,
children: [
{
path: '',
@@ -27,6 +19,27 @@ export default {
permissions: ['administrator', 'agent'],
},
},
+ ],
+ },
+ {
+ path: frontendURL('accounts/:accountId/settings/macros'),
+ component: SettingsContent,
+ props: () => {
+ return {
+ headerTitle: 'MACROS.HEADER',
+ icon: 'flash-settings',
+ showBackButton: true,
+ };
+ },
+ children: [
+ {
+ path: ':macroId/edit',
+ name: 'macros_edit',
+ component: MacroEditor,
+ meta: {
+ permissions: ['administrator', 'agent'],
+ },
+ },
{
path: 'new',
name: 'macros_new',
@@ -35,14 +48,6 @@ export default {
permissions: ['administrator', 'agent'],
},
},
- {
- path: ':macroId/edit',
- name: 'macros_edit',
- component: MacroEditor,
- meta: {
- permissions: ['administrator', 'agent'],
- },
- },
],
},
],
diff --git a/app/javascript/dashboard/routes/dashboard/settings/profile/AccessToken.vue b/app/javascript/dashboard/routes/dashboard/settings/profile/AccessToken.vue
index 93b6fcb23..683c848e9 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/profile/AccessToken.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/profile/AccessToken.vue
@@ -1,3 +1,27 @@
+
+
-
{{ $t('PROFILE_SETTINGS.FORM.ACCESS_TOKEN.COPY') }}
-
+
-
diff --git a/app/javascript/dashboard/routes/dashboard/settings/profile/AudioAlertCondition.vue b/app/javascript/dashboard/routes/dashboard/settings/profile/AudioAlertCondition.vue
index ead4b77f2..18ae1c07e 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/profile/AudioAlertCondition.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/profile/AudioAlertCondition.vue
@@ -1,3 +1,21 @@
+
+
-
diff --git a/app/javascript/dashboard/routes/dashboard/settings/profile/AudioAlertEvent.vue b/app/javascript/dashboard/routes/dashboard/settings/profile/AudioAlertEvent.vue
index 41d25b522..ddc6545f6 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/profile/AudioAlertEvent.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/profile/AudioAlertEvent.vue
@@ -1,3 +1,30 @@
+
+
-
-
diff --git a/app/javascript/dashboard/routes/dashboard/settings/profile/AudioAlertTone.vue b/app/javascript/dashboard/routes/dashboard/settings/profile/AudioAlertTone.vue
index 3246e12af..232a7a74a 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/profile/AudioAlertTone.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/profile/AudioAlertTone.vue
@@ -1,23 +1,3 @@
-
-
-
-
-
+
+
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/profile/AudioNotifications.vue b/app/javascript/dashboard/routes/dashboard/settings/profile/AudioNotifications.vue
index 84f369f5a..f09432f83 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/profile/AudioNotifications.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/profile/AudioNotifications.vue
@@ -1,38 +1,6 @@
-
-
-
-
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/profile/ChangePassword.vue b/app/javascript/dashboard/routes/dashboard/settings/profile/ChangePassword.vue
index 0c2fa9e78..b6c93a126 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/profile/ChangePassword.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/profile/ChangePassword.vue
@@ -1,74 +1,17 @@
-
-
-
-
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/profile/HotKeyCard.vue b/app/javascript/dashboard/routes/dashboard/settings/profile/HotKeyCard.vue
index 35cbbeb7b..540b405d1 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/profile/HotKeyCard.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/profile/HotKeyCard.vue
@@ -1,3 +1,28 @@
+
+
-
-
diff --git a/app/javascript/dashboard/routes/dashboard/settings/profile/Index.vue b/app/javascript/dashboard/routes/dashboard/settings/profile/Index.vue
index 45ec109aa..1f37a1355 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/profile/Index.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/profile/Index.vue
@@ -1,95 +1,10 @@
-
-
-
-
- {{ $t('PROFILE_SETTINGS.TITLE') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ $t('PROFILE_SETTINGS.TITLE') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/profile/MessageSignature.vue b/app/javascript/dashboard/routes/dashboard/settings/profile/MessageSignature.vue
index a86b4fa5c..2d149755c 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/profile/MessageSignature.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/profile/MessageSignature.vue
@@ -1,25 +1,3 @@
-
-
-
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/profile/NotificationCheckBox.vue b/app/javascript/dashboard/routes/dashboard/settings/profile/NotificationCheckBox.vue
index feb180014..4cd512055 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/profile/NotificationCheckBox.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/profile/NotificationCheckBox.vue
@@ -1,18 +1,3 @@
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/profile/NotificationPreferences.vue b/app/javascript/dashboard/routes/dashboard/settings/profile/NotificationPreferences.vue
index 986ff9aca..8e49a4366 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/profile/NotificationPreferences.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/profile/NotificationPreferences.vue
@@ -1,3 +1,137 @@
+
+
@@ -5,23 +139,23 @@
-
{{ $t('PROFILE_SETTINGS.FORM.NOTIFICATIONS.TYPE_TITLE') }}
-
-
+
{{ $t('PROFILE_SETTINGS.FORM.NOTIFICATIONS.EMAIL') }}
-
-
+
@@ -32,7 +166,7 @@
{{ $t('PROFILE_SETTINGS.FORM.NOTIFICATIONS.PUSH') }}
-
+
-
-
-
diff --git a/app/javascript/dashboard/routes/dashboard/settings/profile/UserBasicDetails.vue b/app/javascript/dashboard/routes/dashboard/settings/profile/UserBasicDetails.vue
index 1a0fb2eae..4b7580d3e 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/profile/UserBasicDetails.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/profile/UserBasicDetails.vue
@@ -1,60 +1,12 @@
-
-
-
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/profile/UserProfilePicture.vue b/app/javascript/dashboard/routes/dashboard/settings/profile/UserProfilePicture.vue
index d4ab08bc1..87ac25efa 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/profile/UserProfilePicture.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/profile/UserProfilePicture.vue
@@ -1,16 +1,3 @@
-
-
-
- {{ $t('PROFILE_SETTINGS.FORM.PICTURE') }}
-
-
-
-
+
+
+
+
+ {{ $t('PROFILE_SETTINGS.FORM.PICTURE') }}
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/profile/Wrapper.vue b/app/javascript/dashboard/routes/dashboard/settings/profile/Wrapper.vue
index f0931afdc..90c725952 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/profile/Wrapper.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/profile/Wrapper.vue
@@ -1,3 +1,12 @@
+
+
-
-
diff --git a/app/javascript/dashboard/routes/dashboard/settings/reports/AgentReports.vue b/app/javascript/dashboard/routes/dashboard/settings/reports/AgentReports.vue
index 68911721b..7a7374994 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/reports/AgentReports.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/reports/AgentReports.vue
@@ -1,13 +1,3 @@
-
-
-
-
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/reports/BotReports.vue b/app/javascript/dashboard/routes/dashboard/settings/reports/BotReports.vue
index a75051aaf..78b433a42 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/reports/BotReports.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/reports/BotReports.vue
@@ -1,26 +1,8 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/reports/CsatResponses.vue b/app/javascript/dashboard/routes/dashboard/settings/reports/CsatResponses.vue
index e16da9182..df2ab7d7a 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/reports/CsatResponses.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/reports/CsatResponses.vue
@@ -1,34 +1,12 @@
-
-
-
-
- {{ $t('CSAT_REPORTS.DOWNLOAD') }}
-
-
-
-
-
+
+
+
+
+
+ {{ $t('CSAT_REPORTS.DOWNLOAD') }}
+
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/reports/InboxReports.vue b/app/javascript/dashboard/routes/dashboard/settings/reports/InboxReports.vue
index f055a9a4f..96d573829 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/reports/InboxReports.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/reports/InboxReports.vue
@@ -1,13 +1,3 @@
-
-
-
-
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/reports/Index.vue b/app/javascript/dashboard/routes/dashboard/settings/reports/Index.vue
index 528053c57..da2f2f232 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/reports/Index.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/reports/Index.vue
@@ -1,30 +1,9 @@
-
-
-
- {{ $t('REPORT.DOWNLOAD_AGENT_REPORTS') }}
-
-
-
-
-
-
+
+
+
+
+ {{ $t('REPORT.DOWNLOAD_AGENT_REPORTS') }}
+
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/reports/LabelReports.vue b/app/javascript/dashboard/routes/dashboard/settings/reports/LabelReports.vue
index 77a010846..d3792bd79 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/reports/LabelReports.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/reports/LabelReports.vue
@@ -1,13 +1,3 @@
-
-
-
-
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/reports/LiveReports.vue b/app/javascript/dashboard/routes/dashboard/settings/reports/LiveReports.vue
index ae709db41..8f59f2229 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/reports/LiveReports.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/reports/LiveReports.vue
@@ -1,75 +1,3 @@
-
-
-
-
-
-
-
- {{ name }}
-
- {{ metric }}
-
-
-
-
-
-
-
- {{ name }}
-
- {{ metric }}
-
-
-
-
-
-
-
-
- Download Report
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ {{ name }}
+
+ {{ metric }}
+
+
+
+
+
+
+
+ {{ name }}
+
+ {{ metric }}
+
+
+
+
+
+
+
+
+ {{ $t('OVERVIEW_REPORTS.CONVERSATION_HEATMAP.DOWNLOAD_REPORT') }}
+
+
+
+
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/reports/ReportContainer.vue b/app/javascript/dashboard/routes/dashboard/settings/reports/ReportContainer.vue
index 273f814b7..fc323d037 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/reports/ReportContainer.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/reports/ReportContainer.vue
@@ -1,51 +1,23 @@
-
-
-
-
-
-
-
-
-
- {{ $t('REPORT.NO_ENOUGH_DATA') }}
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ {{ $t('REPORT.NO_ENOUGH_DATA') }}
+
+
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/reports/SLAReports.vue b/app/javascript/dashboard/routes/dashboard/settings/reports/SLAReports.vue
index a9958d905..c2065babf 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/reports/SLAReports.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/reports/SLAReports.vue
@@ -1,36 +1,8 @@
-
-
-
-
- {{ $t('SLA_REPORTS.DOWNLOAD_SLA_REPORTS') }}
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ $t('SLA_REPORTS.DOWNLOAD_SLA_REPORTS') }}
+
+
+
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/reports/TeamReports.vue b/app/javascript/dashboard/routes/dashboard/settings/reports/TeamReports.vue
index d920404c1..523186b8d 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/reports/TeamReports.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/reports/TeamReports.vue
@@ -1,13 +1,3 @@
-
-
-
-
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/reports/components/BotMetrics.vue b/app/javascript/dashboard/routes/dashboard/settings/reports/components/BotMetrics.vue
index 46227f945..fe8e30ba8 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/reports/components/BotMetrics.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/reports/components/BotMetrics.vue
@@ -40,25 +40,25 @@ onMounted(fetchMetrics);
-
-
-
-
+import { useReportMetrics } from 'dashboard/composables/useReportMetrics';
+
+const props = defineProps({
+ metric: {
+ type: Object,
+ default: () => ({}),
+ },
+ accountSummaryKey: {
+ type: String,
+ default: 'getAccountSummary',
+ },
+});
+
+const { calculateTrend, displayMetric, isAverageMetricType } = useReportMetrics(
+ props.accountSummaryKey
+);
+
+const trendColor = (value, key) => {
+ if (isAverageMetricType(key)) {
+ return value > 0
+ ? 'border-red-500 text-red-500'
+ : 'border-green-500 text-green-500';
+ }
+ return value < 0
+ ? 'border-red-500 text-red-500'
+ : 'border-green-500 text-green-500';
+};
+
+
{{ metric.NAME }}
-
+
{{ displayMetric(metric.KEY) }}
@@ -25,27 +55,3 @@
-
diff --git a/app/javascript/dashboard/routes/dashboard/settings/reports/components/CsatMetrics.vue b/app/javascript/dashboard/routes/dashboard/settings/reports/components/CsatMetrics.vue
index 77106e8d5..0f07c773c 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/reports/components/CsatMetrics.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/reports/components/CsatMetrics.vue
@@ -1,52 +1,3 @@
-
-
-
-
-
-
-
-
-
-
- {{ ratingToEmoji(key) }}
- {{ formatToPercent(rating) }}
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ratingToEmoji(key) }}
+ {{ formatToPercent(rating) }}
+
+
+
+
+
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/reports/components/CsatTable.vue b/app/javascript/dashboard/routes/dashboard/settings/reports/components/CsatTable.vue
index d78b97666..22c570cc0 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/reports/components/CsatTable.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/reports/components/CsatTable.vue
@@ -1,40 +1,15 @@
-
-
-
-
- {{ $t('CSAT_REPORTS.NO_RECORDS') }}
-
-
-
-
+
+
+
+
+
+ {{ $t('CSAT_REPORTS.NO_RECORDS') }}
+
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/teams/TeamForm.vue b/app/javascript/dashboard/routes/dashboard/settings/teams/TeamForm.vue
index 1f1f7ceb3..66c445fbe 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/teams/TeamForm.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/teams/TeamForm.vue
@@ -1,48 +1,7 @@
-
-
-
-
+
+
+
+
diff --git a/app/javascript/dashboard/routes/dashboard/settings/teams/helpers/validations.js b/app/javascript/dashboard/routes/dashboard/settings/teams/helpers/validations.js
index 3f063a0c4..dcb6ca648 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/teams/helpers/validations.js
+++ b/app/javascript/dashboard/routes/dashboard/settings/teams/helpers/validations.js
@@ -1,4 +1,4 @@
-import { required, minLength } from 'vuelidate/lib/validators';
+import { required, minLength } from '@vuelidate/validators';
export default {
title: {
diff --git a/app/javascript/dashboard/routes/dashboard/settings/teams/teams.routes.js b/app/javascript/dashboard/routes/dashboard/settings/teams/teams.routes.js
index c968351f4..cb0e96785 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/teams/teams.routes.js
+++ b/app/javascript/dashboard/routes/dashboard/settings/teams/teams.routes.js
@@ -1,6 +1,6 @@
-/* eslint arrow-body-style: 0 */
import { frontendURL } from '../../../../helper/URLHelper';
+const TeamsIndex = () => import('./Index.vue');
const CreateStepWrap = () => import('./Create/Index.vue');
const EditStepWrap = () => import('./Edit/Index.vue');
const CreateTeam = () => import('./Create/CreateTeam.vue');
@@ -9,23 +9,13 @@ const AddAgents = () => import('./Create/AddAgents.vue');
const EditAgents = () => import('./Edit/EditAgents.vue');
const FinishSetup = () => import('./FinishSetup.vue');
const SettingsContent = () => import('../Wrapper.vue');
-const TeamsHome = () => import('./Index.vue');
+const SettingsWrapper = () => import('../SettingsWrapper.vue');
export default {
routes: [
{
path: frontendURL('accounts/:accountId/settings/teams'),
- component: SettingsContent,
- props: params => {
- const showBackButton = params.name !== 'settings_teams_list';
- return {
- headerTitle: 'TEAMS_SETTINGS.HEADER',
- headerButtonText: 'TEAMS_SETTINGS.NEW_TEAM',
- icon: 'people-team',
- newButtonRoutes: ['settings_teams_new'],
- showBackButton,
- };
- },
+ component: SettingsWrapper,
children: [
{
path: '',
@@ -34,11 +24,26 @@ export default {
{
path: 'list',
name: 'settings_teams_list',
- component: TeamsHome,
+ component: TeamsIndex,
meta: {
permissions: ['administrator'],
},
},
+ ],
+ },
+ {
+ path: frontendURL('accounts/:accountId/settings/teams'),
+ component: SettingsContent,
+ props: () => {
+ return {
+ headerTitle: 'TEAMS_SETTINGS.HEADER',
+ headerButtonText: 'TEAMS_SETTINGS.NEW_TEAM',
+ icon: 'people-team',
+ newButtonRoutes: ['settings_teams_new'],
+ showBackButton: true,
+ };
+ },
+ children: [
{
path: 'new',
component: CreateStepWrap,
diff --git a/app/javascript/dashboard/routes/dashboard/suspended/Index.vue b/app/javascript/dashboard/routes/dashboard/suspended/Index.vue
index 550a02a23..c52a32a1f 100644
--- a/app/javascript/dashboard/routes/dashboard/suspended/Index.vue
+++ b/app/javascript/dashboard/routes/dashboard/suspended/Index.vue
@@ -22,7 +22,7 @@ onMounted(() => {
-
diff --git a/app/javascript/dashboard/routes/index.spec.js b/app/javascript/dashboard/routes/index.spec.js
index a169f8b76..ac67e8f2e 100644
--- a/app/javascript/dashboard/routes/index.spec.js
+++ b/app/javascript/dashboard/routes/index.spec.js
@@ -34,8 +34,14 @@ describe('#validateAuthenticateRoutePermission', () => {
getCurrentUser: {
account_id: 1,
id: 1,
- permissions: ['agent'],
- accounts: [{ id: 1, role: 'agent', status: 'active' }],
+ accounts: [
+ {
+ permissions: ['agent'],
+ id: 1,
+ role: 'agent',
+ status: 'active',
+ },
+ ],
},
};
validateAuthenticateRoutePermission(to, next, { getters });
@@ -55,8 +61,14 @@ describe('#validateAuthenticateRoutePermission', () => {
getCurrentUser: {
account_id: 1,
id: 1,
- permissions: ['administrator'],
- accounts: [{ id: 1, role: 'administrator', status: 'active' }],
+ accounts: [
+ {
+ id: 1,
+ role: 'administrator',
+ permissions: ['administrator'],
+ status: 'active',
+ },
+ ],
},
};
validateAuthenticateRoutePermission(to, next, { getters });
diff --git a/app/javascript/dashboard/store/modules/accounts.js b/app/javascript/dashboard/store/modules/accounts.js
index c757b7fcb..fb2c8b89f 100644
--- a/app/javascript/dashboard/store/modules/accounts.js
+++ b/app/javascript/dashboard/store/modules/accounts.js
@@ -4,6 +4,7 @@ import AccountAPI from '../../api/account';
import { differenceInDays } from 'date-fns';
import EnterpriseAccountAPI from '../../api/enterprise/account';
import { throwErrorMessage } from '../utils/api';
+import { getLanguageDirection } from 'dashboard/components/widgets/conversation/advancedFilterItems/languages';
const findRecordById = ($state, id) =>
$state.records.find(record => record.id === Number(id)) || {};
@@ -27,6 +28,13 @@ export const getters = {
getUIFlags($state) {
return $state.uiFlags;
},
+ isRTL: ($state, _, rootState) => {
+ const accountId = rootState.route?.params?.accountId;
+ if (!accountId) return false;
+
+ const { locale } = findRecordById($state, Number(accountId));
+ return locale ? getLanguageDirection(locale) : false;
+ },
isTrialAccount: $state => id => {
const account = findRecordById($state, id);
const createdAt = new Date(account.created_at);
diff --git a/app/javascript/dashboard/store/modules/automations.js b/app/javascript/dashboard/store/modules/automations.js
index df3bf6f6a..e36a2f4a4 100644
--- a/app/javascript/dashboard/store/modules/automations.js
+++ b/app/javascript/dashboard/store/modules/automations.js
@@ -15,7 +15,7 @@ export const state = {
export const getters = {
getAutomations(_state) {
- return _state.records;
+ return _state.records.sort((a1, a2) => a1.id - a2.id);
},
getUIFlags(_state) {
return _state.uiFlags;
diff --git a/app/javascript/dashboard/store/modules/cannedResponse.js b/app/javascript/dashboard/store/modules/cannedResponse.js
index 7b24d1171..568150392 100644
--- a/app/javascript/dashboard/store/modules/cannedResponse.js
+++ b/app/javascript/dashboard/store/modules/cannedResponse.js
@@ -18,6 +18,15 @@ const getters = {
getCannedResponses(_state) {
return _state.records;
},
+ getSortedCannedResponses(_state) {
+ return sortOrder =>
+ [..._state.records].sort((a, b) => {
+ if (sortOrder === 'asc') {
+ return a.short_code.localeCompare(b.short_code);
+ }
+ return b.short_code.localeCompare(a.short_code);
+ });
+ },
getUIFlags(_state) {
return _state.uiFlags;
},
diff --git a/app/javascript/dashboard/store/modules/conversations/actions.js b/app/javascript/dashboard/store/modules/conversations/actions.js
index 6a8b94e1e..eaf385372 100644
--- a/app/javascript/dashboard/store/modules/conversations/actions.js
+++ b/app/javascript/dashboard/store/modules/conversations/actions.js
@@ -12,6 +12,7 @@ import {
} from './helpers/actionHelpers';
import messageReadActions from './actions/messageReadActions';
import messageTranslateActions from './actions/messageTranslateActions';
+import * as Sentry from '@sentry/browser';
export const hasMessageFailedWithExternalError = pendingMessage => {
// This helper is used to check if the message has failed with an external error.
@@ -100,14 +101,24 @@ const actions = {
},
fetchAllAttachments: async ({ commit }, conversationId) => {
+ let attachments = null;
+
try {
const { data } = await ConversationApi.getAllAttachments(conversationId);
+ attachments = data.payload;
+ } catch (error) {
+ // in case of error, log the error and continue
+ Sentry.setContext('Conversation', {
+ id: conversationId,
+ });
+ Sentry.captureException(error);
+ } finally {
+ // we run the commit even if the request fails
+ // this ensures that the `attachment` variable is always present on chat
commit(types.SET_ALL_ATTACHMENTS, {
id: conversationId,
- data: data.payload,
+ data: attachments,
});
- } catch (error) {
- // Handle error
}
},
diff --git a/app/javascript/dashboard/store/modules/conversations/getters.js b/app/javascript/dashboard/store/modules/conversations/getters.js
index 8c2070963..1a905c3c5 100644
--- a/app/javascript/dashboard/store/modules/conversations/getters.js
+++ b/app/javascript/dashboard/store/modules/conversations/getters.js
@@ -18,9 +18,8 @@ const getters = {
);
return selectedChat || {};
},
- getSelectedChatAttachments: (_state, _getters) => {
- const selectedChat = _getters.getSelectedChat;
- return selectedChat.attachments || [];
+ getSelectedChatAttachments: ({ selectedChatId, attachments }) => {
+ return attachments[selectedChatId] || [];
},
getChatListFilters: ({ conversationFilters }) => conversationFilters,
getLastEmailInSelectedChat: (stage, _getters) => {
diff --git a/app/javascript/dashboard/store/modules/conversations/index.js b/app/javascript/dashboard/store/modules/conversations/index.js
index 769354ed2..b3e39d397 100644
--- a/app/javascript/dashboard/store/modules/conversations/index.js
+++ b/app/javascript/dashboard/store/modules/conversations/index.js
@@ -10,6 +10,7 @@ import { emitter } from 'shared/helpers/mitt';
const state = {
allConversations: [],
+ attachments: {},
listLoadingStatus: true,
chatStatusFilter: wootConstants.STATUS_TYPE.OPEN,
chatSortFilter: wootConstants.SORT_BY_TYPE.LATEST,
@@ -48,7 +49,6 @@ export const mutations = {
allMessagesLoaded: existingConversation.allMessagesLoaded,
messages: existingConversation.messages,
dataFetched: existingConversation.dataFetched,
- attachments: existingConversation.attachments,
};
}
});
@@ -78,10 +78,10 @@ export const mutations = {
}
},
[types.SET_ALL_ATTACHMENTS](_state, { id, data }) {
- const [chat] = _state.allConversations.filter(c => c.id === id);
- if (!chat) return;
- Vue.set(chat, 'attachments', []);
- chat.attachments.push(...data);
+ const attachments = _state.attachments[id] || [];
+
+ attachments.push(...data);
+ _state.attachments[id] = [...attachments];
},
[types.SET_MISSING_MESSAGES](_state, { id, data }) {
const [chat] = _state.allConversations.filter(c => c.id === id);
@@ -144,42 +144,40 @@ export const mutations = {
Vue.set(chat, 'muted', false);
},
- [types.ADD_CONVERSATION_ATTACHMENTS]({ allConversations }, message) {
- const { conversation_id: conversationId } = message;
- const [chat] = getSelectedChatConversation({
- allConversations,
- selectedChatId: conversationId,
+ [types.ADD_CONVERSATION_ATTACHMENTS](_state, message) {
+ // early return if the message has not been sent, or has no attachments
+ if (
+ message.status !== MESSAGE_STATUS.SENT ||
+ !message.attachments?.length
+ ) {
+ return;
+ }
+
+ const id = message.conversation_id;
+ const existingAttachments = _state.attachments[id] || [];
+
+ const attachmentsToAdd = message.attachments.filter(attachment => {
+ // if the attachment is not already in the store, add it
+ // this is to prevent duplicates
+ return !existingAttachments.some(
+ existingAttachment => existingAttachment.id === attachment.id
+ );
});
- if (!chat) return;
-
- const isMessageSent =
- message.status === MESSAGE_STATUS.SENT && message.attachments;
- if (isMessageSent) {
- message.attachments.forEach(attachment => {
- if (!chat.attachments.some(a => a.id === attachment.id)) {
- chat.attachments.push(attachment);
- }
- });
- }
+ // replace the attachments in the store
+ _state.attachments[id] = [...existingAttachments, ...attachmentsToAdd];
},
- [types.DELETE_CONVERSATION_ATTACHMENTS]({ allConversations }, message) {
- const { conversation_id: conversationId } = message;
- const [chat] = getSelectedChatConversation({
- allConversations,
- selectedChatId: conversationId,
+ [types.DELETE_CONVERSATION_ATTACHMENTS](_state, message) {
+ if (message.status !== MESSAGE_STATUS.SENT) return;
+
+ const { conversation_id: id } = message;
+ const existingAttachments = _state.attachments[id] || [];
+ if (!existingAttachments.length) return;
+
+ _state.attachments[id] = existingAttachments.filter(attachment => {
+ return attachment.message_id !== message.id;
});
-
- if (!chat) return;
-
- const isMessageSent = message.status === MESSAGE_STATUS.SENT;
- if (isMessageSent) {
- const attachmentIndex = chat.attachments.findIndex(
- a => a.message_id === message.id
- );
- if (attachmentIndex !== -1) chat.attachments.splice(attachmentIndex, 1);
- }
},
[types.ADD_MESSAGE]({ allConversations, selectedChatId }, message) {
diff --git a/app/javascript/dashboard/store/modules/integrations.js b/app/javascript/dashboard/store/modules/integrations.js
index 3183afbe3..add8f022f 100644
--- a/app/javascript/dashboard/store/modules/integrations.js
+++ b/app/javascript/dashboard/store/modules/integrations.js
@@ -20,28 +20,18 @@ const state = {
},
};
-const isAValidAppIntegration = integration => {
- return [
- 'dialogflow',
- 'dyte',
- 'google_translate',
- 'openai',
- 'linear',
- ].includes(integration.id);
-};
export const getters = {
- getIntegrations($state) {
- return $state.records.filter(item => !isAValidAppIntegration(item));
- },
getAppIntegrations($state) {
- return $state.records.filter(item => isAValidAppIntegration(item));
- },
- getIntegration: $state => integrationId => {
- const [integration] = $state.records.filter(
- record => record.id === integrationId
- );
- return integration || {};
+ return $state.records;
},
+ getIntegration:
+ $state =>
+ (integrationId, defaultValue = {}) => {
+ const [integration] = $state.records.filter(
+ record => record.id === integrationId
+ );
+ return integration || defaultValue;
+ },
getUIFlags($state) {
return $state.uiFlags;
},
diff --git a/app/javascript/dashboard/store/modules/specs/account/getters.spec.js b/app/javascript/dashboard/store/modules/specs/account/getters.spec.js
index 676720c29..77cc9b357 100644
--- a/app/javascript/dashboard/store/modules/specs/account/getters.spec.js
+++ b/app/javascript/dashboard/store/modules/specs/account/getters.spec.js
@@ -1,4 +1,5 @@
import { getters } from '../../accounts';
+import * as languageHelpers from 'dashboard/components/widgets/conversation/advancedFilterItems/languages';
const accountData = {
id: 1,
@@ -46,4 +47,37 @@ describe('#getters', () => {
)(1, 'auto_resolve_conversations')
).toEqual(true);
});
+
+ describe('isRTL', () => {
+ it('returns false when accountId is not present', () => {
+ const rootState = { route: { params: {} } };
+ expect(getters.isRTL({}, null, rootState)).toBe(false);
+ });
+
+ it('returns true for RTL language', () => {
+ const state = {
+ records: [{ id: 1, locale: 'ar' }],
+ };
+ const rootState = { route: { params: { accountId: '1' } } };
+ vi.spyOn(languageHelpers, 'getLanguageDirection').mockReturnValue(true);
+ expect(getters.isRTL(state, null, rootState)).toBe(true);
+ });
+
+ it('returns false for LTR language', () => {
+ const state = {
+ records: [{ id: 1, locale: 'en' }],
+ };
+ const rootState = { route: { params: { accountId: '1' } } };
+ vi.spyOn(languageHelpers, 'getLanguageDirection').mockReturnValue(false);
+ expect(getters.isRTL(state, null, rootState)).toBe(false);
+ });
+
+ it('returns false when account is not found', () => {
+ const state = {
+ records: [],
+ };
+ const rootState = { route: { params: { accountId: '1' } } };
+ expect(getters.isRTL(state, null, rootState)).toBe(false);
+ });
+ });
});
diff --git a/app/javascript/dashboard/store/modules/specs/cannedResponses/getters.spec.js b/app/javascript/dashboard/store/modules/specs/cannedResponses/getters.spec.js
new file mode 100644
index 000000000..7a80aed8c
--- /dev/null
+++ b/app/javascript/dashboard/store/modules/specs/cannedResponses/getters.spec.js
@@ -0,0 +1,43 @@
+import CannedResponses from '../../cannedResponse';
+
+const CANNED_RESPONSES = [
+ { short_code: 'hello', content: 'Hi ' },
+ { short_code: 'ask', content: 'Ask questions' },
+ { short_code: 'greet', content: 'Good morning' },
+];
+
+const getters = CannedResponses.getters;
+
+describe('#getCannedResponses', () => {
+ it('returns canned responses', () => {
+ const state = { records: CANNED_RESPONSES };
+ expect(getters.getCannedResponses(state)).toEqual(CANNED_RESPONSES);
+ });
+});
+
+describe('#getSortedCannedResponses', () => {
+ it('returns sort canned responses in ascending order', () => {
+ const state = { records: CANNED_RESPONSES };
+ expect(getters.getSortedCannedResponses(state)('asc')).toEqual([
+ CANNED_RESPONSES[1],
+ CANNED_RESPONSES[2],
+ CANNED_RESPONSES[0],
+ ]);
+ });
+
+ it('returns sort canned responses in descending order', () => {
+ const state = { records: CANNED_RESPONSES };
+ expect(getters.getSortedCannedResponses(state)('desc')).toEqual([
+ CANNED_RESPONSES[0],
+ CANNED_RESPONSES[2],
+ CANNED_RESPONSES[1],
+ ]);
+ });
+});
+
+describe('#getUIFlags', () => {
+ it('returns uiFlags', () => {
+ const state = { uiFlags: { isFetching: true } };
+ expect(getters.getUIFlags(state)).toEqual({ isFetching: true });
+ });
+});
diff --git a/app/javascript/dashboard/store/modules/specs/conversations/getters.spec.js b/app/javascript/dashboard/store/modules/specs/conversations/getters.spec.js
index 3c3bf79de..cded29329 100644
--- a/app/javascript/dashboard/store/modules/specs/conversations/getters.spec.js
+++ b/app/javascript/dashboard/store/modules/specs/conversations/getters.spec.js
@@ -245,30 +245,18 @@ describe('#getters', () => {
describe('#getSelectedChatAttachments', () => {
it('Returns attachments in selected chat', () => {
- const state = {};
- const getSelectedChat = {
- attachments: [
- {
- id: 1,
- file_name: 'test1',
- },
- {
- id: 2,
- file_name: 'test2',
- },
+ const attachments = {
+ 1: [
+ { id: 1, file_name: 'test1' },
+ { id: 2, file_name: 'test2' },
],
};
+ const selectedChatId = 1;
expect(
- getters.getSelectedChatAttachments(state, { getSelectedChat })
+ getters.getSelectedChatAttachments({ selectedChatId, attachments })
).toEqual([
- {
- id: 1,
- file_name: 'test1',
- },
- {
- id: 2,
- file_name: 'test2',
- },
+ { id: 1, file_name: 'test1' },
+ { id: 2, file_name: 'test2' },
]);
});
});
diff --git a/app/javascript/dashboard/store/modules/specs/conversations/mutations.spec.js b/app/javascript/dashboard/store/modules/specs/conversations/mutations.spec.js
index de596534c..6340e4de9 100644
--- a/app/javascript/dashboard/store/modules/specs/conversations/mutations.spec.js
+++ b/app/javascript/dashboard/store/modules/specs/conversations/mutations.spec.js
@@ -313,7 +313,6 @@ describe('#mutations', () => {
{
id: 1,
messages: [{ id: 1, content: 'test' }],
- attachments: [{ id: 1, name: 'test1.png' }],
dataFetched: true,
allMessagesLoaded: true,
},
@@ -325,7 +324,6 @@ describe('#mutations', () => {
id: 1,
name: 'test',
messages: [{ id: 1, content: 'updated message' }],
- attachments: [{ id: 1, name: 'test.png' }],
dataFetched: true,
allMessagesLoaded: true,
},
@@ -335,7 +333,6 @@ describe('#mutations', () => {
id: 1,
name: 'test',
messages: [{ id: 1, content: 'test' }],
- attachments: [{ id: 1, name: 'test1.png' }],
dataFetched: true,
allMessagesLoaded: true,
},
@@ -371,25 +368,28 @@ describe('#mutations', () => {
it('set all attachments', () => {
const state = {
allConversations: [{ id: 1 }],
+ attachments: {},
};
const data = [{ id: 1, name: 'test' }];
mutations[types.SET_ALL_ATTACHMENTS](state, { id: 1, data });
- expect(state.allConversations[0].attachments).toEqual(data);
+ expect(state.attachments[1]).toEqual(data);
});
it('set attachments key even if the attachments are empty', () => {
const state = {
allConversations: [{ id: 1 }],
+ attachments: {},
};
const data = [];
mutations[types.SET_ALL_ATTACHMENTS](state, { id: 1, data });
- expect(state.allConversations[0].attachments).toEqual([]);
+ expect(state.attachments[1]).toEqual([]);
});
});
describe('#ADD_CONVERSATION_ATTACHMENTS', () => {
it('add conversation attachments', () => {
const state = {
- allConversations: [{ id: 1, attachments: [] }],
+ allConversations: [{ id: 1 }],
+ attachments: {},
};
const message = {
conversation_id: 1,
@@ -398,19 +398,13 @@ describe('#mutations', () => {
};
mutations[types.ADD_CONVERSATION_ATTACHMENTS](state, message);
- expect(state.allConversations[0].attachments).toEqual(
- message.attachments
- );
+ expect(state.attachments[1]).toEqual(message.attachments);
});
it('should not add duplicate attachments', () => {
const state = {
- allConversations: [
- {
- id: 1,
- attachments: [{ id: 1, name: 'existing' }],
- },
- ],
+ allConversations: [{ id: 1 }],
+ attachments: { 1: [{ id: 1, name: 'existing' }] },
};
const message = {
conversation_id: 1,
@@ -422,12 +416,12 @@ describe('#mutations', () => {
};
mutations[types.ADD_CONVERSATION_ATTACHMENTS](state, message);
- expect(state.allConversations[0].attachments).toHaveLength(2);
- expect(state.allConversations[0].attachments).toContainEqual({
+ expect(state.attachments[1]).toHaveLength(2);
+ expect(state.attachments[1]).toContainEqual({
id: 1,
name: 'existing',
});
- expect(state.allConversations[0].attachments).toContainEqual({
+ expect(state.attachments[1]).toContainEqual({
id: 2,
name: 'new',
});
@@ -436,6 +430,9 @@ describe('#mutations', () => {
it('should not add attachments if chat not found', () => {
const state = {
allConversations: [{ id: 1, attachments: [] }],
+ attachments: {
+ 1: [],
+ },
};
const message = {
conversation_id: 2,
@@ -444,14 +441,17 @@ describe('#mutations', () => {
};
mutations[types.ADD_CONVERSATION_ATTACHMENTS](state, message);
- expect(state.allConversations[0].attachments).toHaveLength(0);
+ expect(state.attachments[1]).toHaveLength(0);
});
});
describe('#DELETE_CONVERSATION_ATTACHMENTS', () => {
it('delete conversation attachments', () => {
const state = {
- allConversations: [{ id: 1, attachments: [{ id: 1, message_id: 1 }] }],
+ allConversations: [{ id: 1 }],
+ attachments: {
+ 1: [{ id: 1, message_id: 1 }],
+ },
};
const message = {
conversation_id: 1,
@@ -460,12 +460,15 @@ describe('#mutations', () => {
};
mutations[types.DELETE_CONVERSATION_ATTACHMENTS](state, message);
- expect(state.allConversations[0].attachments).toHaveLength(0);
+ expect(state.attachments[1]).toHaveLength(0);
});
it('should not delete attachments for non-matching message id', () => {
const state = {
- allConversations: [{ id: 1, attachments: [{ id: 1, message_id: 1 }] }],
+ allConversations: [{ id: 1 }],
+ attachments: {
+ 1: [{ id: 1, message_id: 1 }],
+ },
};
const message = {
conversation_id: 1,
@@ -474,12 +477,13 @@ describe('#mutations', () => {
};
mutations[types.DELETE_CONVERSATION_ATTACHMENTS](state, message);
- expect(state.allConversations[0].attachments).toHaveLength(1);
+ expect(state.attachments[1]).toHaveLength(1);
});
it('should not delete attachments if chat not found', () => {
const state = {
- allConversations: [{ id: 1, attachments: [{ id: 1, message_id: 1 }] }],
+ allConversations: [{ id: 1 }],
+ attachments: { 1: [{ id: 1, message_id: 1 }] },
};
const message = {
conversation_id: 2,
@@ -488,7 +492,7 @@ describe('#mutations', () => {
};
mutations[types.DELETE_CONVERSATION_ATTACHMENTS](state, message);
- expect(state.allConversations[0].attachments).toHaveLength(1);
+ expect(state.attachments[1]).toHaveLength(1);
});
});
diff --git a/app/javascript/dashboard/store/modules/specs/integrations/getters.spec.js b/app/javascript/dashboard/store/modules/specs/integrations/getters.spec.js
index 43080a7d8..feb358684 100644
--- a/app/javascript/dashboard/store/modules/specs/integrations/getters.spec.js
+++ b/app/javascript/dashboard/store/modules/specs/integrations/getters.spec.js
@@ -1,60 +1,9 @@
import { getters } from '../../integrations';
describe('#getters', () => {
- it('getIntegrations', () => {
- const state = {
- records: [
- {
- id: 'test1',
- name: 'test1',
- logo: 'test',
- enabled: true,
- },
- {
- id: 'test2',
- name: 'test2',
- logo: 'test',
- enabled: true,
- },
- {
- id: 'dyte',
- name: 'dyte',
- logo: 'test',
- enabled: true,
- },
- {
- id: 'dialogflow',
- name: 'dialogflow',
- logo: 'test',
- enabled: true,
- },
- ],
- };
- expect(getters.getIntegrations(state)).toEqual([
- {
- id: 'test1',
- name: 'test1',
- logo: 'test',
- enabled: true,
- },
- {
- id: 'test2',
- name: 'test2',
- logo: 'test',
- enabled: true,
- },
- ]);
- });
-
it('getAppIntegrations', () => {
const state = {
records: [
- {
- id: 'test1',
- name: 'test1',
- logo: 'test',
- enabled: true,
- },
{
id: 'dyte',
name: 'dyte',
diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js
index bbf36fa9a..81e62b950 100644
--- a/app/javascript/packs/application.js
+++ b/app/javascript/packs/application.js
@@ -9,7 +9,6 @@ import VueFormulate from '@braid/vue-formulate';
import WootSwitch from 'components/ui/Switch';
import WootWizard from 'components/ui/Wizard';
import { sync } from 'vuex-router-sync';
-import Vuelidate from 'vuelidate';
import VTooltip from 'v-tooltip';
import WootUiKit from '../dashboard/components';
import App from '../dashboard/App';
@@ -65,7 +64,6 @@ Vue.use(VueDOMPurifyHTML, domPurifyConfig);
Vue.use(VueRouter);
Vue.use(VueI18n);
Vue.use(WootUiKit);
-Vue.use(Vuelidate);
Vue.use(VueFormulate, {
rules: {
JSON: ({ value }) => isJSONValid(value),
diff --git a/app/javascript/packs/survey.js b/app/javascript/packs/survey.js
index 031767052..fdcaec106 100644
--- a/app/javascript/packs/survey.js
+++ b/app/javascript/packs/survey.js
@@ -1,5 +1,4 @@
import Vue from 'vue';
-import Vuelidate from 'vuelidate';
import VueI18n from 'vue-i18n';
import App from '../survey/App.vue';
import i18n from '../survey/i18n';
@@ -7,7 +6,6 @@ import store from '../survey/store';
import { emitter } from 'shared/helpers/mitt';
Vue.use(VueI18n);
-Vue.use(Vuelidate);
const i18nConfig = new VueI18n({
locale: 'en',
diff --git a/app/javascript/packs/v3app.js b/app/javascript/packs/v3app.js
index 5807ff60f..d5180675c 100644
--- a/app/javascript/packs/v3app.js
+++ b/app/javascript/packs/v3app.js
@@ -1,7 +1,6 @@
import Vue from 'vue';
import VueI18n from 'vue-i18n';
import VueRouter from 'vue-router';
-import Vuelidate from 'vuelidate';
import i18n from 'dashboard/i18n';
import * as Sentry from '@sentry/vue';
import { Integrations } from '@sentry/tracing';
@@ -44,7 +43,7 @@ if (window.errorLoggingConfig) {
Vue.use(VueRouter);
Vue.use(VueI18n);
-Vue.use(Vuelidate);
+
Vue.use(AnalyticsPlugin);
Vue.prototype.$emitter = emitter;
Vue.component('fluent-icon', FluentIcon);
diff --git a/app/javascript/packs/widget.js b/app/javascript/packs/widget.js
index ea3bb8200..a6c873c55 100644
--- a/app/javascript/packs/widget.js
+++ b/app/javascript/packs/widget.js
@@ -1,5 +1,4 @@
import Vue from 'vue';
-import Vuelidate from 'vuelidate';
import VueI18n from 'vue-i18n';
import VueDOMPurifyHTML from 'vue-dompurify-html';
import VueFormulate from '@braid/vue-formulate';
@@ -18,7 +17,7 @@ import { domPurifyConfig } from '../shared/helpers/HTMLSanitizer';
const PhoneInput = () => import('../widget/components/Form/PhoneInput');
Vue.use(VueI18n);
-Vue.use(Vuelidate);
+
Vue.use(VueDOMPurifyHTML, domPurifyConfig);
Vue.directive('on-clickaway', onClickaway);
diff --git a/app/javascript/portal/components/PublicArticleSearch.vue b/app/javascript/portal/components/PublicArticleSearch.vue
index 1174c636c..3e4be5ba9 100644
--- a/app/javascript/portal/components/PublicArticleSearch.vue
+++ b/app/javascript/portal/components/PublicArticleSearch.vue
@@ -1,27 +1,3 @@
-
-
-
-
+
+
+
+
diff --git a/app/javascript/portal/components/PublicSearchInput.vue b/app/javascript/portal/components/PublicSearchInput.vue
index ffa0f99a7..08dd5e1cf 100644
--- a/app/javascript/portal/components/PublicSearchInput.vue
+++ b/app/javascript/portal/components/PublicSearchInput.vue
@@ -1,25 +1,3 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/app/javascript/portal/components/SearchSuggestions.vue b/app/javascript/portal/components/SearchSuggestions.vue
index 2c9697e14..cb4adc9fc 100644
--- a/app/javascript/portal/components/SearchSuggestions.vue
+++ b/app/javascript/portal/components/SearchSuggestions.vue
@@ -1,60 +1,9 @@
-
-
-
- {{ loadingPlaceholder }}
-
-
-
-
- {{ emptyPlaceholder }}
-
-
-
-
+
+
+
+
+ {{ loadingPlaceholder }}
+
+
+
+
+ {{ emptyPlaceholder }}
+
+
+
diff --git a/app/javascript/portal/components/TableOfContents.vue b/app/javascript/portal/components/TableOfContents.vue
index d7b3bb021..d907bc49e 100644
--- a/app/javascript/portal/components/TableOfContents.vue
+++ b/app/javascript/portal/components/TableOfContents.vue
@@ -1,33 +1,3 @@
-
-
-
+
+
+
+
diff --git a/app/javascript/portal/portalHelpers.js b/app/javascript/portal/portalHelpers.js
index 3e9690b20..dfe2951f0 100644
--- a/app/javascript/portal/portalHelpers.js
+++ b/app/javascript/portal/portalHelpers.js
@@ -33,7 +33,7 @@ export const openExternalLinksInNewTab = () => {
const isOnArticlePage =
isSameHost && document.querySelector('#cw-article-content') !== null;
- document.addEventListener('click', function (event) {
+ document.addEventListener('click', event => {
if (!isOnArticlePage) return;
// Some of the links come wrapped in strong tag through prosemirror
diff --git a/app/javascript/shared/components/Branding.vue b/app/javascript/shared/components/Branding.vue
index bbeb578e9..8034e3506 100644
--- a/app/javascript/shared/components/Branding.vue
+++ b/app/javascript/shared/components/Branding.vue
@@ -1,27 +1,3 @@
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/app/javascript/survey/components/Banner.vue b/app/javascript/survey/components/Banner.vue
index b178b6797..f2a907bf6 100644
--- a/app/javascript/survey/components/Banner.vue
+++ b/app/javascript/survey/components/Banner.vue
@@ -1,16 +1,3 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/app/javascript/survey/components/Feedback.vue b/app/javascript/survey/components/Feedback.vue
index 2b870cc47..fcae0cb31 100644
--- a/app/javascript/survey/components/Feedback.vue
+++ b/app/javascript/survey/components/Feedback.vue
@@ -1,22 +1,3 @@
-
-
-
-
-
-
-
- {{ $t('SURVEY.FEEDBACK.BUTTON_TEXT') }}
-
-
-
-
-
+
+
+
+
+
+
+
+
+ {{ $t('SURVEY.FEEDBACK.BUTTON_TEXT') }}
+
+
+
+
diff --git a/app/javascript/survey/components/Rating.vue b/app/javascript/survey/components/Rating.vue
index 530bc6c21..8d1e84bcf 100644
--- a/app/javascript/survey/components/Rating.vue
+++ b/app/javascript/survey/components/Rating.vue
@@ -1,18 +1,3 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/app/javascript/widget/components/AgentMessage.vue b/app/javascript/widget/components/AgentMessage.vue
index 2bf94b094..3296d5128 100755
--- a/app/javascript/widget/components/AgentMessage.vue
+++ b/app/javascript/widget/components/AgentMessage.vue
@@ -1,91 +1,3 @@
-
-
-
-
+
+
+
+
diff --git a/app/javascript/widget/components/AgentMessageBubble.vue b/app/javascript/widget/components/AgentMessageBubble.vue
index f5bad52fc..c759a7108 100755
--- a/app/javascript/widget/components/AgentMessageBubble.vue
+++ b/app/javascript/widget/components/AgentMessageBubble.vue
@@ -1,66 +1,5 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/javascript/widget/components/AgentTypingBubble.vue b/app/javascript/widget/components/AgentTypingBubble.vue
index e8f8e7b09..a84d8fc7b 100644
--- a/app/javascript/widget/components/AgentTypingBubble.vue
+++ b/app/javascript/widget/components/AgentTypingBubble.vue
@@ -1,3 +1,11 @@
+
+
@@ -17,14 +25,6 @@
-
-
+
+
+
diff --git a/app/javascript/widget/components/ArticleList.vue b/app/javascript/widget/components/ArticleList.vue
index 4043bf060..5aef7e265 100644
--- a/app/javascript/widget/components/ArticleList.vue
+++ b/app/javascript/widget/components/ArticleList.vue
@@ -1,15 +1,3 @@
-
-
-
-
+
+
+
+
diff --git a/app/javascript/widget/components/ArticleListItem.vue b/app/javascript/widget/components/ArticleListItem.vue
index f16afa5e1..a7e828649 100644
--- a/app/javascript/widget/components/ArticleListItem.vue
+++ b/app/javascript/widget/components/ArticleListItem.vue
@@ -1,18 +1,3 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/app/javascript/widget/components/ArticleSearch.vue b/app/javascript/widget/components/ArticleSearch.vue
index 8ce663321..275d44ec1 100644
--- a/app/javascript/widget/components/ArticleSearch.vue
+++ b/app/javascript/widget/components/ArticleSearch.vue
@@ -1,29 +1,3 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
+ {{ '⌘K' }}
+
+
+
+
diff --git a/app/javascript/widget/components/AvailableAgents.vue b/app/javascript/widget/components/AvailableAgents.vue
index 7e51b887b..10ecd7afb 100644
--- a/app/javascript/widget/components/AvailableAgents.vue
+++ b/app/javascript/widget/components/AvailableAgents.vue
@@ -1,7 +1,3 @@
-
-
-
-
+
+
+
+
diff --git a/app/javascript/widget/components/Banner.vue b/app/javascript/widget/components/Banner.vue
index 173dfabb2..bdd11a5b7 100644
--- a/app/javascript/widget/components/Banner.vue
+++ b/app/javascript/widget/components/Banner.vue
@@ -1,11 +1,3 @@
-
-
-
- {{ bannerMessage }}
-
-
-
-
+
+
+
+ {{ bannerMessage }}
+
+
+
+
|