diff options
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/new_resource_dropdown/constants.js')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/new_resource_dropdown/constants.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/app/assets/javascripts/vue_shared/components/new_resource_dropdown/constants.js b/app/assets/javascripts/vue_shared/components/new_resource_dropdown/constants.js new file mode 100644 index 00000000000..e5dca170965 --- /dev/null +++ b/app/assets/javascripts/vue_shared/components/new_resource_dropdown/constants.js @@ -0,0 +1,26 @@ +import { __ } from '~/locale'; + +export const RESOURCE_TYPE_ISSUE = 'issue'; +export const RESOURCE_TYPE_MERGE_REQUEST = 'merge-request'; +export const RESOURCE_TYPE_MILESTONE = 'milestone'; + +export const RESOURCE_TYPES = [ + RESOURCE_TYPE_ISSUE, + RESOURCE_TYPE_MERGE_REQUEST, + RESOURCE_TYPE_MILESTONE, +]; + +export const RESOURCE_OPTIONS = { + [RESOURCE_TYPE_ISSUE]: { + path: 'issues/new', + label: __('issue'), + }, + [RESOURCE_TYPE_MERGE_REQUEST]: { + path: 'merge_requests/new', + label: __('merge request'), + }, + [RESOURCE_TYPE_MILESTONE]: { + path: 'milestones/new', + label: __('milestone'), + }, +}; |