From 362e36a35d3851144eef24baac457b68121b87d0 Mon Sep 17 00:00:00 2001 From: iamsivin Date: Fri, 23 Aug 2024 13:14:10 +0530 Subject: [PATCH] chore: Remove bulk action mixin file --- .../dashboard/commands/bulkActionsHotKeys.js | 86 ------------------- 1 file changed, 86 deletions(-) delete mode 100644 app/javascript/dashboard/routes/dashboard/commands/bulkActionsHotKeys.js diff --git a/app/javascript/dashboard/routes/dashboard/commands/bulkActionsHotKeys.js b/app/javascript/dashboard/routes/dashboard/commands/bulkActionsHotKeys.js deleted file mode 100644 index 74e68afc6..000000000 --- a/app/javascript/dashboard/routes/dashboard/commands/bulkActionsHotKeys.js +++ /dev/null @@ -1,86 +0,0 @@ -import { mapGetters } from 'vuex'; -import wootConstants from 'dashboard/constants/globals'; - -import { - CMD_BULK_ACTION_SNOOZE_CONVERSATION, - CMD_BULK_ACTION_REOPEN_CONVERSATION, - CMD_BULK_ACTION_RESOLVE_CONVERSATION, -} from './commandBarBusEvents'; -import { - ICON_SNOOZE_CONVERSATION, - ICON_REOPEN_CONVERSATION, - ICON_RESOLVE_CONVERSATION, -} from './CommandBarIcons'; -import { emitter } from 'shared/helpers/mitt'; - -import { createSnoozeHandlers } from './commandBarActions'; - -const SNOOZE_OPTIONS = wootConstants.SNOOZE_OPTIONS; - -export const SNOOZE_CONVERSATION_BULK_ACTIONS = [ - { - id: 'bulk_action_snooze_conversation', - title: 'COMMAND_BAR.COMMANDS.SNOOZE_CONVERSATION', - section: 'COMMAND_BAR.SECTIONS.BULK_ACTIONS', - icon: ICON_SNOOZE_CONVERSATION, - children: Object.values(SNOOZE_OPTIONS), - }, - ...createSnoozeHandlers( - CMD_BULK_ACTION_SNOOZE_CONVERSATION, - 'bulk_action_snooze_conversation', - 'COMMAND_BAR.SECTIONS.BULK_ACTIONS' - ), -]; - -export const RESOLVED_CONVERSATION_BULK_ACTIONS = [ - { - id: 'bulk_action_reopen_conversation', - title: 'COMMAND_BAR.COMMANDS.REOPEN_CONVERSATION', - section: 'COMMAND_BAR.SECTIONS.BULK_ACTIONS', - icon: ICON_REOPEN_CONVERSATION, - handler: () => emitter.emit(CMD_BULK_ACTION_REOPEN_CONVERSATION), - }, -]; - -export const OPEN_CONVERSATION_BULK_ACTIONS = [ - { - id: 'bulk_action_resolve_conversation', - title: 'COMMAND_BAR.COMMANDS.RESOLVE_CONVERSATION', - section: 'COMMAND_BAR.SECTIONS.BULK_ACTIONS', - icon: ICON_RESOLVE_CONVERSATION, - handler: () => emitter.emit(CMD_BULK_ACTION_RESOLVE_CONVERSATION), - }, -]; - -export default { - computed: { - ...mapGetters({ - selectedConversations: 'bulkActions/getSelectedConversationIds', - }), - bulkActionsHotKeys() { - let actions = []; - if (this.selectedConversations.length > 0) { - actions = [ - ...SNOOZE_CONVERSATION_BULK_ACTIONS, - ...RESOLVED_CONVERSATION_BULK_ACTIONS, - ...OPEN_CONVERSATION_BULK_ACTIONS, - ]; - } - return this.prepareActions(actions); - }, - }, - watch: { - selectedConversations() { - this.setCommandbarData(); - }, - }, - methods: { - prepareActions(actions) { - return actions.map(action => ({ - ...action, - title: this.$t(action.title), - section: this.$t(action.section), - })); - }, - }, -};