All files / ee/app/assets/javascripts/analytics/productivity_analytics filtered_search_productivity_analytics.js

0% Statements 0/5
0% Branches 0/1
0% Functions 0/2
0% Lines 0/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30                                                           
import FilteredSearchManager from 'ee_else_ce/filtered_search/filtered_search_manager';
import { queryToObject } from '~/lib/utils/url_utility';
import { __ } from '~/locale';
import ProductivityAnalyticsFilteredSearchTokenKeys from './productivity_analytics_filtered_search_token_keys';
import store from './store';
 
export default class FilteredSearchProductivityAnalytics extends FilteredSearchManager {
  constructor({ isGroup = true }) {
    super({
      page: 'productivity_analytics',
      isGroupDecendent: true,
      stateFiltersSelector: '.issues-state-filters',
      isGroup,
      useDefaultState: false,
      filteredSearchTokenKeys: ProductivityAnalyticsFilteredSearchTokenKeys,
      placeholder: __('Filter results...'),
    });
 
    this.isHandledAsync = true;
  }
 
  /**
   * Updates filters in productivity analytics store
   */
  updateObject = (path) => {
    const filters = queryToObject(path, { gatherArrays: true });
    store.dispatch('filters/setFilters', filters);
  };
}