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:
@@ -51,6 +51,7 @@ import {
|
||||
documentHistoryPath,
|
||||
homePath,
|
||||
newDocumentPath,
|
||||
newNestedDocumentPath,
|
||||
searchPath,
|
||||
documentPath,
|
||||
urlify,
|
||||
@@ -141,15 +142,10 @@ export const createNestedDocument = createAction({
|
||||
!!activeDocumentId &&
|
||||
stores.policies.abilities(currentTeamId).createDocument &&
|
||||
stores.policies.abilities(activeDocumentId).createChildDocument,
|
||||
perform: ({ activeCollectionId, activeDocumentId, inStarredSection }) =>
|
||||
history.push(
|
||||
newDocumentPath(activeCollectionId, {
|
||||
parentDocumentId: activeDocumentId,
|
||||
}),
|
||||
{
|
||||
starred: inStarredSection,
|
||||
}
|
||||
),
|
||||
perform: ({ activeDocumentId, inStarredSection }) =>
|
||||
history.push(newNestedDocumentPath(activeDocumentId), {
|
||||
starred: inStarredSection,
|
||||
}),
|
||||
});
|
||||
|
||||
export const starDocument = createAction({
|
||||
|
||||
Reference in New Issue
Block a user