2020-01-01 13:55:28 +05:30
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
name: 'IssueCount',
|
|
|
|
props: {
|
|
|
|
maxIssueCount: {
|
|
|
|
type: Number,
|
|
|
|
required: false,
|
|
|
|
default: 0,
|
|
|
|
},
|
|
|
|
issuesSize: {
|
|
|
|
type: Number,
|
|
|
|
required: false,
|
|
|
|
default: 0,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
isMaxLimitSet() {
|
|
|
|
return this.maxIssueCount !== 0;
|
|
|
|
},
|
|
|
|
issuesExceedMax() {
|
|
|
|
return this.isMaxLimitSet && this.issuesSize > this.maxIssueCount;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2020-03-13 15:44:24 +05:30
|
|
|
<div class="issue-count text-nowrap">
|
2020-01-01 13:55:28 +05:30
|
|
|
<span class="js-issue-size" :class="{ 'text-danger': issuesExceedMax }">
|
|
|
|
{{ issuesSize }}
|
|
|
|
</span>
|
|
|
|
<span v-if="isMaxLimitSet" class="js-max-issue-size">
|
|
|
|
{{ maxIssueCount }}
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</template>
|