mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-05 05:27:48 +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 { filterAttributeGroups } from './advancedFilterItems';
|
||||||
import filterMixin from 'shared/mixins/filterMixin';
|
import filterMixin from 'shared/mixins/filterMixin';
|
||||||
import * as OPERATORS from 'dashboard/components/widgets/FilterInput/FilterOperatorTypes.js';
|
import * as OPERATORS from 'dashboard/components/widgets/FilterInput/FilterOperatorTypes.js';
|
||||||
|
import { CONVERSATION_EVENTS } from '../../../helper/AnalyticsHelper/events';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -287,6 +288,12 @@ export default {
|
|||||||
JSON.parse(JSON.stringify(this.appliedFilters))
|
JSON.parse(JSON.stringify(this.appliedFilters))
|
||||||
);
|
);
|
||||||
this.$emit('applyFilter', 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) {
|
resetFilter(index, currentFilter) {
|
||||||
this.appliedFilters[index].filter_operator = this.filterTypes.find(
|
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',
|
SENT_PRIVATE_NOTE: 'Sent a private note',
|
||||||
INSERTED_A_CANNED_RESPONSE: 'Inserted a canned response',
|
INSERTED_A_CANNED_RESPONSE: 'Inserted a canned response',
|
||||||
USED_MENTIONS: 'Used mentions',
|
USED_MENTIONS: 'Used mentions',
|
||||||
|
|
||||||
|
APPLY_FILTER: 'Applied filters in the conversation list',
|
||||||
});
|
});
|
||||||
|
|
||||||
export const ACCOUNT_EVENTS = Object.freeze({
|
export const ACCOUNT_EVENTS = Object.freeze({
|
||||||
|
|||||||
Reference in New Issue
Block a user