Add custom objects to command menu search + use ilike for notes search (#8564)

In this PR

- Re-introduce previously used search based on "ILIKE" queries for
search on notes since the tsvector search with json text is not working
correctly (@charlesBochet)
- Add search on custom objects in Command Menu bar (closes
https://github.com/twentyhq/twenty/issues/8522)


https://github.com/user-attachments/assets/0cc064cf-889d-4f2c-8747-6d8670f35a39
This commit is contained in:
Marie
2024-11-19 14:11:38 +01:00
committed by GitHub
parent 4a8234d18c
commit 0d0f7e67a6
8 changed files with 522 additions and 175 deletions

View File

@ -114,6 +114,45 @@ export const graphqlMocks = {
},
});
}),
graphql.query('CombinedSearchRecords', () => {
return HttpResponse.json({
data: {
searchOpportunities: {
edges: [],
pageInfo: {
hasNextPage: false,
hasPreviousPage: false,
startCursor: null,
endCursor: null,
},
},
searchCompanies: {
edges: companiesMock.slice(0, 3).map((company) => ({
node: company,
cursor: null,
})),
pageInfo: {
hasNextPage: false,
hasPreviousPage: false,
startCursor: null,
endCursor: null,
},
},
searchPeople: {
edges: peopleMock.slice(0, 3).map((person) => ({
node: person,
cursor: null,
})),
pageInfo: {
hasNextPage: false,
hasPreviousPage: false,
startCursor: null,
endCursor: null,
},
},
},
});
}),
graphql.query('FindManyViews', ({ variables }) => {
const objectMetadataId = variables.filter?.objectMetadataId?.eq;
const viewType = variables.filter?.type?.eq;