diff --git a/plugins/tracker-resources/src/components/issues/Active.svelte b/plugins/tracker-resources/src/components/issues/Active.svelte
index 0dc996db2c3..8dfe9afb795 100644
--- a/plugins/tracker-resources/src/components/issues/Active.svelte
+++ b/plugins/tracker-resources/src/components/issues/Active.svelte
@@ -1,12 +1,10 @@
-
-
- Active issues {todalIssues}
-
- { todalIssues = evt.detail.length } }>
\ No newline at end of file
+
+
diff --git a/plugins/tracker-resources/src/components/issues/Backlog.svelte b/plugins/tracker-resources/src/components/issues/Backlog.svelte
index 807299a962e..901e9866e36 100644
--- a/plugins/tracker-resources/src/components/issues/Backlog.svelte
+++ b/plugins/tracker-resources/src/components/issues/Backlog.svelte
@@ -1,7 +1,10 @@
-
-
\ No newline at end of file
+
+
diff --git a/plugins/tracker-resources/src/components/issues/Issues.svelte b/plugins/tracker-resources/src/components/issues/Issues.svelte
index 56cedd17fa2..8d24e982054 100644
--- a/plugins/tracker-resources/src/components/issues/Issues.svelte
+++ b/plugins/tracker-resources/src/components/issues/Issues.svelte
@@ -16,9 +16,10 @@
import type { DocumentQuery, Ref } from '@anticrm/core'
import { createQuery } from '@anticrm/presentation'
import { Issue, IssueStatus, Team } from '@anticrm/tracker'
- import { ScrollBox } from '@anticrm/ui'
+ import { Label, ScrollBox } from '@anticrm/ui'
import CategoryPresenter from './CategoryPresenter.svelte'
import tracker from '../../plugin'
+ import { IntlString } from '@anticrm/platform'
export let currentSpace: Ref
export let categories = [
@@ -28,15 +29,26 @@
IssueStatus.Done,
IssueStatus.Canceled
]
-
+ export let title: IntlString = tracker.string.AllIssues
export let query: DocumentQuery = {}
export let search: string = ''
+ const spaceQuery = createQuery()
+ const issuesMap: { [status: string]: number } = {}
+
+ $: getTotalIssues = () => {
+ let total = 0
+
+ for (const issuesAmount of Object.values(issuesMap)) {
+ total += issuesAmount
+ }
+
+ return total
+ }
+
$: resultQuery =
search === '' ? { space: currentSpace, ...query } : { $search: search, space: currentSpace, ...query }
- const spaceQuery = createQuery()
-
let currentTeam: Team | undefined
$: spaceQuery.query(tracker.class.Team, { _id: currentSpace }, (res) => {
@@ -46,9 +58,20 @@
{#if currentTeam}
+
+
+
+
{#each categories as category}
-
+ {
+ issuesMap[category] = event.detail
+ }}
+ />
{/each}