Canned Responses
Canned Responses are pre-written reply templates that help you quickly respond to a conversation. To insert a canned response during a chat, agents can type a short code preceded by a '/' character.
You can manage your canned responses from this page or create new ones using the \"Add canned response\" button.
Open the Canned Responses handbook in another tab for a helping hand.
Also, check out the all-new Canned Responses Library.
", "LIST": { "404": "There are no canned responses available in this account.", "TITLE": "Manage canned responses", "DESC": "Canned Responses are predefined reply templates which can be used to quickly send out replies to conversations.", - "TABLE_HEADER": ["Short code", "Content", "Actions"] + "TABLE_HEADER": [ + "Short code", + "Content", + "Actions" + ] }, "ADD": { "TITLE": "Add canned response", diff --git a/app/javascript/dashboard/mixins/customAttributeMixin.js b/app/javascript/dashboard/mixins/customAttributeMixin.js deleted file mode 100644 index a0617685d..000000000 --- a/app/javascript/dashboard/mixins/customAttributeMixin.js +++ /dev/null @@ -1,11 +0,0 @@ -export default { - methods: { - getRegexp(regexPatternValue) { - let lastSlash = regexPatternValue.lastIndexOf('/'); - return new RegExp( - regexPatternValue.slice(1, lastSlash), - regexPatternValue.slice(lastSlash + 1) - ); - }, - }, -}; diff --git a/app/javascript/dashboard/mixins/macrosMixin.js b/app/javascript/dashboard/mixins/macrosMixin.js deleted file mode 100644 index 4aea89227..000000000 --- a/app/javascript/dashboard/mixins/macrosMixin.js +++ /dev/null @@ -1,34 +0,0 @@ -import { mapGetters } from 'vuex'; -import { PRIORITY_CONDITION_VALUES } from 'dashboard/helper/automationHelper.js'; -export default { - computed: { - ...mapGetters({ - labels: 'labels/getLabels', - teams: 'teams/getTeams', - agents: 'agents/getAgents', - }), - }, - methods: { - getDropdownValues(type) { - switch (type) { - case 'assign_team': - case 'send_email_to_team': - return this.teams; - case 'assign_agent': - return [{ id: 'self', name: 'Self' }, ...this.agents]; - case 'add_label': - case 'remove_label': - return this.labels.map(i => { - return { - id: i.title, - name: i.title, - }; - }); - case 'change_priority': - return PRIORITY_CONDITION_VALUES; - default: - return []; - } - }, - }, -}; diff --git a/app/javascript/dashboard/mixins/specs/macros.spec.js b/app/javascript/dashboard/mixins/specs/macros.spec.js deleted file mode 100644 index a8b3ee2b1..000000000 --- a/app/javascript/dashboard/mixins/specs/macros.spec.js +++ /dev/null @@ -1,50 +0,0 @@ -import { createWrapper } from '@vue/test-utils'; -import macrosMixin from '../macrosMixin'; -import Vue from 'vue'; -import { teams, labels, agents } from '../../helper/specs/macrosFixtures'; -import { PRIORITY_CONDITION_VALUES } from 'dashboard/helper/automationHelper.js'; -describe('webhookMixin', () => { - describe('#getEventLabel', () => { - it('returns correct i18n translation:', () => { - const Component = { - render() {}, - title: 'MyComponent', - mixins: [macrosMixin], - data: () => { - return { - teams, - labels, - agents, - }; - }, - methods: { - $t(text) { - return text; - }, - }, - }; - - const resolvedLabels = labels.map(i => { - return { - id: i.title, - name: i.title, - }; - }); - - const Constructor = Vue.extend(Component); - const vm = new Constructor().$mount(); - const wrapper = createWrapper(vm); - expect(wrapper.vm.getDropdownValues('assign_team')).toEqual(teams); - expect(wrapper.vm.getDropdownValues('send_email_to_team')).toEqual(teams); - expect(wrapper.vm.getDropdownValues('add_label')).toEqual(resolvedLabels); - expect(wrapper.vm.getDropdownValues('assign_agent')).toEqual([ - { id: 'self', name: 'Self' }, - ...agents, - ]); - expect(wrapper.vm.getDropdownValues('change_priority')).toEqual( - PRIORITY_CONDITION_VALUES - ); - expect(wrapper.vm.getDropdownValues()).toEqual([]); - }); - }); -}); diff --git a/app/javascript/dashboard/modules/notes/components/AddNote.vue b/app/javascript/dashboard/modules/notes/components/AddNote.vue index 2b325759b..f3f82e8a3 100644 --- a/app/javascript/dashboard/modules/notes/components/AddNote.vue +++ b/app/javascript/dashboard/modules/notes/components/AddNote.vue @@ -1,43 +1,34 @@ -