Skip to content

Commit

Permalink
feat: add RecordRelationFieldCardSection
Browse files Browse the repository at this point in the history
Closes #3123
  • Loading branch information
thaisguigon committed Dec 28, 2023
1 parent 81a18cd commit d17e309
Show file tree
Hide file tree
Showing 17 changed files with 297 additions and 605 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ export const formatFieldMetadataItemAsColumnDefinition = ({
objectMetadataItem: ObjectMetadataItem;
}): ColumnDefinition<FieldMetadata> => {
const relationObjectMetadataItem =
field.toRelationMetadata?.fromObjectMetadata;
field.toRelationMetadata?.fromObjectMetadata ||
field.fromRelationMetadata?.toObjectMetadata;

const relationFieldMetadataId =
field.toRelationMetadata?.fromFieldMetadataId ||
field.fromRelationMetadata?.toFieldMetadataId;

return {
position,
Expand All @@ -29,6 +34,7 @@ export const formatFieldMetadataItemAsColumnDefinition = ({
fieldName: field.name,
placeHolder: field.label,
relationType: parseFieldRelationType(field),
relationFieldMetadataId,
relationObjectMetadataNameSingular:
relationObjectMetadataItem?.nameSingular ?? '',
relationObjectMetadataNamePlural:
Expand Down
Loading

0 comments on commit d17e309

Please sign in to comment.