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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-11 15:12:30 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-11 15:12:30 +0300
commit0b54f87a31c23544ca5917bf772ce9c64a61562c (patch)
tree79d56df6750e84fd4a10205d9dcce293f7c5d491 /app/assets/javascripts/work_items/components/work_item_detail_modal.vue
parente348fb4c1b9eaf21655001dc4346ceb0c0c3d5b4 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/work_items/components/work_item_detail_modal.vue')
-rw-r--r--app/assets/javascripts/work_items/components/work_item_detail_modal.vue66
1 files changed, 0 insertions, 66 deletions
diff --git a/app/assets/javascripts/work_items/components/work_item_detail_modal.vue b/app/assets/javascripts/work_items/components/work_item_detail_modal.vue
index 376263503de..f8422dda211 100644
--- a/app/assets/javascripts/work_items/components/work_item_detail_modal.vue
+++ b/app/assets/javascripts/work_items/components/work_item_detail_modal.vue
@@ -2,7 +2,6 @@
import { GlAlert, GlModal } from '@gitlab/ui';
import { s__ } from '~/locale';
import { scrollToTargetOnResize } from '~/lib/utils/resize_observer';
-import deleteWorkItemFromTaskMutation from '../graphql/delete_task_from_work_item.mutation.graphql';
import deleteWorkItemMutation from '../graphql/delete_work_item.mutation.graphql';
export default {
@@ -27,26 +26,6 @@ export default {
required: false,
default: null,
},
- issueGid: {
- type: String,
- required: false,
- default: '',
- },
- lockVersion: {
- type: Number,
- required: false,
- default: null,
- },
- lineNumberStart: {
- type: String,
- required: false,
- default: null,
- },
- lineNumberEnd: {
- type: String,
- required: false,
- default: null,
- },
},
emits: ['workItemDeleted', 'close', 'update-modal'],
data() {
@@ -75,50 +54,6 @@ export default {
},
methods: {
deleteWorkItem() {
- if (this.lockVersion != null && this.lineNumberStart && this.lineNumberEnd) {
- this.deleteWorkItemWithTaskData();
- } else {
- this.deleteWorkItemWithoutTaskData();
- }
- },
- deleteWorkItemWithTaskData() {
- this.$apollo
- .mutate({
- mutation: deleteWorkItemFromTaskMutation,
- variables: {
- input: {
- id: this.issueGid,
- lockVersion: this.lockVersion,
- taskData: {
- id: this.workItemId,
- lineNumberStart: Number(this.lineNumberStart),
- lineNumberEnd: Number(this.lineNumberEnd),
- },
- },
- },
- })
- .then(
- ({
- data: {
- workItemDeleteTask: {
- workItem: { descriptionHtml },
- errors,
- },
- },
- }) => {
- if (errors?.length) {
- throw new Error(errors[0]);
- }
-
- this.$emit('workItemDeleted', descriptionHtml);
- this.hide();
- },
- )
- .catch((error) => {
- this.setErrorMessage(error.message);
- });
- },
- deleteWorkItemWithoutTaskData() {
this.$apollo
.mutate({
mutation: deleteWorkItemMutation,
@@ -191,7 +126,6 @@ export default {
<work-item-detail
is-modal
- :work-item-parent-id="issueGid"
:work-item-id="displayedWorkItemId"
:work-item-iid="displayedWorkItemIid"
class="gl-p-5 gl-mt-n3 gl-reset-bg gl-isolation-isolate"