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

83 lines
1.8 KiB
Vue
Raw Normal View History

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