2020-12-10 21:10:15 +00:00
|
|
|
import { __ } from '~/locale';
|
|
|
|
|
2017-07-26 08:01:12 +00:00
|
|
|
export const DISCUSSION_NOTE = 'DiscussionNote';
|
2018-02-28 00:10:43 +00:00
|
|
|
export const DIFF_NOTE = 'DiffNote';
|
2017-07-26 08:01:12 +00:00
|
|
|
export const DISCUSSION = 'discussion';
|
|
|
|
export const NOTE = 'note';
|
|
|
|
export const SYSTEM_NOTE = 'systemNote';
|
|
|
|
export const COMMENT = 'comment';
|
|
|
|
export const OPENED = 'opened';
|
|
|
|
export const REOPENED = 'reopened';
|
2017-07-26 11:02:01 +00:00
|
|
|
export const CLOSED = 'closed';
|
2019-04-03 15:26:03 +00:00
|
|
|
export const MERGED = 'merged';
|
2022-06-28 09:09:38 +00:00
|
|
|
export const ISSUE_NOTEABLE_TYPE = 'Issue';
|
|
|
|
export const EPIC_NOTEABLE_TYPE = 'Epic';
|
2018-06-21 12:22:40 +00:00
|
|
|
export const MERGE_REQUEST_NOTEABLE_TYPE = 'MergeRequest';
|
2022-08-29 06:09:31 +00:00
|
|
|
export const INCIDENT_NOTEABLE_TYPE = 'INCIDENT'; // TODO: check if value can be converted to `Incident`
|
2018-02-28 00:10:43 +00:00
|
|
|
export const UNRESOLVE_NOTE_METHOD_NAME = 'delete';
|
|
|
|
export const RESOLVE_NOTE_METHOD_NAME = 'post';
|
2018-06-05 08:11:13 +00:00
|
|
|
export const DESCRIPTION_TYPE = 'changed the description';
|
2018-11-05 12:30:14 +00:00
|
|
|
export const DISCUSSION_FILTERS_DEFAULT_VALUE = 0;
|
2020-10-05 15:08:56 +00:00
|
|
|
export const COMMENTS_ONLY_FILTER_VALUE = 1;
|
|
|
|
export const HISTORY_ONLY_FILTER_VALUE = 2;
|
2019-01-02 04:42:31 +00:00
|
|
|
export const DISCUSSION_TAB_LABEL = 'show';
|
2019-10-11 00:06:24 +00:00
|
|
|
export const NOTE_UNDERSCORE = 'note_';
|
2020-02-17 09:08:52 +00:00
|
|
|
export const TIME_DIFFERENCE_VALUE = 10;
|
2020-03-26 09:07:52 +00:00
|
|
|
export const ASC = 'asc';
|
|
|
|
export const DESC = 'desc';
|
2018-04-05 08:25:55 +00:00
|
|
|
|
2020-08-28 15:10:21 +00:00
|
|
|
export const DISCUSSION_FETCH_TIMEOUT = 750;
|
|
|
|
|
2018-04-05 08:25:55 +00:00
|
|
|
export const NOTEABLE_TYPE_MAPPING = {
|
|
|
|
Issue: ISSUE_NOTEABLE_TYPE,
|
|
|
|
MergeRequest: MERGE_REQUEST_NOTEABLE_TYPE,
|
|
|
|
Epic: EPIC_NOTEABLE_TYPE,
|
2022-08-29 06:09:31 +00:00
|
|
|
Incident: INCIDENT_NOTEABLE_TYPE,
|
2018-04-05 08:25:55 +00:00
|
|
|
};
|
2019-02-26 14:04:15 +00:00
|
|
|
|
|
|
|
export const DISCUSSION_FILTER_TYPES = {
|
|
|
|
ALL: 'all',
|
|
|
|
COMMENTS: 'comments',
|
|
|
|
HISTORY: 'history',
|
|
|
|
};
|
2020-12-10 21:10:15 +00:00
|
|
|
|
|
|
|
export const toggleStateErrorMessage = {
|
|
|
|
Epic: {
|
|
|
|
[CLOSED]: __('Something went wrong while reopening the epic. Please try again later.'),
|
|
|
|
[OPENED]: __('Something went wrong while closing the epic. Please try again later.'),
|
|
|
|
[REOPENED]: __('Something went wrong while closing the epic. Please try again later.'),
|
|
|
|
},
|
|
|
|
MergeRequest: {
|
|
|
|
[CLOSED]: __('Something went wrong while reopening the merge request. Please try again later.'),
|
|
|
|
[OPENED]: __('Something went wrong while closing the merge request. Please try again later.'),
|
|
|
|
[REOPENED]: __('Something went wrong while closing the merge request. Please try again later.'),
|
|
|
|
},
|
|
|
|
};
|