fix workspace member search (#10613)

This commit is contained in:
Etienne
2025-03-03 11:57:07 +01:00
committed by GitHub
parent c5795b7325
commit d2ad23d1cf
2 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ export const useSearchRecords = () => {
variables: { variables: {
searchInput: deferredCommandMenuSearch ?? '', searchInput: deferredCommandMenuSearch ?? '',
limit: MAX_SEARCH_RESULTS, limit: MAX_SEARCH_RESULTS,
excludedObjectNameSingulars: [], excludedObjectNameSingulars: ['workspaceMember'],
}, },
}); });

View File

@ -1,5 +1,5 @@
import { Entity } from '@microsoft/microsoft-graph-types'; import { Entity } from '@microsoft/microsoft-graph-types';
import { getLogoUrlFromDomainName } from 'twenty-shared'; import { FieldMetadataType, getLogoUrlFromDomainName } from 'twenty-shared';
import { Brackets } from 'typeorm'; import { Brackets } from 'typeorm';
import { ObjectRecord } from 'src/engine/api/graphql/workspace-query-builder/interfaces/object-record.interface'; import { ObjectRecord } from 'src/engine/api/graphql/workspace-query-builder/interfaces/object-record.interface';
@ -109,7 +109,7 @@ export class GlobalSearchService {
objectMetadataItem.labelIdentifierFieldMetadataId objectMetadataItem.labelIdentifierFieldMetadataId
]; ];
if (objectMetadataItem.nameSingular === 'person') { if (labelIdentifierField.type === FieldMetadataType.FULL_NAME) {
return [ return [
`${labelIdentifierField.name}FirstName`, `${labelIdentifierField.name}FirstName`,
`${labelIdentifierField.name}LastName`, `${labelIdentifierField.name}LastName`,