register create member group action
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { UMB_MEMBER_GROUP_WORKSPACE_PATH } from '../paths.js';
|
||||
import type { UmbEntityActionArgs } from '@umbraco-cms/backoffice/entity-action';
|
||||
import { UmbEntityActionBase } from '@umbraco-cms/backoffice/entity-action';
|
||||
import type { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
|
||||
|
||||
export class UmbCreateMemberGroupEntityAction extends UmbEntityActionBase<never> {
|
||||
constructor(host: UmbControllerHostElement, args: UmbEntityActionArgs<never>) {
|
||||
super(host, args);
|
||||
}
|
||||
|
||||
override async execute() {
|
||||
history.pushState(null, '', UMB_MEMBER_GROUP_WORKSPACE_PATH + '/create');
|
||||
}
|
||||
}
|
||||
|
||||
export { UmbCreateMemberGroupEntityAction as api };
|
||||
@@ -2,10 +2,23 @@ import {
|
||||
UMB_MEMBER_GROUP_DETAIL_REPOSITORY_ALIAS,
|
||||
UMB_MEMBER_GROUP_ITEM_REPOSITORY_ALIAS,
|
||||
} from '../repository/index.js';
|
||||
import { UMB_MEMBER_GROUP_ENTITY_TYPE } from '../entity.js';
|
||||
import { UMB_MEMBER_GROUP_ENTITY_TYPE, UMB_MEMBER_GROUP_ROOT_ENTITY_TYPE } from '../entity.js';
|
||||
import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
|
||||
|
||||
const entityActions: Array<ManifestTypes> = [
|
||||
export const manifests: Array<ManifestTypes> = [
|
||||
{
|
||||
type: 'entityAction',
|
||||
kind: 'default',
|
||||
alias: 'Umb.EntityAction.MemberGroup.Create',
|
||||
name: 'Create Member Group Entity Action',
|
||||
weight: 1200,
|
||||
api: () => import('./create-member-group.action.js'),
|
||||
forEntityTypes: [UMB_MEMBER_GROUP_ROOT_ENTITY_TYPE],
|
||||
meta: {
|
||||
icon: 'icon-add',
|
||||
label: '#actions_create',
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'entityAction',
|
||||
kind: 'delete',
|
||||
@@ -18,5 +31,3 @@ const entityActions: Array<ManifestTypes> = [
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
export const manifests: Array<ManifestTypes> = [...entityActions];
|
||||
|
||||
Reference in New Issue
Block a user