fix workspace member search (#10613)
This commit is contained in:
@ -20,7 +20,7 @@ export const useSearchRecords = () => {
|
|||||||
variables: {
|
variables: {
|
||||||
searchInput: deferredCommandMenuSearch ?? '',
|
searchInput: deferredCommandMenuSearch ?? '',
|
||||||
limit: MAX_SEARCH_RESULTS,
|
limit: MAX_SEARCH_RESULTS,
|
||||||
excludedObjectNameSingulars: [],
|
excludedObjectNameSingulars: ['workspaceMember'],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -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`,
|
||||||
|
|||||||
Reference in New Issue
Block a user