diff --git a/app/assets/javascripts/work_items/components/work_item_detail.vue b/app/assets/javascripts/work_items/components/work_item_detail.vue index 1592cb02a2d96a45b1999dd10fe4ceac517ea56b..037c95a42549af9fc5e1fb9edc348a2d75b68a03 100644 --- a/app/assets/javascripts/work_items/components/work_item_detail.vue +++ b/app/assets/javascripts/work_items/components/work_item_detail.vue @@ -864,6 +864,7 @@ export default { :can-update-children="canUpdateChildren" :confidential="workItem.confidential" :allowed-child-types="allowedChildTypes" + :is-drawer="isDrawer" @show-modal="openInModal" @addChild="$emit('addChild')" @childrenLoaded="hasChildren = $event" diff --git a/app/assets/javascripts/work_items/components/work_item_links/work_item_tree.vue b/app/assets/javascripts/work_items/components/work_item_links/work_item_tree.vue index 3a08895259da457cda1855aa1529a00a177cb0b0..c7edd4a9a5534c231720fde07f83b7abd9258daf 100644 --- a/app/assets/javascripts/work_items/components/work_item_links/work_item_tree.vue +++ b/app/assets/javascripts/work_items/components/work_item_links/work_item_tree.vue @@ -49,8 +49,10 @@ export default { WorkItemRolledUpData, }, inject: ['hasSubepicsFeature'], - provide: { - [INJECTION_LINK_CHILD_PREVENT_ROUTER_NAVIGATION]: true, + provide() { + return { + [INJECTION_LINK_CHILD_PREVENT_ROUTER_NAVIGATION]: !this.isDrawer, + }; }, props: { fullPath: { @@ -100,6 +102,11 @@ export default { required: false, default: () => [], }, + isDrawer: { + type: Boolean, + required: false, + default: false, + }, }, data() { return { diff --git a/app/assets/javascripts/work_items/constants.js b/app/assets/javascripts/work_items/constants.js index d337fb10a5effb5cdd354688d9d232908a383e72..5f59a6b42ef87d7dcd0d8201b41dea4aee57ef0d 100644 --- a/app/assets/javascripts/work_items/constants.js +++ b/app/assets/javascripts/work_items/constants.js @@ -373,4 +373,6 @@ export const WORKITEM_LINKS_SHOWLABELS_LOCALSTORAGEKEY = 'workItemLinks.showLabe export const WORKITEM_TREE_SHOWLABELS_LOCALSTORAGEKEY = 'workItemTree.showLabels'; export const WORKITEM_RELATIONSHIPS_SHOWLABELS_LOCALSTORAGEKEY = 'workItemRelationships.showLabels'; -export const INJECTION_LINK_CHILD_PREVENT_ROUTER_NAVIGATION = 'injection:prevent-router-navigation'; +export const INJECTION_LINK_CHILD_PREVENT_ROUTER_NAVIGATION = Symbol( + 'injection:prevent-router-navigation', +);