batch 9
This commit is contained in:
@@ -28,7 +28,7 @@ export class UmbDocumentTypeWorkspaceContext
|
||||
readonly compositions;
|
||||
|
||||
// Document type specific:
|
||||
readonly allowedTemplateKeys;
|
||||
readonly allowedTemplateIds;
|
||||
readonly defaultTemplateKey;
|
||||
readonly cleanup;
|
||||
|
||||
@@ -53,7 +53,7 @@ export class UmbDocumentTypeWorkspaceContext
|
||||
this.compositions = this.structure.rootDocumentTypeObservablePart((data) => data?.compositions);
|
||||
|
||||
// Document type specific:
|
||||
this.allowedTemplateKeys = this.structure.rootDocumentTypeObservablePart((data) => data?.allowedTemplateKeys);
|
||||
this.allowedTemplateIds = this.structure.rootDocumentTypeObservablePart((data) => data?.allowedTemplateIds);
|
||||
this.defaultTemplateKey = this.structure.rootDocumentTypeObservablePart((data) => data?.defaultTemplateKey);
|
||||
this.cleanup = this.structure.rootDocumentTypeObservablePart((data) => data?.defaultTemplateKey);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ export class UmbDocumentTypeWorkspaceViewTemplatesElement extends UmbLitElement
|
||||
<div id="templates" slot="editor">
|
||||
<umb-input-template-picker
|
||||
.defaultKey="${/*this._documentType?.defaultTemplateKey ??*/ ''}"
|
||||
.allowedKeys="${/*this._documentType?.allowedTemplateKeys ??*/ []}"
|
||||
.allowedKeys="${/*this._documentType?.allowedTemplateIds ??*/ []}"
|
||||
@change-default="${this.#changeDefaultKey}"
|
||||
@change-allowed="${this.#changeAllowedKeys}"></umb-input-template-picker>
|
||||
</div>
|
||||
|
||||
@@ -26,9 +26,9 @@ export class UmbCreateDocumentEntityAction extends UmbEntityActionBase<UmbDocume
|
||||
|
||||
const { data } = await this.repository.requestById(this.unique);
|
||||
|
||||
if (data && data.contentTypeKey) {
|
||||
if (data && data.contentTypeId) {
|
||||
const modalHandler = this.#modalContext?.open(UMB_ALLOWED_DOCUMENT_TYPES_MODAL, {
|
||||
key: data.contentTypeKey,
|
||||
key: data.contentTypeId,
|
||||
});
|
||||
|
||||
const { documentTypeKey } = await modalHandler.onSubmit();
|
||||
|
||||
@@ -29,11 +29,11 @@ export class UmbDocumentWorkspaceContext
|
||||
*/
|
||||
#draft = new ObjectState<EntityType | undefined>(undefined);
|
||||
readonly unique = this.#draft.getObservablePart((data) => data?.id);
|
||||
readonly documentTypeKey = this.#draft.getObservablePart((data) => data?.contentTypeKey);
|
||||
readonly documentTypeKey = this.#draft.getObservablePart((data) => data?.contentTypeId);
|
||||
|
||||
readonly variants = this.#draft.getObservablePart((data) => data?.variants || []);
|
||||
readonly urls = this.#draft.getObservablePart((data) => data?.urls || []);
|
||||
readonly templateKey = this.#draft.getObservablePart((data) => data?.templateKey || null);
|
||||
readonly templateId = this.#draft.getObservablePart((data) => data?.templateId || null);
|
||||
|
||||
readonly structure;
|
||||
readonly splitView;
|
||||
|
||||
Reference in New Issue
Block a user