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:
Diffstat (limited to 'app/assets/javascripts/boards/components/board_form.vue')
-rw-r--r--app/assets/javascripts/boards/components/board_form.vue13
1 files changed, 11 insertions, 2 deletions
diff --git a/app/assets/javascripts/boards/components/board_form.vue b/app/assets/javascripts/boards/components/board_form.vue
index 63248a5ad48..50782781538 100644
--- a/app/assets/javascripts/boards/components/board_form.vue
+++ b/app/assets/javascripts/boards/components/board_form.vue
@@ -10,6 +10,7 @@ import { fullLabelId, fullBoardId } from '../boards_util';
import BoardConfigurationOptions from './board_configuration_options.vue';
import updateBoardMutation from '../graphql/board_update.mutation.graphql';
import createBoardMutation from '../graphql/board_create.mutation.graphql';
+import destroyBoardMutation from '../graphql/board_destroy.mutation.graphql';
const boardDefaults = {
id: false,
@@ -95,6 +96,9 @@ export default {
fullPath: {
default: '',
},
+ rootPath: {
+ default: '',
+ },
},
data() {
return {
@@ -221,8 +225,13 @@ export default {
this.isLoading = true;
if (this.isDeleteForm) {
try {
- await boardsStore.deleteBoard(this.currentBoard);
- visitUrl(boardsStore.rootPath);
+ await this.$apollo.mutate({
+ mutation: destroyBoardMutation,
+ variables: {
+ id: fullBoardId(this.board.id),
+ },
+ });
+ visitUrl(this.rootPath);
} catch {
Flash(this.$options.i18n.deleteErrorMessage);
} finally {