Migrate page layout to v2 (#16364)

This commit is contained in:
Raphaël Bosi
2025-12-08 15:11:24 +01:00
committed by GitHub
parent 86df188e83
commit 5fb7e76005
65 changed files with 1474 additions and 84 deletions
@@ -0,0 +1,21 @@
import { type FlatPageLayout } from 'src/engine/metadata-modules/flat-page-layout/types/flat-page-layout.type';
import { type PageLayoutEntity } from 'src/engine/metadata-modules/page-layout/entities/page-layout.entity';
export const transformPageLayoutEntityToFlatPageLayout = (
pageLayoutEntity: PageLayoutEntity,
): FlatPageLayout => {
return {
createdAt: pageLayoutEntity.createdAt,
deletedAt: pageLayoutEntity.deletedAt,
updatedAt: pageLayoutEntity.updatedAt,
id: pageLayoutEntity.id,
name: pageLayoutEntity.name,
type: pageLayoutEntity.type,
objectMetadataId: pageLayoutEntity.objectMetadataId,
workspaceId: pageLayoutEntity.workspaceId,
universalIdentifier:
pageLayoutEntity.universalIdentifier ?? pageLayoutEntity.id,
applicationId: pageLayoutEntity.applicationId,
tabIds: pageLayoutEntity.tabs.map((tab) => tab.id),
};
};