mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-11-04 04:57:51 +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(
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user