Merge pull request #1862 from umbraco/bugfix/document-blueprint-entity-actions
Bugfix/document blueprint entity actions
This commit is contained in:
@@ -26,7 +26,7 @@ export class UmbCreateEntityAction extends UmbEntityActionBase<never> {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<ManifestTypes> = [
|
||||
@@ -9,7 +9,7 @@ const entityActions: Array<ManifestTypes> = [
|
||||
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',
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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<ManifestTypes> = [
|
||||
|
||||
@@ -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<ManifestTypes> = [
|
||||
@@ -7,7 +7,7 @@ export const manifests: Array<ManifestTypes> = [
|
||||
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: {},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user