diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/documents/documents/workspace/document-workspace.context.ts b/src/Umbraco.Web.UI.Client/src/backoffice/documents/documents/workspace/document-workspace.context.ts index b6f9dd6516..6a6d0838f8 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/documents/documents/workspace/document-workspace.context.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/documents/documents/workspace/document-workspace.context.ts @@ -7,7 +7,15 @@ import { appendToFrozenArray } from '@umbraco-cms/observable-api'; export class UmbDocumentWorkspaceContext extends UmbWorkspaceContext implements UmbWorkspaceEntityContextInterface { + // Repository notes: + /* + #draft = new ObjectState(undefined); + + + */ + + // Manager will be removed when we get the Repository: #manager = new UmbEntityWorkspaceManager(this._host, 'document', UMB_DOCUMENT_DETAIL_STORE_CONTEXT_TOKEN); public readonly data = this.#manager.state.asObservable(); @@ -26,6 +34,23 @@ export class UmbDocumentWorkspaceContext extends UmbWorkspaceContext implements save = this.#manager.save; destroy = this.#manager.destroy; + /** + * Concept for Repository impl.: + + load(entityKey: string) { + this.#repository.load(entityKey).then((data) => { + this.#draft.next(data) + }) + } + + create(parentKey: string | undefined) { + this.#repository.create(parentKey).then((data) => { + this.#draft.next(data) + }) + } + + */ + // This could eventually be moved out as well? setPropertyValue(alias: string, value: unknown) {