2020-06-04 09:08:01 +00:00
|
|
|
<script>
|
2020-08-19 06:10:04 +00:00
|
|
|
import { mapState } from 'vuex';
|
2020-08-24 06:10:15 +00:00
|
|
|
import { GlAlert } from '@gitlab/ui';
|
2020-08-19 06:10:04 +00:00
|
|
|
import BoardColumn from 'ee_else_ce/boards/components/board_column.vue';
|
|
|
|
import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
|
2020-06-04 09:08:01 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
BoardColumn,
|
2020-08-24 06:10:15 +00:00
|
|
|
EpicsSwimlanes: () => import('ee_component/boards/components/epics_swimlanes.vue'),
|
|
|
|
GlAlert,
|
2020-08-19 06:10:04 +00:00
|
|
|
},
|
|
|
|
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-08-24 06:10:15 +00:00
|
|
|
...mapState(['isShowingEpicsSwimlanes', 'boardLists', 'error']),
|
2020-08-19 06:10:04 +00:00
|
|
|
isSwimlanesOn() {
|
|
|
|
return this.glFeatures.boardsWithSwimlanes && this.isShowingEpicsSwimlanes;
|
|
|
|
},
|
2020-06-04 09:08:01 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2020-08-19 06:10:04 +00:00
|
|
|
<div>
|
2020-08-24 06:10:15 +00:00
|
|
|
<gl-alert v-if="error" variant="danger" :dismissible="false">
|
|
|
|
{{ error }}
|
|
|
|
</gl-alert>
|
2020-08-19 06:10:04 +00:00
|
|
|
<div
|
|
|
|
v-if="!isSwimlanesOn"
|
|
|
|
class="boards-list gl-w-full gl-py-5 gl-px-3 gl-white-space-nowrap"
|
|
|
|
data-qa-selector="boards_list"
|
2020-06-11 09:08:16 +00:00
|
|
|
>
|
|
|
|
<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"
|
|
|
|
/>
|
2020-08-19 06:10:04 +00:00
|
|
|
</div>
|
|
|
|
<epics-swimlanes
|
|
|
|
v-else
|
|
|
|
ref="swimlanes"
|
|
|
|
:lists="boardLists"
|
|
|
|
:can-admin-list="canAdminList"
|
|
|
|
:disabled="disabled"
|
|
|
|
:board-id="boardId"
|
|
|
|
:group-id="groupId"
|
|
|
|
:root-path="rootPath"
|
|
|
|
/>
|
|
|
|
</div>
|
2020-06-04 09:08:01 +00:00
|
|
|
</template>
|