Migrated some UI to nested sets, app starts now

This commit is contained in:
ThaumRystra
2023-10-01 18:49:20 +02:00
parent e4590de3a7
commit 28a19f2037
11 changed files with 42 additions and 73 deletions

View File

@@ -87,13 +87,15 @@ type FilteredDoc = {
_ancestorOfMatchedDocument?: boolean,
} & TreeDoc;
export default async function filterToForest(
export async function filterToForest(
collection: Mongo.Collection<TreeDoc>,
rootId: string,
filter: Mongo.Selector<TreeDoc>,
options: Mongo.Options<object> = {},
includeFilteredDocAncestors = false,
includeFilteredDocDescendants = false
{
options = <Mongo.Options<object>>{},
includeFilteredDocAncestors = false,
includeFilteredDocDescendants = false
} = {}
): Promise<TreeNode<FilteredDoc>[]> {
// Setup the filter
let collectionFilter = {