feat(themen): count documents across the whole sub-topic tree (#698) #701
@@ -22,6 +22,7 @@ const leafNode = (overrides: Record<string, unknown> = {}) => ({
|
||||
name: 'Personen',
|
||||
color: 'sage',
|
||||
documentCount: 5,
|
||||
subtreeDocumentCount: 5,
|
||||
parentId: null,
|
||||
children: [],
|
||||
...overrides
|
||||
@@ -32,8 +33,18 @@ const parentNode = (overrides: Record<string, unknown> = {}) => ({
|
||||
name: 'Orte',
|
||||
color: 'sienna',
|
||||
documentCount: 0,
|
||||
subtreeDocumentCount: 2,
|
||||
parentId: null,
|
||||
children: [{ id: 'tc1', name: 'Berlin', color: null, documentCount: 2, children: [] }],
|
||||
children: [
|
||||
{
|
||||
id: 'tc1',
|
||||
name: 'Berlin',
|
||||
color: null,
|
||||
documentCount: 2,
|
||||
subtreeDocumentCount: 2,
|
||||
children: []
|
||||
}
|
||||
],
|
||||
...overrides
|
||||
});
|
||||
|
||||
|
||||
@@ -15,9 +15,18 @@ const tree = [
|
||||
name: 'Familie',
|
||||
color: undefined,
|
||||
documentCount: 3,
|
||||
subtreeDocumentCount: 5,
|
||||
parentId: undefined,
|
||||
children: [
|
||||
{ id: 't2', name: 'Eltern', color: undefined, documentCount: 2, parentId: 't1', children: [] }
|
||||
{
|
||||
id: 't2',
|
||||
name: 'Eltern',
|
||||
color: undefined,
|
||||
documentCount: 2,
|
||||
subtreeDocumentCount: 2,
|
||||
parentId: 't1',
|
||||
children: []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -25,6 +34,7 @@ const tree = [
|
||||
name: 'Urlaub',
|
||||
color: 'teal',
|
||||
documentCount: 0,
|
||||
subtreeDocumentCount: 0,
|
||||
parentId: undefined,
|
||||
children: []
|
||||
}
|
||||
@@ -128,6 +138,7 @@ describe('TagsListPanel — color dot', () => {
|
||||
id: 't1',
|
||||
name: 'Familie',
|
||||
documentCount: 0,
|
||||
subtreeDocumentCount: 0,
|
||||
parentId: undefined,
|
||||
children: [],
|
||||
color: undefined
|
||||
|
||||
Reference in New Issue
Block a user