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

85 lines
1.8 KiB
Vue
Raw Normal View History

2020-06-23 00:09:42 +05:30
<script>
import { mapState } from 'vuex';
import BoardColumn from 'ee_else_ce/boards/components/board_column.vue';
import EpicsSwimlanes from 'ee_component/boards/components/epics_swimlanes.vue';
2020-10-24 23:57:45 +05:30
import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
2020-06-23 00:09:42 +05:30
export default {
components: {
BoardColumn,
EpicsSwimlanes,
},
mixins: [glFeatureFlagMixin()],
props: {
lists: {
type: Array,
required: true,
},
canAdminList: {
type: Boolean,
required: true,
},
groupId: {
type: Number,
required: false,
default: null,
},
disabled: {
type: Boolean,
required: true,
},
issueLinkBase: {
type: String,
required: true,
},
rootPath: {
type: String,
required: true,
},
boardId: {
type: String,
required: true,
},
},
computed: {
2020-10-24 23:57:45 +05:30
...mapState(['isShowingEpicsSwimlanes', 'boardLists']),
2020-06-23 00:09:42 +05:30
isSwimlanesOn() {
return this.glFeatures.boardsWithSwimlanes && this.isShowingEpicsSwimlanes;
},
},
};
</script>
<template>
<div>
<div
v-if="!isSwimlanesOn"
2020-07-28 23:09:34 +05:30
class="boards-list gl-w-full gl-py-5 gl-px-3 gl-white-space-nowrap"
2020-06-23 00:09:42 +05:30
data-qa-selector="boards_list"
>
<board-column
v-for="list in lists"
:key="list.id"
ref="board"
:can-admin-list="canAdminList"
:group-id="groupId"
:list="list"
:disabled="disabled"
:issue-link-base="issueLinkBase"
:root-path="rootPath"
:board-id="boardId"
/>
</div>
<epics-swimlanes
v-else
ref="swimlanes"
2020-10-24 23:57:45 +05:30
:lists="boardLists"
2020-06-23 00:09:42 +05:30
:can-admin-list="canAdminList"
:disabled="disabled"
:board-id="boardId"
2020-07-28 23:09:34 +05:30
:group-id="groupId"
2020-10-24 23:57:45 +05:30
:root-path="rootPath"
2020-06-23 00:09:42 +05:30
/>
</div>
</template>