Skip to content

Commit 4e05db1

Browse files
authored
Merge pull request #2297 from umbraco/v15/feature/member-sidebar-menu
Feature: Members section sidebar menu
2 parents c28d563 + b94b2b9 commit 4e05db1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+661
-328
lines changed

package-lock.json

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/packages/members/manifests.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { manifests as memberGroupManifests } from './member-group/manifests.js';
22
import { manifests as memberManifests } from './member/manifests.js';
3-
import { manifests as memberSectionManifests } from './member-section/manifests.js';
43
import { manifests as memberTypeManifests } from './member-type/manifests.js';
4+
import { manifests as sectionManifests } from './section/manifests.js';
5+
56
import type { UmbExtensionManifestKind } from '@umbraco-cms/backoffice/extension-registry';
67

78
import './member/components/index.js';
@@ -10,6 +11,6 @@ import './member-group/components/index.js';
1011
export const manifests: Array<UmbExtensionManifest | UmbExtensionManifestKind> = [
1112
...memberGroupManifests,
1213
...memberManifests,
13-
...memberSectionManifests,
1414
...memberTypeManifests,
15+
...sectionManifests,
1516
];
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { UMB_MEMBER_GROUP_WORKSPACE_PATH } from '../paths.js';
2+
import type { UmbEntityActionArgs } from '@umbraco-cms/backoffice/entity-action';
3+
import { UmbEntityActionBase } from '@umbraco-cms/backoffice/entity-action';
4+
import type { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
5+
6+
export class UmbCreateMemberGroupEntityAction extends UmbEntityActionBase<never> {
7+
constructor(host: UmbControllerHostElement, args: UmbEntityActionArgs<never>) {
8+
super(host, args);
9+
}
10+
11+
override async execute() {
12+
history.pushState(null, '', UMB_MEMBER_GROUP_WORKSPACE_PATH + '/create');
13+
}
14+
}
15+
16+
export { UmbCreateMemberGroupEntityAction as api };

src/packages/members/member-group/entity-actions/manifests.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,22 @@ import {
22
UMB_MEMBER_GROUP_DETAIL_REPOSITORY_ALIAS,
33
UMB_MEMBER_GROUP_ITEM_REPOSITORY_ALIAS,
44
} from '../repository/index.js';
5-
import { UMB_MEMBER_GROUP_ENTITY_TYPE } from '../entity.js';
5+
import { UMB_MEMBER_GROUP_ENTITY_TYPE, UMB_MEMBER_GROUP_ROOT_ENTITY_TYPE } from '../entity.js';
66

77
export const manifests: Array<UmbExtensionManifest> = [
8+
{
9+
type: 'entityAction',
10+
kind: 'default',
11+
alias: 'Umb.EntityAction.MemberGroup.Create',
12+
name: 'Create Member Group Entity Action',
13+
weight: 1200,
14+
api: () => import('./create-member-group.action.js'),
15+
forEntityTypes: [UMB_MEMBER_GROUP_ROOT_ENTITY_TYPE],
16+
meta: {
17+
icon: 'icon-add',
18+
label: '#actions_create',
19+
},
20+
},
821
{
922
type: 'entityAction',
1023
kind: 'delete',
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
import { manifests as collectionManifests } from './collection/manifests.js';
22
import { manifests as entityActionManifests } from './entity-actions/manifests.js';
33
import { manifests as memberGroupPickerModalManifests } from './components/member-group-picker-modal/manifests.js';
4+
import { manifests as menuItemManifests } from './menu-item/manifests.js';
45
import { manifests as propertyEditorManifests } from './property-editor/manifests.js';
56
import { manifests as repositoryManifests } from './repository/manifests.js';
6-
import { manifests as sectionViewManifests } from './section-view/manifests.js';
77
import { manifests as workspaceManifests } from './workspace/manifests.js';
88

9-
export const manifests: Array<UmbExtensionManifest> = [
9+
import type { UmbExtensionManifestKind } from '@umbraco-cms/backoffice/extension-registry';
10+
11+
export const manifests: Array<UmbExtensionManifest | UmbExtensionManifestKind> = [
1012
...collectionManifests,
1113
...entityActionManifests,
1214
...memberGroupPickerModalManifests,
15+
...menuItemManifests,
1316
...propertyEditorManifests,
1417
...repositoryManifests,
15-
...sectionViewManifests,
1618
...workspaceManifests,
1719
];
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { UMB_MEMBER_MANAGEMENT_MENU_ALIAS } from '../../section/menu/constants.js';
2+
import { UMB_MEMBER_GROUP_ROOT_ENTITY_TYPE } from '../entity.js';
3+
import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
4+
5+
export const manifests: Array<ManifestTypes> = [
6+
{
7+
type: 'menuItem',
8+
alias: 'Umb.MenuItem.MemberGroups',
9+
name: 'Member Groups Menu Item',
10+
weight: 100,
11+
meta: {
12+
label: '#treeHeaders_memberGroups',
13+
icon: 'icon-users',
14+
entityType: UMB_MEMBER_GROUP_ROOT_ENTITY_TYPE,
15+
menus: [UMB_MEMBER_MANAGEMENT_MENU_ALIAS],
16+
},
17+
},
18+
];
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { UMB_MEMBER_MANAGEMENT_SECTION_PATHNAME } from '../section/paths.js';
2+
import { UMB_MEMBER_GROUP_ENTITY_TYPE, UMB_MEMBER_GROUP_ROOT_ENTITY_TYPE } from './entity.js';
3+
import { UMB_WORKSPACE_PATH_PATTERN } from '@umbraco-cms/backoffice/workspace';
4+
5+
export const UMB_MEMBER_GROUP_WORKSPACE_PATH = UMB_WORKSPACE_PATH_PATTERN.generateAbsolute({
6+
sectionName: UMB_MEMBER_MANAGEMENT_SECTION_PATHNAME,
7+
entityType: UMB_MEMBER_GROUP_ENTITY_TYPE,
8+
});
9+
10+
export const UMB_MEMBER_GROUP_ROOT_WORKSPACE_PATH = UMB_WORKSPACE_PATH_PATTERN.generateAbsolute({
11+
sectionName: UMB_MEMBER_MANAGEMENT_SECTION_PATHNAME,
12+
entityType: UMB_MEMBER_GROUP_ROOT_ENTITY_TYPE,
13+
});

src/packages/members/member-group/section-view/manifests.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/packages/members/member-group/section-view/member-group-section-view.element.ts

Lines changed: 0 additions & 61 deletions
This file was deleted.
Lines changed: 6 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,9 @@
1-
import { UMB_MEMBER_GROUP_ENTITY_TYPE } from '../entity.js';
2-
import { UmbSubmitWorkspaceAction } from '@umbraco-cms/backoffice/workspace';
1+
import { manifests as memberGroupManifests } from './member-group/manifests.js';
2+
import { manifests as memberGroupRootManifests } from './member-group-root/manifests.js';
33

4-
export const UMB_MEMBER_GROUP_WORKSPACE_ALIAS = 'Umb.Workspace.MemberGroup';
4+
import type { UmbExtensionManifestKind } from '@umbraco-cms/backoffice/extension-registry';
55

6-
export const manifests: Array<UmbExtensionManifest> = [
7-
{
8-
type: 'workspace',
9-
kind: 'routable',
10-
alias: UMB_MEMBER_GROUP_WORKSPACE_ALIAS,
11-
name: 'MemberGroup Workspace',
12-
api: () => import('./member-group-workspace.context.js'),
13-
meta: {
14-
entityType: UMB_MEMBER_GROUP_ENTITY_TYPE,
15-
},
16-
},
17-
{
18-
type: 'workspaceAction',
19-
kind: 'default',
20-
alias: 'Umb.WorkspaceAction.MemberGroup.Save',
21-
name: 'Save Member Group Workspace Action',
22-
api: UmbSubmitWorkspaceAction,
23-
meta: {
24-
label: '#buttons_save',
25-
look: 'primary',
26-
color: 'positive',
27-
},
28-
conditions: [
29-
{
30-
alias: 'Umb.Condition.WorkspaceAlias',
31-
match: UMB_MEMBER_GROUP_WORKSPACE_ALIAS,
32-
},
33-
],
34-
},
35-
{
36-
type: 'workspaceView',
37-
alias: 'Umb.WorkspaceView.Member.Info',
38-
name: 'Member Workspace info View',
39-
js: () => import('./views/info/member-type-workspace-view-info.element.js'),
40-
weight: 300,
41-
meta: {
42-
label: '#general_info',
43-
pathname: 'info',
44-
icon: 'icon-document',
45-
},
46-
conditions: [
47-
{
48-
alias: 'Umb.Condition.WorkspaceAlias',
49-
match: UMB_MEMBER_GROUP_WORKSPACE_ALIAS,
50-
},
51-
],
52-
},
6+
export const manifests: Array<UmbExtensionManifest | UmbExtensionManifestKind> = [
7+
...memberGroupManifests,
8+
...memberGroupRootManifests,
539
];

0 commit comments

Comments
 (0)