diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/entity-actions/create/create.action.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/entity-actions/create/create.action.ts index 52ee5e6f76..ad3b904718 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/entity-actions/create/create.action.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/entity-actions/create/create.action.ts @@ -26,7 +26,7 @@ export class UmbCreateEntityAction extends UmbEntityActionBase { const documentTypeUnique = modalContext.getValue().documentTypeUnique; if (!documentTypeUnique) return; - const url = `section/settings/workspace/${UMB_DOCUMENT_BLUEPRINT_ENTITY_TYPE}/create/parent/${UMB_DOCUMENT_BLUEPRINT_ENTITY_TYPE}/${this.args.unique ?? 'null'}/${documentTypeUnique}`; + const url = `section/settings/workspace/${UMB_DOCUMENT_BLUEPRINT_ENTITY_TYPE}/create/parent/${this.args.entityType}/${this.args.unique ?? 'null'}/${documentTypeUnique}`; history.pushState(null, '', url); } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/entity-actions/create/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/entity-actions/create/manifests.ts index 8de72a79c3..6f9d7d6b9b 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/entity-actions/create/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/entity-actions/create/manifests.ts @@ -1,4 +1,4 @@ -import { UMB_DOCUMENT_BLUEPRINT_ENTITY_TYPE, UMB_DOCUMENT_BLUEPRINT_FOLDER_ENTITY_TYPE } from '../../entity.js'; +import { UMB_DOCUMENT_BLUEPRINT_FOLDER_ENTITY_TYPE, UMB_DOCUMENT_BLUEPRINT_ROOT_ENTITY_TYPE } from '../../entity.js'; import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry'; const entityActions: Array = [ @@ -9,7 +9,7 @@ const entityActions: Array = [ name: 'Document Blueprint Options Create Entity Action', weight: 1200, api: () => import('./create.action.js'), - forEntityTypes: [UMB_DOCUMENT_BLUEPRINT_ENTITY_TYPE, UMB_DOCUMENT_BLUEPRINT_FOLDER_ENTITY_TYPE], + forEntityTypes: [UMB_DOCUMENT_BLUEPRINT_ROOT_ENTITY_TYPE, UMB_DOCUMENT_BLUEPRINT_FOLDER_ENTITY_TYPE], meta: { icon: 'icon-add', label: '#actions_createblueprint', diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/tree/document-blueprint-tree.repository.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/tree/document-blueprint-tree.repository.ts index ac03769d7e..1693ffb46b 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/tree/document-blueprint-tree.repository.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/tree/document-blueprint-tree.repository.ts @@ -1,4 +1,4 @@ -import { UMB_DOCUMENT_BLUEPRINT_ENTITY_TYPE } from '../entity.js'; +import { UMB_DOCUMENT_BLUEPRINT_ROOT_ENTITY_TYPE } from '../entity.js'; import { UmbDocumentBlueprintTreeServerDataSource } from './document-blueprint-tree.server.data-source.js'; import { UMB_DOCUMENT_BLUEPRINT_TREE_STORE_CONTEXT } from './document-blueprint-tree.store.js'; import type { UmbDocumentBlueprintTreeItemModel, UmbDocumentBlueprintTreeRootModel } from './types.js'; @@ -20,7 +20,7 @@ export class UmbDocumentBlueprintTreeRepository const data: UmbDocumentBlueprintTreeRootModel = { unique: null, - entityType: UMB_DOCUMENT_BLUEPRINT_ENTITY_TYPE, + entityType: UMB_DOCUMENT_BLUEPRINT_ROOT_ENTITY_TYPE, name: 'Document Blueprints', hasChildren, isFolder: true, diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/tree/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/tree/manifests.ts index 041906b74a..e69a25717f 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/tree/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/tree/manifests.ts @@ -1,4 +1,8 @@ -import { UMB_DOCUMENT_BLUEPRINT_ENTITY_TYPE, UMB_DOCUMENT_BLUEPRINT_FOLDER_ENTITY_TYPE } from '../entity.js'; +import { + UMB_DOCUMENT_BLUEPRINT_ENTITY_TYPE, + UMB_DOCUMENT_BLUEPRINT_FOLDER_ENTITY_TYPE, + UMB_DOCUMENT_BLUEPRINT_ROOT_ENTITY_TYPE, +} from '../entity.js'; import { UMB_DOCUMENT_BLUEPRINT_TREE_ALIAS, UMB_DOCUMENT_BLUEPRINT_TREE_REPOSITORY_ALIAS, @@ -45,7 +49,11 @@ const treeItem: ManifestTreeItem = { kind: 'default', alias: 'Umb.TreeItem.DocumentBlueprint', name: 'Document Blueprint Tree Item', - forEntityTypes: [UMB_DOCUMENT_BLUEPRINT_ENTITY_TYPE, UMB_DOCUMENT_BLUEPRINT_FOLDER_ENTITY_TYPE], + forEntityTypes: [ + UMB_DOCUMENT_BLUEPRINT_ROOT_ENTITY_TYPE, + UMB_DOCUMENT_BLUEPRINT_ENTITY_TYPE, + UMB_DOCUMENT_BLUEPRINT_FOLDER_ENTITY_TYPE, + ], }; export const manifests: Array = [ diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/tree/reload-tree-item-children/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/tree/reload-tree-item-children/manifests.ts index 54c0de35fa..4fb57f4e6d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/tree/reload-tree-item-children/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/tree/reload-tree-item-children/manifests.ts @@ -1,4 +1,4 @@ -import { UMB_DOCUMENT_BLUEPRINT_ENTITY_TYPE, UMB_DOCUMENT_BLUEPRINT_FOLDER_ENTITY_TYPE } from '../../entity.js'; +import { UMB_DOCUMENT_BLUEPRINT_FOLDER_ENTITY_TYPE, UMB_DOCUMENT_BLUEPRINT_ROOT_ENTITY_TYPE } from '../../entity.js'; import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry'; export const manifests: Array = [ @@ -7,7 +7,7 @@ export const manifests: Array = [ kind: 'reloadTreeItemChildren', alias: 'Umb.EntityAction.DocumentBlueprint.Tree.ReloadChildrenOf', name: 'Reload Document Blueprint Tree Item Children Entity Action', - forEntityTypes: [UMB_DOCUMENT_BLUEPRINT_ENTITY_TYPE, UMB_DOCUMENT_BLUEPRINT_FOLDER_ENTITY_TYPE], + forEntityTypes: [UMB_DOCUMENT_BLUEPRINT_ROOT_ENTITY_TYPE, UMB_DOCUMENT_BLUEPRINT_FOLDER_ENTITY_TYPE], meta: {}, }, ]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/tree/types.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/tree/types.ts index 4c3b9491b5..44cc7dcae7 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/tree/types.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/tree/types.ts @@ -1,7 +1,13 @@ -import type { UmbDocumentBlueprintEntityType, UmbDocumentBlueprintFolderEntityType } from '../entity.js'; +import type { + UmbDocumentBlueprintEntityType, + UmbDocumentBlueprintFolderEntityType, + UmbDocumentBlueprintRootEntityType, +} from '../entity.js'; import type { UmbTreeItemModel, UmbTreeRootModel } from '@umbraco-cms/backoffice/tree'; -export interface UmbDocumentBlueprintTreeRootModel extends UmbTreeRootModel {} +export interface UmbDocumentBlueprintTreeRootModel extends UmbTreeRootModel { + entityType: UmbDocumentBlueprintRootEntityType; +} export interface UmbDocumentBlueprintTreeItemModel extends UmbTreeItemModel { entityType: UmbDocumentBlueprintEntityType | UmbDocumentBlueprintFolderEntityType;