mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 03:57:52 +00:00
chore: Add an event for conversation filter (#6306)
This commit is contained in:
@@ -61,6 +61,7 @@ import { mapGetters } from 'vuex';
|
||||
import { filterAttributeGroups } from './advancedFilterItems';
|
||||
import filterMixin from 'shared/mixins/filterMixin';
|
||||
import * as OPERATORS from 'dashboard/components/widgets/FilterInput/FilterOperatorTypes.js';
|
||||
import { CONVERSATION_EVENTS } from '../../../helper/AnalyticsHelper/events';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -287,6 +288,12 @@ export default {
|
||||
JSON.parse(JSON.stringify(this.appliedFilters))
|
||||
);
|
||||
this.$emit('applyFilter', this.appliedFilters);
|
||||
this.$track(CONVERSATION_EVENTS.APPLY_FILTER, {
|
||||
applied_filters: this.appliedFilters.map(filter => ({
|
||||
key: filter.attribute_key,
|
||||
operator: filter.filter_operator,
|
||||
})),
|
||||
});
|
||||
},
|
||||
resetFilter(index, currentFilter) {
|
||||
this.appliedFilters[index].filter_operator = this.filterTypes.find(
|
||||
|
||||
@@ -4,6 +4,8 @@ export const CONVERSATION_EVENTS = Object.freeze({
|
||||
SENT_PRIVATE_NOTE: 'Sent a private note',
|
||||
INSERTED_A_CANNED_RESPONSE: 'Inserted a canned response',
|
||||
USED_MENTIONS: 'Used mentions',
|
||||
|
||||
APPLY_FILTER: 'Applied filters in the conversation list',
|
||||
});
|
||||
|
||||
export const ACCOUNT_EVENTS = Object.freeze({
|
||||
|
||||
Reference in New Issue
Block a user