diff options
Diffstat (limited to 'app/assets/javascripts/boards/components/board_list_header.vue')
-rw-r--r-- | app/assets/javascripts/boards/components/board_list_header.vue | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/app/assets/javascripts/boards/components/board_list_header.vue b/app/assets/javascripts/boards/components/board_list_header.vue index a4298eb2544..a65269de743 100644 --- a/app/assets/javascripts/boards/components/board_list_header.vue +++ b/app/assets/javascripts/boards/components/board_list_header.vue @@ -45,9 +45,6 @@ export default { }, mixins: [Tracking.mixin(), glFeatureFlagMixin()], inject: { - boardId: { - default: '', - }, weightFeatureAvailable: { default: false, }, @@ -78,7 +75,7 @@ export default { }, }, computed: { - ...mapState(['activeId', 'filterParams']), + ...mapState(['activeId', 'filterParams', 'boardId']), ...mapGetters(['isEpicBoard', 'isSwimlanesOn']), isLoggedIn() { return Boolean(this.currentUserId); @@ -155,6 +152,12 @@ export default { isLoading() { return this.$apollo.queries.boardList.loading; }, + totalWeight() { + return this.boardList?.totalWeight; + }, + canShowTotalWeight() { + return this.weightFeatureAvailable && !this.isLoading; + }, }, apollo: { boardList: { @@ -359,7 +362,7 @@ export default { <div v-if="weightFeatureAvailable && !isLoading"> • <gl-sprintf :message="__('%{totalWeight} total weight')"> - <template #totalWeight>{{ boardList.totalWeight }}</template> + <template #totalWeight>{{ totalWeight }}</template> </gl-sprintf> </div> </gl-tooltip> @@ -384,11 +387,11 @@ export default { /> </span> <!-- EE start --> - <template v-if="weightFeatureAvailable && !isEpicBoard && !isLoading"> + <template v-if="canShowTotalWeight"> <gl-tooltip :target="() => $refs.weightTooltip" :title="weightCountToolTip" /> - <span ref="weightTooltip" class="gl-display-inline-flex gl-ml-3"> + <span ref="weightTooltip" class="gl-display-inline-flex gl-ml-3" data-testid="weight"> <gl-icon class="gl-mr-2" name="weight" /> - {{ boardList.totalWeight }} + {{ totalWeight }} </span> </template> <!-- EE end --> |