From 8ed7ee1a9dcbfe833a8059ea0702f31368d54142 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Wed, 17 Jan 2024 13:38:06 +0100 Subject: [PATCH] append scaffold data into runtime state, not store --- .../content-type-structure-manager.class.ts | 46 +++++++++++++------ ...document-type-detail.server.data-source.ts | 2 +- 2 files changed, 34 insertions(+), 14 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/content-type-structure-manager.class.ts b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/content-type-structure-manager.class.ts index c50ca0803e..12a2943677 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/content-type-structure-manager.class.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/content-type-structure-manager.class.ts @@ -76,20 +76,32 @@ export class UmbContentTypePropertyStructureManager { - if (docType) { - // TODO: Handle if there was changes made to the owner document type in this context. - /* - possible easy solutions could be to notify user wether they want to update(Discard the changes to accept the new ones). - */ - this.#contentTypes.appendOne(docType); - } - }), + this.observe( + await this.#contentTypeRepository.byUnique(data.unique), + (docType) => { + if (docType) { + // TODO: Handle if there was changes made to the owner document type in this context. + /* + possible easy solutions could be to notify user wether they want to update(Discard the changes to accept the new ones). + */ + this.#contentTypes.appendOne(docType); + } + }, + 'observeContentType_' + data.unique, + ), ); } diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/repository/detail/document-type-detail.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/repository/detail/document-type-detail.server.data-source.ts index 5dd928aa5e..bf05bd670c 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/repository/detail/document-type-detail.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/repository/detail/document-type-detail.server.data-source.ts @@ -42,7 +42,7 @@ export class UmbDocumentTypeDetailServerDataSource implements UmbDetailDataSourc name: '', alias: '', description: '', - icon: '', + icon: 'icon-document', allowedAsRoot: false, variesByCulture: false, variesBySegment: false,