debian-mirror-gitlab/app/assets/javascripts/sidebar/constants.js

54 lines
2.1 KiB
JavaScript
Raw Normal View History

2021-03-11 19:13:27 +05:30
import { IssuableType } from '~/issue_show/constants';
2021-04-17 20:07:23 +05:30
import epicConfidentialQuery from '~/sidebar/queries/epic_confidential.query.graphql';
import issueConfidentialQuery from '~/sidebar/queries/issue_confidential.query.graphql';
2021-04-29 21:17:54 +05:30
import issueDueDateQuery from '~/sidebar/queries/issue_due_date.query.graphql';
2021-04-17 20:07:23 +05:30
import issueReferenceQuery from '~/sidebar/queries/issue_reference.query.graphql';
import mergeRequestReferenceQuery from '~/sidebar/queries/merge_request_reference.query.graphql';
import updateEpicMutation from '~/sidebar/queries/update_epic_confidential.mutation.graphql';
import updateIssueConfidentialMutation from '~/sidebar/queries/update_issue_confidential.mutation.graphql';
2021-04-29 21:17:54 +05:30
import updateIssueDueDateMutation from '~/sidebar/queries/update_issue_due_date.mutation.graphql';
2021-03-11 19:13:27 +05:30
import getIssueParticipants from '~/vue_shared/components/sidebar/queries/get_issue_participants.query.graphql';
import getMergeRequestParticipants from '~/vue_shared/components/sidebar/queries/get_mr_participants.query.graphql';
import updateAssigneesMutation from '~/vue_shared/components/sidebar/queries/update_issue_assignees.mutation.graphql';
import updateMergeRequestParticipantsMutation from '~/vue_shared/components/sidebar/queries/update_mr_assignees.mutation.graphql';
2021-04-17 20:07:23 +05:30
export const ASSIGNEES_DEBOUNCE_DELAY = 250;
2021-03-11 19:13:27 +05:30
export const assigneesQueries = {
[IssuableType.Issue]: {
query: getIssueParticipants,
mutation: updateAssigneesMutation,
},
[IssuableType.MergeRequest]: {
query: getMergeRequestParticipants,
mutation: updateMergeRequestParticipantsMutation,
},
};
2021-04-17 20:07:23 +05:30
export const confidentialityQueries = {
[IssuableType.Issue]: {
query: issueConfidentialQuery,
mutation: updateIssueConfidentialMutation,
},
[IssuableType.Epic]: {
query: epicConfidentialQuery,
mutation: updateEpicMutation,
},
};
export const referenceQueries = {
[IssuableType.Issue]: {
query: issueReferenceQuery,
},
[IssuableType.MergeRequest]: {
query: mergeRequestReferenceQuery,
},
};
2021-04-29 21:17:54 +05:30
export const dueDateQueries = {
[IssuableType.Issue]: {
query: issueDueDateQuery,
mutation: updateIssueDueDateMutation,
},
};