2021-03-16 02:09:57 -04:00
|
|
|
<script>
|
|
|
|
import { GlDrawer } from '@gitlab/ui';
|
2021-06-23 17:08:33 -04:00
|
|
|
import { MountingPortal } from 'portal-vue';
|
2021-03-16 02:09:57 -04:00
|
|
|
import { mapState, mapActions, mapGetters } from 'vuex';
|
2021-06-08 05:09:56 -04:00
|
|
|
import SidebarDropdownWidget from 'ee_else_ce/sidebar/components/sidebar_dropdown_widget.vue';
|
2021-03-16 02:09:57 -04:00
|
|
|
import BoardSidebarLabelsSelect from '~/boards/components/sidebar/board_sidebar_labels_select.vue';
|
|
|
|
import BoardSidebarTimeTracker from '~/boards/components/sidebar/board_sidebar_time_tracker.vue';
|
2021-04-09 05:09:10 -04:00
|
|
|
import BoardSidebarTitle from '~/boards/components/sidebar/board_sidebar_title.vue';
|
2021-03-16 02:09:57 -04:00
|
|
|
import { ISSUABLE } from '~/boards/constants';
|
|
|
|
import SidebarAssigneesWidget from '~/sidebar/components/assignees/sidebar_assignees_widget.vue';
|
2021-04-29 17:10:03 -04:00
|
|
|
import SidebarConfidentialityWidget from '~/sidebar/components/confidential/sidebar_confidentiality_widget.vue';
|
2021-06-11 08:09:49 -04:00
|
|
|
import SidebarDateWidget from '~/sidebar/components/date/sidebar_date_widget.vue';
|
2021-05-04 08:10:04 -04:00
|
|
|
import SidebarSubscriptionsWidget from '~/sidebar/components/subscriptions/sidebar_subscriptions_widget.vue';
|
2021-06-14 11:09:48 -04:00
|
|
|
import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
|
2021-03-16 02:09:57 -04:00
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
GlDrawer,
|
2021-04-09 05:09:10 -04:00
|
|
|
BoardSidebarTitle,
|
2021-03-16 02:09:57 -04:00
|
|
|
SidebarAssigneesWidget,
|
2021-06-11 08:09:49 -04:00
|
|
|
SidebarDateWidget,
|
2021-04-29 17:10:03 -04:00
|
|
|
SidebarConfidentialityWidget,
|
2021-03-16 02:09:57 -04:00
|
|
|
BoardSidebarTimeTracker,
|
|
|
|
BoardSidebarLabelsSelect,
|
2021-05-04 08:10:04 -04:00
|
|
|
SidebarSubscriptionsWidget,
|
2021-06-08 05:09:56 -04:00
|
|
|
SidebarDropdownWidget,
|
2021-06-23 17:08:33 -04:00
|
|
|
MountingPortal,
|
2021-03-16 11:11:17 -04:00
|
|
|
BoardSidebarWeightInput: () =>
|
|
|
|
import('ee_component/boards/components/sidebar/board_sidebar_weight_input.vue'),
|
2021-06-14 11:09:48 -04:00
|
|
|
IterationSidebarDropdownWidget: () =>
|
|
|
|
import('ee_component/sidebar/components/iteration_sidebar_dropdown_widget.vue'),
|
2021-03-16 02:09:57 -04:00
|
|
|
},
|
2021-06-14 11:09:48 -04:00
|
|
|
mixins: [glFeatureFlagMixin()],
|
2021-05-07 05:10:27 -04:00
|
|
|
inject: {
|
2021-05-11 20:10:27 -04:00
|
|
|
multipleAssigneesFeatureAvailable: {
|
|
|
|
default: false,
|
|
|
|
},
|
2021-05-07 05:10:27 -04:00
|
|
|
epicFeatureAvailable: {
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
iterationFeatureAvailable: {
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
weightFeatureAvailable: {
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
},
|
2021-06-23 17:08:33 -04:00
|
|
|
inheritAttrs: false,
|
2021-03-16 02:09:57 -04:00
|
|
|
computed: {
|
|
|
|
...mapGetters([
|
|
|
|
'isSidebarOpen',
|
2021-04-06 05:09:03 -04:00
|
|
|
'activeBoardItem',
|
2021-03-16 02:09:57 -04:00
|
|
|
'groupPathForActiveIssue',
|
|
|
|
'projectPathForActiveIssue',
|
|
|
|
]),
|
|
|
|
...mapState(['sidebarType', 'issuableType']),
|
|
|
|
isIssuableSidebar() {
|
|
|
|
return this.sidebarType === ISSUABLE;
|
|
|
|
},
|
|
|
|
showSidebar() {
|
|
|
|
return this.isIssuableSidebar && this.isSidebarOpen;
|
|
|
|
},
|
|
|
|
fullPath() {
|
2021-04-06 05:09:03 -04:00
|
|
|
return this.activeBoardItem?.referencePath?.split('#')[0] || '';
|
2021-03-16 02:09:57 -04:00
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
2021-04-29 17:10:03 -04:00
|
|
|
...mapActions(['toggleBoardItem', 'setAssignees', 'setActiveItemConfidential']),
|
2021-03-16 02:09:57 -04:00
|
|
|
handleClose() {
|
2021-04-06 05:09:03 -04:00
|
|
|
this.toggleBoardItem({ boardItem: this.activeBoardItem, sidebarType: this.sidebarType });
|
2021-03-16 02:09:57 -04:00
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2021-06-23 17:08:33 -04:00
|
|
|
<mounting-portal mount-to="#js-right-sidebar-portal" name="board-content-sidebar" append>
|
|
|
|
<gl-drawer
|
|
|
|
v-if="showSidebar"
|
|
|
|
v-bind="$attrs"
|
|
|
|
:open="isSidebarOpen"
|
2021-06-24 02:07:09 -04:00
|
|
|
class="boards-sidebar gl-absolute"
|
2021-06-23 17:08:33 -04:00
|
|
|
@close="handleClose"
|
|
|
|
>
|
2021-06-30 05:08:07 -04:00
|
|
|
<template #header>
|
|
|
|
<h2 class="gl-my-0 gl-font-size-h2 gl-line-height-24">{{ __('Issue details') }}</h2>
|
|
|
|
</template>
|
2021-06-23 17:08:33 -04:00
|
|
|
<template #default>
|
|
|
|
<board-sidebar-title />
|
|
|
|
<sidebar-assignees-widget
|
|
|
|
:iid="activeBoardItem.iid"
|
|
|
|
:full-path="fullPath"
|
|
|
|
:initial-assignees="activeBoardItem.assignees"
|
|
|
|
:allow-multiple-assignees="multipleAssigneesFeatureAvailable"
|
|
|
|
@assignees-updated="setAssignees"
|
|
|
|
/>
|
2021-06-08 05:09:56 -04:00
|
|
|
<sidebar-dropdown-widget
|
2021-06-23 17:08:33 -04:00
|
|
|
v-if="epicFeatureAvailable"
|
2021-06-08 05:09:56 -04:00
|
|
|
:iid="activeBoardItem.iid"
|
2021-06-23 17:08:33 -04:00
|
|
|
issuable-attribute="epic"
|
2021-06-08 05:09:56 -04:00
|
|
|
:workspace-path="projectPathForActiveIssue"
|
2021-06-23 17:08:33 -04:00
|
|
|
:attr-workspace-path="groupPathForActiveIssue"
|
2021-06-08 05:09:56 -04:00
|
|
|
:issuable-type="issuableType"
|
2021-06-23 17:08:33 -04:00
|
|
|
data-testid="sidebar-epic"
|
2021-06-08 05:09:56 -04:00
|
|
|
/>
|
2021-06-23 17:08:33 -04:00
|
|
|
<div>
|
2021-06-14 11:09:48 -04:00
|
|
|
<sidebar-dropdown-widget
|
|
|
|
:iid="activeBoardItem.iid"
|
2021-06-23 17:08:33 -04:00
|
|
|
issuable-attribute="milestone"
|
2021-06-14 11:09:48 -04:00
|
|
|
:workspace-path="projectPathForActiveIssue"
|
2021-06-23 17:08:33 -04:00
|
|
|
:attr-workspace-path="projectPathForActiveIssue"
|
2021-06-14 11:09:48 -04:00
|
|
|
:issuable-type="issuableType"
|
2021-06-23 17:08:33 -04:00
|
|
|
data-testid="sidebar-milestones"
|
2021-06-14 11:09:48 -04:00
|
|
|
/>
|
2021-06-23 17:08:33 -04:00
|
|
|
<template v-if="!glFeatures.iterationCadences">
|
|
|
|
<sidebar-dropdown-widget
|
|
|
|
v-if="iterationFeatureAvailable"
|
|
|
|
:iid="activeBoardItem.iid"
|
|
|
|
issuable-attribute="iteration"
|
|
|
|
:workspace-path="projectPathForActiveIssue"
|
|
|
|
:attr-workspace-path="groupPathForActiveIssue"
|
|
|
|
:issuable-type="issuableType"
|
|
|
|
class="gl-mt-5"
|
|
|
|
data-testid="iteration-edit"
|
|
|
|
/>
|
|
|
|
</template>
|
|
|
|
<template v-else>
|
|
|
|
<iteration-sidebar-dropdown-widget
|
|
|
|
v-if="iterationFeatureAvailable"
|
|
|
|
:iid="activeBoardItem.iid"
|
|
|
|
:workspace-path="projectPathForActiveIssue"
|
|
|
|
:attr-workspace-path="groupPathForActiveIssue"
|
|
|
|
:issuable-type="issuableType"
|
|
|
|
class="gl-mt-5"
|
|
|
|
data-testid="iteration-edit"
|
|
|
|
/>
|
|
|
|
</template>
|
|
|
|
</div>
|
|
|
|
<board-sidebar-time-tracker class="swimlanes-sidebar-time-tracker" />
|
|
|
|
<sidebar-date-widget
|
|
|
|
:iid="activeBoardItem.iid"
|
|
|
|
:full-path="fullPath"
|
|
|
|
:issuable-type="issuableType"
|
|
|
|
data-testid="sidebar-due-date"
|
|
|
|
/>
|
|
|
|
<board-sidebar-labels-select class="labels" />
|
|
|
|
<board-sidebar-weight-input v-if="weightFeatureAvailable" class="weight" />
|
|
|
|
<sidebar-confidentiality-widget
|
|
|
|
:iid="activeBoardItem.iid"
|
|
|
|
:full-path="fullPath"
|
|
|
|
:issuable-type="issuableType"
|
|
|
|
@confidentialityUpdated="setActiveItemConfidential($event)"
|
|
|
|
/>
|
|
|
|
<sidebar-subscriptions-widget
|
|
|
|
:iid="activeBoardItem.iid"
|
|
|
|
:full-path="fullPath"
|
|
|
|
:issuable-type="issuableType"
|
|
|
|
data-testid="sidebar-notifications"
|
|
|
|
/>
|
|
|
|
</template>
|
|
|
|
</gl-drawer>
|
|
|
|
</mounting-portal>
|
2021-03-16 02:09:57 -04:00
|
|
|
</template>
|