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:
@ -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!]
|
||||
|
||||
Reference in New Issue
Block a user