debian-mirror-gitlab/app/assets/javascripts/boards/components/item_count.vue

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
727 B
Vue
Raw Normal View History

2020-01-01 13:55:28 +05:30
<script>
export default {
name: 'IssueCount',
props: {
maxIssueCount: {
type: Number,
required: false,
default: 0,
},
2021-04-17 20:07:23 +05:30
itemsSize: {
2020-01-01 13:55:28 +05:30
type: Number,
required: false,
default: 0,
},
},
computed: {
isMaxLimitSet() {
return this.maxIssueCount !== 0;
},
issuesExceedMax() {
2021-04-17 20:07:23 +05:30
return this.isMaxLimitSet && this.itemsSize > this.maxIssueCount;
2020-01-01 13:55:28 +05:30
},
},
};
</script>
<template>
2021-04-17 20:07:23 +05:30
<div class="item-count text-nowrap">
<span :class="{ 'text-danger': issuesExceedMax }" data-testid="board-items-count">
{{ itemsSize }}
2020-01-01 13:55:28 +05:30
</span>
2022-06-21 17:19:12 +05:30
<span v-if="isMaxLimitSet" class="max-issue-size">
2020-01-01 13:55:28 +05:30
{{ maxIssueCount }}
</span>
</div>
</template>