Tt call recording app (#18281)
Co-authored-by: Thomas Trompette <thomas.trompette@sfr.fr> Co-authored-by: bosiraphael <raphael.bosi@gmail.com> Co-authored-by: Weiko <corentin@twenty.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions <github-actions@twenty.com> Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
+22
@@ -73,4 +73,26 @@ describe('fromPageLayoutWidgetManifestToUniversalFlatPageLayoutWidget', () => {
|
||||
url: 'https://example.com',
|
||||
});
|
||||
});
|
||||
|
||||
it('should use manifest gridPosition when provided', () => {
|
||||
const result = fromPageLayoutWidgetManifestToUniversalFlatPageLayoutWidget({
|
||||
pageLayoutWidgetManifest: {
|
||||
universalIdentifier: 'widget-uuid-3',
|
||||
title: 'Positioned Widget',
|
||||
type: WidgetType.GRAPH,
|
||||
gridPosition: { row: 2, column: 6, rowSpan: 4, columnSpan: 6 },
|
||||
configuration: { configurationType: 'VIEW' },
|
||||
},
|
||||
pageLayoutTabUniversalIdentifier,
|
||||
applicationUniversalIdentifier,
|
||||
now,
|
||||
});
|
||||
|
||||
expect(result.gridPosition).toEqual({
|
||||
row: 2,
|
||||
column: 6,
|
||||
rowSpan: 4,
|
||||
columnSpan: 6,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
+6
-1
@@ -23,7 +23,12 @@ export const fromPageLayoutWidgetManifestToUniversalFlatPageLayoutWidget = ({
|
||||
objectMetadataUniversalIdentifier:
|
||||
pageLayoutWidgetManifest.objectUniversalIdentifier ?? null,
|
||||
conditionalDisplay: pageLayoutWidgetManifest.conditionalDisplay ?? null,
|
||||
gridPosition: { row: 0, column: 0, rowSpan: 1, columnSpan: 1 },
|
||||
gridPosition: pageLayoutWidgetManifest.gridPosition ?? {
|
||||
row: 0,
|
||||
column: 0,
|
||||
rowSpan: 1,
|
||||
columnSpan: 1,
|
||||
},
|
||||
position: null,
|
||||
universalConfiguration:
|
||||
pageLayoutWidgetManifest.configuration as UniversalFlatPageLayoutWidget['universalConfiguration'],
|
||||
|
||||
Reference in New Issue
Block a user