306 implement multi relation picker for person and try to factorize relation picker (#319)

* Removed useless folder

* First working version

* Refactored MultipleEntitySelect and splitted into 2 components

* Added TODO

* Removed useless Query

* Fixed refetch

* Fixed naming

* Fix tests

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Lucas Bordeau
2023-06-17 10:13:30 +02:00
committed by GitHub
parent 7f25f16766
commit d13ceb98fa
26 changed files with 604 additions and 369 deletions

View File

@ -7,8 +7,16 @@ import { AnyEntity, UnknownType } from '@/utils/interfaces/generic.interface';
import { SearchConfigType } from '../interfaces/interface';
export const SEARCH_PEOPLE_QUERY = gql`
query SearchPeopleQuery($where: PersonWhereInput, $limit: Int) {
searchResults: findManyPerson(where: $where, take: $limit) {
query SearchPeople(
$where: PersonWhereInput
$limit: Int
$orderBy: [PersonOrderByWithRelationInput!]
) {
searchResults: findManyPerson(
where: $where
take: $limit
orderBy: $orderBy
) {
id
phone
email
@ -21,7 +29,7 @@ export const SEARCH_PEOPLE_QUERY = gql`
`;
export const SEARCH_USER_QUERY = gql`
query SearchUserQuery($where: UserWhereInput, $limit: Int) {
query SearchUser($where: UserWhereInput, $limit: Int) {
searchResults: findManyUser(where: $where, take: $limit) {
id
email
@ -39,7 +47,7 @@ export const EMPTY_QUERY = gql`
`;
export const SEARCH_COMPANY_QUERY = gql`
query SearchCompanyQuery(
query SearchCompany(
$where: CompanyWhereInput
$limit: Int
$orderBy: [CompanyOrderByWithRelationInput!]