Fix breadcrumbs to display friendly object names instead of API names… (#13573)

Fixes #13250

This PR fixes the breadcrumb display issue where API names were shown
instead of friendly object names when navigating to related objects in
the detail view.

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
This commit is contained in:
aaron
2025-08-03 12:18:32 -07:00
committed by GitHub
parent 253a9221db
commit b8a26dfe8c
27 changed files with 211 additions and 109 deletions
@@ -1,7 +1,6 @@
import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';
import { getObjectRecordIdentifier } from '@/object-metadata/utils/getObjectRecordIdentifier';
import { ObjectRecord } from '@/object-record/types/ObjectRecord';
import { capitalize } from 'twenty-shared/utils';
export const getSelectedRecordsContextText = (
objectMetadataItem: ObjectMetadataItem,
@@ -10,5 +9,5 @@ export const getSelectedRecordsContextText = (
) => {
return totalCount === 1
? getObjectRecordIdentifier({ objectMetadataItem, record: records[0] }).name
: `${totalCount} ${capitalize(objectMetadataItem.namePlural)}`;
: `${totalCount} ${objectMetadataItem.labelPlural}`;
};