summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/boards/components/board_content_sidebar.vue
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/boards/components/board_content_sidebar.vue')
-rw-r--r--app/assets/javascripts/boards/components/board_content_sidebar.vue18
1 files changed, 13 insertions, 5 deletions
diff --git a/app/assets/javascripts/boards/components/board_content_sidebar.vue b/app/assets/javascripts/boards/components/board_content_sidebar.vue
index 392a73b5859..e6d1e558c37 100644
--- a/app/assets/javascripts/boards/components/board_content_sidebar.vue
+++ b/app/assets/javascripts/boards/components/board_content_sidebar.vue
@@ -6,7 +6,7 @@ import SidebarDropdownWidget from 'ee_else_ce/sidebar/components/sidebar_dropdow
import { __, sprintf } from '~/locale';
import BoardSidebarTimeTracker from '~/boards/components/sidebar/board_sidebar_time_tracker.vue';
import BoardSidebarTitle from '~/boards/components/sidebar/board_sidebar_title.vue';
-import { ISSUABLE, INCIDENT } from '~/boards/constants';
+import { BoardType, ISSUABLE, INCIDENT, issuableTypes } from '~/boards/constants';
import { getIdFromGraphQLId } from '~/graphql_shared/utils';
import SidebarAssigneesWidget from '~/sidebar/components/assignees/sidebar_assignees_widget.vue';
import SidebarConfidentialityWidget from '~/sidebar/components/confidential/sidebar_confidentiality_widget.vue';
@@ -65,17 +65,22 @@ export default {
canUpdate: {
default: false,
},
+ issuableType: {
+ default: issuableTypes.issue,
+ },
+ isGroupBoard: {
+ default: false,
+ },
},
inheritAttrs: false,
computed: {
...mapGetters([
- 'isGroupBoard',
'isSidebarOpen',
'activeBoardItem',
'groupPathForActiveIssue',
'projectPathForActiveIssue',
]),
- ...mapState(['sidebarType', 'issuableType']),
+ ...mapState(['sidebarType']),
isIssuableSidebar() {
return this.sidebarType === ISSUABLE;
},
@@ -91,14 +96,17 @@ export default {
fullPath() {
return this.activeBoardItem?.referencePath?.split('#')[0] || '';
},
+ parentType() {
+ return this.isGroupBoard ? BoardType.group : BoardType.project;
+ },
createLabelTitle() {
return sprintf(__('Create %{workspace} label'), {
- workspace: this.isGroupBoard ? 'group' : 'project',
+ workspace: this.parentType,
});
},
manageLabelTitle() {
return sprintf(__('Manage %{workspace} labels'), {
- workspace: this.isGroupBoard ? 'group' : 'project',
+ workspace: this.parentType,
});
},
attrWorkspacePath() {