diff options
Diffstat (limited to 'app/assets/javascripts/issues/constants.js')
-rw-r--r-- | app/assets/javascripts/issues/constants.js | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/app/assets/javascripts/issues/constants.js b/app/assets/javascripts/issues/constants.js index ba05dd731f7..c79612ad5d0 100644 --- a/app/assets/javascripts/issues/constants.js +++ b/app/assets/javascripts/issues/constants.js @@ -1,36 +1,33 @@ import { __ } from '~/locale'; +export const STATUS_ALL = 'all'; export const STATUS_CLOSED = 'closed'; +export const STATUS_MERGED = 'merged'; export const STATUS_OPEN = 'opened'; export const STATUS_REOPENED = 'reopened'; +export const STATUS_LOCKED = 'locked'; export const TITLE_LENGTH_MAX = 255; +export const TYPE_ALERT = 'alert'; export const TYPE_EPIC = 'epic'; +export const TYPE_INCIDENT = 'incident'; export const TYPE_ISSUE = 'issue'; +export const TYPE_MERGE_REQUEST = 'merge_request'; +export const TYPE_TEST_CASE = 'test_case'; -export const IssuableStatusText = { +export const WORKSPACE_GROUP = 'group'; +export const WORKSPACE_PROJECT = 'project'; + +export const issuableStatusText = { [STATUS_CLOSED]: __('Closed'), [STATUS_OPEN]: __('Open'), [STATUS_REOPENED]: __('Open'), + [STATUS_MERGED]: __('Merged'), + [STATUS_LOCKED]: __('Open'), }; -// Deprecated - use individual constants instead like `TYPE_ISSUE` above -export const IssuableType = { - Issue: 'issue', - Epic: 'epic', - MergeRequest: 'merge_request', - Alert: 'alert', - TestCase: 'test_case', -}; - -export const IssueType = { - Issue: 'issue', - Incident: 'incident', - TestCase: 'test_case', -}; - -export const WorkspaceType = { - project: 'project', - group: 'group', +export const IssuableTypeText = { + [TYPE_ISSUE]: __('issue'), + [TYPE_MERGE_REQUEST]: __('merge request'), }; |