Welcome to mirror list, hosted at ThFree Co, Russian Federation.

state_filter_data.js « constants « dropdown_filter « search « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0b93aa0be29165d07d5d41d1b800b0ead8c3c2c0 (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
import { __ } from '~/locale';

const header = __('Status');

const filters = {
  ANY: {
    label: __('Any'),
    value: 'all',
  },
  OPEN: {
    label: __('Open'),
    value: 'opened',
  },
  CLOSED: {
    label: __('Closed'),
    value: 'closed',
  },
  MERGED: {
    label: __('Merged'),
    value: 'merged',
  },
};

const scopes = {
  ISSUES: 'issues',
  MERGE_REQUESTS: 'merge_requests',
};

const filterByScope = {
  [scopes.ISSUES]: [filters.ANY, filters.OPEN, filters.CLOSED],
  [scopes.MERGE_REQUESTS]: [filters.ANY, filters.OPEN, filters.MERGED, filters.CLOSED],
};

const filterParam = 'state';

export default {
  header,
  filters,
  scopes,
  filterByScope,
  filterParam,
};