summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/boards/components/board_list_header.vue
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-06-20 11:10:13 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-06-20 11:10:13 +0000
commit0ea3fcec397b69815975647f5e2aa5fe944a8486 (patch)
tree7979381b89d26011bcf9bdc989a40fcc2f1ed4ff /app/assets/javascripts/boards/components/board_list_header.vue
parent72123183a20411a36d607d70b12d57c484394c8e (diff)
downloadgitlab-ce-0ea3fcec397b69815975647f5e2aa5fe944a8486.tar.gz
Add latest changes from gitlab-org/gitlab@15-1-stable-eev15.1.0-rc42
Diffstat (limited to 'app/assets/javascripts/boards/components/board_list_header.vue')
-rw-r--r--app/assets/javascripts/boards/components/board_list_header.vue19
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 -->