Fix issue unsaved changes always displayed when trying to move away from blueprint (#19804)
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
This commit is contained in:
@@ -6,6 +6,9 @@ export type UmbDocumentBlueprintRootEntityType = typeof UMB_DOCUMENT_BLUEPRINT_R
|
|||||||
export type UmbDocumentBlueprintEntityType = typeof UMB_DOCUMENT_BLUEPRINT_ENTITY_TYPE;
|
export type UmbDocumentBlueprintEntityType = typeof UMB_DOCUMENT_BLUEPRINT_ENTITY_TYPE;
|
||||||
export type UmbDocumentBlueprintFolderEntityType = typeof UMB_DOCUMENT_BLUEPRINT_FOLDER_ENTITY_TYPE;
|
export type UmbDocumentBlueprintFolderEntityType = typeof UMB_DOCUMENT_BLUEPRINT_FOLDER_ENTITY_TYPE;
|
||||||
|
|
||||||
|
export const UMB_DOCUMENT_BLUEPRINT_PROPERTY_VALUE_ENTITY_TYPE = `${UMB_DOCUMENT_BLUEPRINT_ENTITY_TYPE}-property-value`;
|
||||||
|
export type UmbDocumentBlueprintPropertyValueEntityType = typeof UMB_DOCUMENT_BLUEPRINT_PROPERTY_VALUE_ENTITY_TYPE;
|
||||||
|
|
||||||
export type UmbDocumentBlueprintEntityTypeUnion =
|
export type UmbDocumentBlueprintEntityTypeUnion =
|
||||||
| UmbDocumentBlueprintRootEntityType
|
| UmbDocumentBlueprintRootEntityType
|
||||||
| UmbDocumentBlueprintEntityType
|
| UmbDocumentBlueprintEntityType
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { UmbDocumentBlueprintDetailModel } from '../../types.js';
|
import type { UmbDocumentBlueprintDetailModel } from '../../types.js';
|
||||||
import { UMB_DOCUMENT_BLUEPRINT_ENTITY_TYPE } from '../../entity.js';
|
import { UMB_DOCUMENT_BLUEPRINT_ENTITY_TYPE, UMB_DOCUMENT_BLUEPRINT_PROPERTY_VALUE_ENTITY_TYPE } from '../../entity.js';
|
||||||
import { UmbId } from '@umbraco-cms/backoffice/id';
|
import { UmbId } from '@umbraco-cms/backoffice/id';
|
||||||
import type { UmbDataSourceResponse, UmbDetailDataSource } from '@umbraco-cms/backoffice/repository';
|
import type { UmbDataSourceResponse, UmbDetailDataSource } from '@umbraco-cms/backoffice/repository';
|
||||||
import type {
|
import type {
|
||||||
@@ -9,7 +9,6 @@ import type {
|
|||||||
} from '@umbraco-cms/backoffice/external/backend-api';
|
} from '@umbraco-cms/backoffice/external/backend-api';
|
||||||
import { DocumentBlueprintService } from '@umbraco-cms/backoffice/external/backend-api';
|
import { DocumentBlueprintService } from '@umbraco-cms/backoffice/external/backend-api';
|
||||||
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
||||||
import { UMB_DOCUMENT_PROPERTY_VALUE_ENTITY_TYPE } from '@umbraco-cms/backoffice/document';
|
|
||||||
import { tryExecute } from '@umbraco-cms/backoffice/resources';
|
import { tryExecute } from '@umbraco-cms/backoffice/resources';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -194,7 +193,7 @@ export class UmbDocumentBlueprintServerDataSource implements UmbDetailDataSource
|
|||||||
values: data.values.map((value) => {
|
values: data.values.map((value) => {
|
||||||
return {
|
return {
|
||||||
editorAlias: value.editorAlias,
|
editorAlias: value.editorAlias,
|
||||||
entityType: UMB_DOCUMENT_PROPERTY_VALUE_ENTITY_TYPE,
|
entityType: UMB_DOCUMENT_BLUEPRINT_PROPERTY_VALUE_ENTITY_TYPE,
|
||||||
culture: value.culture || null,
|
culture: value.culture || null,
|
||||||
segment: value.segment || null,
|
segment: value.segment || null,
|
||||||
alias: value.alias,
|
alias: value.alias,
|
||||||
@@ -203,13 +202,15 @@ export class UmbDocumentBlueprintServerDataSource implements UmbDetailDataSource
|
|||||||
}),
|
}),
|
||||||
variants: data.variants.map((variant) => {
|
variants: data.variants.map((variant) => {
|
||||||
return {
|
return {
|
||||||
state: variant.state,
|
|
||||||
culture: variant.culture || null,
|
culture: variant.culture || null,
|
||||||
segment: variant.segment || null,
|
segment: variant.segment || null,
|
||||||
|
state: variant.state,
|
||||||
name: variant.name,
|
name: variant.name,
|
||||||
publishDate: variant.publishDate || null,
|
publishDate: variant.publishDate || null,
|
||||||
createDate: variant.createDate,
|
createDate: variant.createDate,
|
||||||
updateDate: variant.updateDate,
|
updateDate: variant.updateDate,
|
||||||
|
scheduledPublishDate: variant.scheduledPublishDate || null,
|
||||||
|
scheduledUnpublishDate: variant.scheduledUnpublishDate || null
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
documentType: {
|
documentType: {
|
||||||
|
|||||||
Reference in New Issue
Block a user