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>
|
|
|
|
<span v-if="isMaxLimitSet" class="js-max-issue-size">
|
|
|
|
{{ maxIssueCount }}
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</template>
|