Migrate pagelayout position frontend (#18229)
## Context Part 1 of migrating gridPosition in favor of typed position FE should now always send both values to the BE and use both. Next steps: - Update the backend to enforce and validate the new position field + DB migrations gridPositon -> position (type: GRID) - Cleanup frontend usage - Cleanup backend
This commit is contained in:
+9
@@ -1,5 +1,6 @@
|
||||
import {
|
||||
type GridPosition,
|
||||
PageLayoutTabLayoutMode,
|
||||
WidgetConfigurationType,
|
||||
WidgetType,
|
||||
} from '~/generated-metadata/graphql';
|
||||
@@ -24,6 +25,14 @@ export const createDefaultFrontComponentWidget = (
|
||||
frontComponentId,
|
||||
},
|
||||
gridPosition,
|
||||
position: {
|
||||
__typename: 'PageLayoutWidgetGridPosition',
|
||||
layoutMode: PageLayoutTabLayoutMode.GRID,
|
||||
row: gridPosition.row,
|
||||
column: gridPosition.column,
|
||||
rowSpan: gridPosition.rowSpan,
|
||||
columnSpan: gridPosition.columnSpan,
|
||||
},
|
||||
objectMetadataId: null,
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
|
||||
Reference in New Issue
Block a user