summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/boards/components/issue_count.vue
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/boards/components/issue_count.vue')
-rw-r--r--app/assets/javascripts/boards/components/issue_count.vue36
1 files changed, 36 insertions, 0 deletions
diff --git a/app/assets/javascripts/boards/components/issue_count.vue b/app/assets/javascripts/boards/components/issue_count.vue
new file mode 100644
index 00000000000..c50a3c1c0d3
--- /dev/null
+++ b/app/assets/javascripts/boards/components/issue_count.vue
@@ -0,0 +1,36 @@
+<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>
+ <div class="issue-count">
+ <span class="js-issue-size" :class="{ 'text-danger': issuesExceedMax }">
+ {{ issuesSize }}
+ </span>
+ <span v-if="isMaxLimitSet" class="js-max-issue-size">
+ {{ maxIssueCount }}
+ </span>
+ </div>
+</template>