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

board_configuration_options.vue « components « boards « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 754b00b54e06b72fd7de4300cf4a4de8ceea6daa (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<script>
import { GlFormCheckbox } from '@gitlab/ui';

export default {
  components: {
    GlFormCheckbox,
  },
  props: {
    currentBoard: {
      type: Object,
      required: true,
    },
    board: {
      type: Object,
      required: true,
    },
    isNewForm: {
      type: Boolean,
      required: false,
      default: false,
    },
  },
  data() {
    const { hide_backlog_list: hideBacklogList, hide_closed_list: hideClosedList } = this.isNewForm
      ? this.board
      : this.currentBoard;

    return {
      hideClosedList,
      hideBacklogList,
    };
  },
  methods: {
    changeClosedList(checked) {
      this.board.hideClosedList = !checked;
    },
    changeBacklogList(checked) {
      this.board.hideBacklogList = !checked;
    },
  },
};
</script>

<template>
  <div class="append-bottom-20">
    <label class="label-bold gl-font-lg" for="board-new-name">
      {{ __('List options') }}
    </label>
    <p class="text-secondary gl-mb-3">
      {{ __('Configure which lists are shown for anyone who visits this board') }}
    </p>
    <gl-form-checkbox
      :checked="!hideBacklogList"
      data-testid="backlog-list-checkbox"
      @change="changeBacklogList"
      >{{ __('Show the Open list') }}
    </gl-form-checkbox>
    <gl-form-checkbox
      :checked="!hideClosedList"
      data-testid="closed-list-checkbox"
      @change="changeClosedList"
      >{{ __('Show the Closed list') }}
    </gl-form-checkbox>
  </div>
</template>