fix: many fields in an object (#10061)

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Jérémy M
2025-02-11 17:15:30 +01:00
committed by GitHub
parent 47f262c970
commit ed4a5b0c15
43 changed files with 22318 additions and 22058 deletions

View File

@ -24,8 +24,10 @@ export const mockedFavoritesData = [
view: null,
taskId: null,
task: null,
rocketId: null,
rocket: null,
petId: null,
pet: null,
surveyResultId: null,
surveyResult: null,
personId: null,
person: null,
opportunityId: null,
@ -55,8 +57,10 @@ export const mockedFavoritesData = [
view: mockedViewsData[0],
taskId: null,
task: null,
rocketId: null,
rocket: null,
petId: null,
pet: null,
surveyResultId: null,
surveyResult: null,
personId: null,
person: null,
opportunityId: null,
@ -86,8 +90,10 @@ export const mockedFavoritesData = [
view: mockedViewsData[1],
taskId: null,
task: null,
rocketId: null,
rocket: null,
petId: null,
pet: null,
surveyResultId: null,
surveyResult: null,
personId: null,
person: null,
opportunityId: null,
@ -117,8 +123,10 @@ export const mockedFavoritesData = [
view: mockedViewsData[1],
taskId: null,
task: null,
rocketId: null,
rocket: null,
petId: null,
pet: null,
surveyResultId: null,
surveyResult: null,
personId: null,
person: null,
opportunityId: null,

View File

@ -1,5 +1,6 @@
import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';
import { objectMetadataItemSchema } from '@/object-metadata/validation-schemas/objectMetadataItemSchema';
import { mockedStandardObjectMetadataQueryResult } from '~/testing/mock-data/generated/mock-metadata-query-result';
export const generatedMockObjectMetadataItems: ObjectMetadataItem[] =
@ -9,9 +10,11 @@ export const generatedMockObjectMetadataItems: ObjectMetadataItem[] =
edge.node.labelIdentifierFieldMetadataId,
);
const { fieldsList, ...objectWithoutFieldsList } = edge.node;
return {
...edge.node,
fields: edge.node.fields.edges.map((edge) => edge.node),
...objectWithoutFieldsList,
fields: fieldsList,
labelIdentifierFieldMetadataId,
indexMetadatas: edge.node.indexMetadatas.edges.map((index) => ({
...index.node,