summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/boards/components/board_delete.js
blob: 240d0911a313d8d0755a86c828850c2dc3f3517f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* eslint-disable no-alert */

import $ from 'jquery';
import Vue from 'vue';

window.gl = window.gl || {};
window.gl.issueBoards = window.gl.issueBoards || {};

gl.issueBoards.BoardDelete = Vue.extend({
  props: {
    list: {
      type: Object,
      default: () => ({}),
    },
  },
  methods: {
    deleteBoard () {
      $(this.$el).tooltip('hide');

      if (window.confirm('Are you sure you want to delete this list?')) {
        this.list.destroy();
      }
    }
  }
});