use default workspace kind
This commit is contained in:
@@ -0,0 +1 @@
|
||||
export const UMB_MEMBER_GROUP_ROOT_WORKSPACE_ALIAS = 'Umb.Workspace.MemberGroupRoot';
|
||||
@@ -1,13 +1,32 @@
|
||||
import { UMB_MEMBER_GROUP_ROOT_ENTITY_TYPE } from '../../entity.js';
|
||||
import { UMB_MEMBER_GROUP_ROOT_WORKSPACE_ALIAS } from './constants.js';
|
||||
|
||||
export const manifests: Array<UmbExtensionManifest> = [
|
||||
{
|
||||
type: 'workspace',
|
||||
alias: 'Umb.Workspace.MemberGroupRoot',
|
||||
kind: 'default',
|
||||
alias: UMB_MEMBER_GROUP_ROOT_WORKSPACE_ALIAS,
|
||||
name: 'Member Group Root Workspace View',
|
||||
element: () => import('./member-group-root-workspace.element.js'),
|
||||
meta: {
|
||||
entityType: UMB_MEMBER_GROUP_ROOT_ENTITY_TYPE,
|
||||
headline: '#treeHeaders_memberGroups',
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'workspaceView',
|
||||
alias: 'Umb.WorkspaceView.MemberGroupRoot.Collection',
|
||||
name: 'Member Group Root Collection Workspace View',
|
||||
element: () => import('./member-group-root-workspace.element.js'),
|
||||
meta: {
|
||||
label: 'Collection',
|
||||
pathname: 'collection',
|
||||
icon: 'icon-layers',
|
||||
},
|
||||
conditions: [
|
||||
{
|
||||
alias: 'Umb.Condition.WorkspaceAlias',
|
||||
match: UMB_MEMBER_GROUP_ROOT_WORKSPACE_ALIAS,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@@ -6,9 +6,7 @@ const elementName = 'umb-member-group-root-workspace';
|
||||
@customElement(elementName)
|
||||
export class UmbMemberGroupRootWorkspaceElement extends UmbLitElement {
|
||||
override render() {
|
||||
return html` <umb-body-layout main-no-padding headline=${this.localize.term('treeHeaders_memberGroups')}>
|
||||
<umb-collection alias=${UMB_MEMBER_GROUP_COLLECTION_ALIAS}></umb-collection>;
|
||||
</umb-body-layout>`;
|
||||
return html` <umb-collection alias=${UMB_MEMBER_GROUP_COLLECTION_ALIAS}></umb-collection>`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
export const UMB_MEMBER_ROOT_WORKSPACE_ALIAS = 'Umb.Workspace.MemberRoot';
|
||||
@@ -1,13 +1,32 @@
|
||||
import { UMB_MEMBER_ROOT_ENTITY_TYPE } from '../../entity.js';
|
||||
import { UMB_MEMBER_ROOT_WORKSPACE_ALIAS } from './constants.js';
|
||||
|
||||
export const manifests: Array<UmbExtensionManifest> = [
|
||||
{
|
||||
type: 'workspace',
|
||||
alias: 'Umb.Workspace.MemberRoot',
|
||||
name: 'Member Root Workspace View',
|
||||
element: () => import('./member-root-workspace.element.js'),
|
||||
kind: 'default',
|
||||
alias: UMB_MEMBER_ROOT_WORKSPACE_ALIAS,
|
||||
name: 'Member Root Workspace',
|
||||
meta: {
|
||||
entityType: UMB_MEMBER_ROOT_ENTITY_TYPE,
|
||||
headline: '#treeHeaders_member',
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'workspaceView',
|
||||
alias: 'Umb.WorkspaceView.MemberRoot.Collection',
|
||||
name: 'Member Root Collection Workspace View',
|
||||
element: () => import('./member-root-workspace.element.js'),
|
||||
meta: {
|
||||
label: 'Collection',
|
||||
pathname: 'collection',
|
||||
icon: 'icon-layers',
|
||||
},
|
||||
conditions: [
|
||||
{
|
||||
alias: 'Umb.Condition.WorkspaceAlias',
|
||||
match: UMB_MEMBER_ROOT_WORKSPACE_ALIAS,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@@ -1,24 +1,12 @@
|
||||
import { UMB_MEMBER_COLLECTION_ALIAS } from '../../collection/index.js';
|
||||
import { UMB_MEMBER_ROOT_ENTITY_TYPE } from '../../entity.js';
|
||||
import { UmbEntityContext } from '@umbraco-cms/backoffice/entity';
|
||||
import { html, customElement } from '@umbraco-cms/backoffice/external/lit';
|
||||
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
|
||||
|
||||
const elementName = 'umb-member-root-workspace';
|
||||
@customElement(elementName)
|
||||
export class UmbMemberRootWorkspaceElement extends UmbLitElement {
|
||||
constructor() {
|
||||
super();
|
||||
// TODO: this.should happen automatically
|
||||
const entityContext = new UmbEntityContext(this);
|
||||
entityContext.setEntityType(UMB_MEMBER_ROOT_ENTITY_TYPE);
|
||||
entityContext.setUnique(null);
|
||||
}
|
||||
|
||||
override render() {
|
||||
return html` <umb-body-layout main-no-padding headline=${this.localize.term('treeHeaders_member')}>
|
||||
<umb-collection alias=${UMB_MEMBER_COLLECTION_ALIAS}></umb-collection>;
|
||||
</umb-body-layout>`;
|
||||
return html` <umb-collection alias=${UMB_MEMBER_COLLECTION_ALIAS}></umb-collection>; `;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user