fix: many fields in an object (#10061)
Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -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,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user