From 2cd457ba31a88dc17a35b50052e09e2de5f44059 Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Mon, 2 Dec 2024 15:43:35 +0100 Subject: [PATCH] Preventing viewGroup creation on table views --- packages/twenty-emails/package.json | 2 +- packages/twenty-front/package.json | 2 +- packages/twenty-server/package.json | 2 +- .../services/field-metadata-related-records.service.ts | 4 ++++ packages/twenty-ui/package.json | 2 +- packages/twenty-website/package.json | 2 +- 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/twenty-emails/package.json b/packages/twenty-emails/package.json index 8c3ae0749a33..7e48901bf934 100644 --- a/packages/twenty-emails/package.json +++ b/packages/twenty-emails/package.json @@ -1,6 +1,6 @@ { "name": "twenty-emails", - "version": "0.33.6", + "version": "0.33.7", "description": "", "author": "", "private": true, diff --git a/packages/twenty-front/package.json b/packages/twenty-front/package.json index 49e09c14c834..8fa9803a916a 100644 --- a/packages/twenty-front/package.json +++ b/packages/twenty-front/package.json @@ -1,6 +1,6 @@ { "name": "twenty-front", - "version": "0.33.6", + "version": "0.33.7", "private": true, "type": "module", "scripts": { diff --git a/packages/twenty-server/package.json b/packages/twenty-server/package.json index c35606a16cbd..3ddf71788f3e 100644 --- a/packages/twenty-server/package.json +++ b/packages/twenty-server/package.json @@ -1,6 +1,6 @@ { "name": "twenty-server", - "version": "0.33.6", + "version": "0.33.7", "description": "", "author": "", "private": true, diff --git a/packages/twenty-server/src/engine/metadata-modules/field-metadata/services/field-metadata-related-records.service.ts b/packages/twenty-server/src/engine/metadata-modules/field-metadata/services/field-metadata-related-records.service.ts index be8630352497..33578354a7f4 100644 --- a/packages/twenty-server/src/engine/metadata-modules/field-metadata/services/field-metadata-related-records.service.ts +++ b/packages/twenty-server/src/engine/metadata-modules/field-metadata/services/field-metadata-related-records.service.ts @@ -49,6 +49,10 @@ export class FieldMetadataRelatedRecordsService { ); for (const view of views) { + if (view.type === 'table') { + continue; + } + const maxPosition = view.viewGroups.reduce( (max, viewGroup) => Math.max(max, viewGroup.position), 0, diff --git a/packages/twenty-ui/package.json b/packages/twenty-ui/package.json index f2edd7d8f936..ef982abcf77e 100644 --- a/packages/twenty-ui/package.json +++ b/packages/twenty-ui/package.json @@ -1,6 +1,6 @@ { "name": "twenty-ui", - "version": "0.33.6", + "version": "0.33.7", "type": "module", "main": "./src/index.ts", "exports": { diff --git a/packages/twenty-website/package.json b/packages/twenty-website/package.json index 6cdace5cd2f9..359fbaee17b2 100644 --- a/packages/twenty-website/package.json +++ b/packages/twenty-website/package.json @@ -1,6 +1,6 @@ { "name": "twenty-website", - "version": "0.33.6", + "version": "0.33.7", "private": true, "scripts": { "nx": "NX_DEFAULT_PROJECT=twenty-website node ../../node_modules/nx/bin/nx.js",