debian-mirror-gitlab/app/assets/javascripts/boards/components/board_column_new.vue

83 lines
1.9 KiB
Vue
Raw Normal View History

2021-01-29 00:20:46 +05:30
<script>
import { mapGetters, mapActions, mapState } from 'vuex';
import BoardListHeader from 'ee_else_ce/boards/components/board_list_header_new.vue';
import BoardList from './board_list_new.vue';
2021-02-22 17:27:13 +05:30
import { isListDraggable } from '../boards_util';
2021-01-29 00:20:46 +05:30
export default {
components: {
BoardListHeader,
BoardList,
},
props: {
list: {
type: Object,
default: () => ({}),
required: false,
},
disabled: {
type: Boolean,
required: true,
},
canAdminList: {
type: Boolean,
required: false,
default: false,
},
},
inject: {
boardId: {
default: '',
},
},
computed: {
...mapState(['filterParams']),
...mapGetters(['getIssuesByList']),
listIssues() {
return this.getIssuesByList(this.list.id);
},
2021-02-22 17:27:13 +05:30
isListDraggable() {
return isListDraggable(this.list);
2021-01-29 00:20:46 +05:30
},
},
watch: {
filterParams: {
handler() {
2021-02-22 17:27:13 +05:30
this.fetchIssuesForList({ listId: this.list.id });
2021-01-29 00:20:46 +05:30
},
deep: true,
immediate: true,
},
},
methods: {
...mapActions(['fetchIssuesForList']),
},
};
</script>
<template>
<div
:class="{
2021-02-22 17:27:13 +05:30
'is-draggable': isListDraggable,
'is-collapsed': list.collapsed,
'board-type-assignee': list.listType === 'assignee',
2021-01-29 00:20:46 +05:30
}"
:data-id="list.id"
2021-02-22 17:27:13 +05:30
class="board gl-display-inline-block gl-h-full gl-px-3 gl-vertical-align-top gl-white-space-normal is-expandable"
2021-01-29 00:20:46 +05:30
data-qa-selector="board_list"
>
<div
class="board-inner gl-display-flex gl-flex-direction-column gl-relative gl-h-full gl-rounded-base"
>
<board-list-header :can-admin-list="canAdminList" :list="list" :disabled="disabled" />
<board-list
ref="board-list"
:disabled="disabled"
:issues="listIssues"
:list="list"
2021-02-22 17:27:13 +05:30
:can-admin-list="canAdminList"
2021-01-29 00:20:46 +05:30
/>
</div>
</div>
</template>