feat: docs managers can action docs & create subdocs (#7077)

* feat: docs managers can action docs & create subdocs

* tests

---------

Co-authored-by: Tom Moor <tom.moor@gmail.com>
This commit is contained in:
Brian Krausz
2024-06-19 19:22:33 -07:00
committed by GitHub
parent 2333602f25
commit 95b9453269
11 changed files with 271 additions and 136 deletions

View File

@@ -88,13 +88,16 @@ export function newTemplatePath(collectionId: string) {
export function newDocumentPath(
collectionId?: string | null,
params: {
parentDocumentId?: string;
templateId?: string;
} = {}
): string {
return collectionId
? `/collection/${collectionId}/new?${queryString.stringify(params)}`
: `/doc/new`;
: `/doc/new?${queryString.stringify(params)}`;
}
export function newNestedDocumentPath(parentDocumentId?: string): string {
return `/doc/new?${queryString.stringify({ parentDocumentId })}`;
}
export function searchPath(