From b8032e9605a574eb7a46c35cadcf12287b425822 Mon Sep 17 00:00:00 2001 From: Sammy Teillet Date: Thu, 20 Apr 2023 15:39:56 +0200 Subject: [PATCH 01/10] refactor: move person types in interface --- .../{pages/people/types.ts => interfaces/person.interface.ts} | 4 ++-- front/src/pages/people/People.tsx | 2 +- front/src/pages/people/default-data.ts | 2 +- front/src/pages/people/mapper.ts | 2 +- front/src/pages/people/people-table.tsx | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) rename front/src/{pages/people/types.ts => interfaces/person.interface.ts} (80%) diff --git a/front/src/pages/people/types.ts b/front/src/interfaces/person.interface.ts similarity index 80% rename from front/src/pages/people/types.ts rename to front/src/interfaces/person.interface.ts index 4afd0aeaec..9018a51aa0 100644 --- a/front/src/pages/people/types.ts +++ b/front/src/interfaces/person.interface.ts @@ -1,5 +1,5 @@ -import { Company } from '../../interfaces/company.interface'; -import { Pipe } from '../../interfaces/pipe.interface'; +import { Company } from './company.interface'; +import { Pipe } from './pipe.interface'; export type Person = { fullName: string; diff --git a/front/src/pages/people/People.tsx b/front/src/pages/people/People.tsx index df4226800e..b5e94f4c95 100644 --- a/front/src/pages/people/People.tsx +++ b/front/src/pages/people/People.tsx @@ -4,7 +4,7 @@ import Table from '../../components/table/Table'; import styled from '@emotion/styled'; import { peopleColumns } from './people-table'; import { gql, useQuery } from '@apollo/client'; -import { GraphqlPerson, Person } from './types'; +import { GraphqlPerson, Person } from '../../interfaces/person.interface'; import { defaultData } from './default-data'; import { mapPerson } from './mapper'; diff --git a/front/src/pages/people/default-data.ts b/front/src/pages/people/default-data.ts index e071b07f81..4731d83d70 100644 --- a/front/src/pages/people/default-data.ts +++ b/front/src/pages/people/default-data.ts @@ -1,4 +1,4 @@ -import { Person } from './types'; +import { Person } from '../../interfaces/person.interface'; export const defaultData: Array = [ { diff --git a/front/src/pages/people/mapper.ts b/front/src/pages/people/mapper.ts index 5ae21b954e..cff163aa14 100644 --- a/front/src/pages/people/mapper.ts +++ b/front/src/pages/people/mapper.ts @@ -1,4 +1,4 @@ -import { GraphqlPerson, Person } from './types'; +import { GraphqlPerson, Person } from '../../interfaces/person.interface'; export const mapPerson = (person: GraphqlPerson): Person => ({ fullName: `${person.firstname} ${person.lastname}`, diff --git a/front/src/pages/people/people-table.tsx b/front/src/pages/people/people-table.tsx index b1063a7eb8..87728bace7 100644 --- a/front/src/pages/people/people-table.tsx +++ b/front/src/pages/people/people-table.tsx @@ -15,7 +15,7 @@ import Checkbox from '../../components/form/Checkbox'; import HorizontalyAlignedContainer from '../../layout/containers/HorizontalyAlignedContainer'; import CompanyChip from '../../components/chips/CompanyChip'; import PersonChip from '../../components/chips/PersonChip'; -import { Person } from './types'; +import { Person } from '../../interfaces/person.interface'; const columnHelper = createColumnHelper(); export const peopleColumns = [ From b3acfa465b8008787761320d2db1e3192bf3b026 Mon Sep 17 00:00:00 2001 From: Sammy Teillet Date: Thu, 20 Apr 2023 15:41:18 +0200 Subject: [PATCH 02/10] refactor: move mapper in interface --- front/src/interfaces/person.interface.ts | 13 +++++++++++++ front/src/pages/people/People.tsx | 7 +++++-- front/src/pages/people/mapper.ts | 14 -------------- 3 files changed, 18 insertions(+), 16 deletions(-) delete mode 100644 front/src/pages/people/mapper.ts diff --git a/front/src/interfaces/person.interface.ts b/front/src/interfaces/person.interface.ts index 9018a51aa0..97be4406a0 100644 --- a/front/src/interfaces/person.interface.ts +++ b/front/src/interfaces/person.interface.ts @@ -28,3 +28,16 @@ export type GraphqlPerson = { phone: string; __typename: string; }; + +export const mapPerson = (person: GraphqlPerson): Person => ({ + fullName: `${person.firstname} ${person.lastname}`, + creationDate: new Date(person.created_at), + pipe: { name: 'coucou', id: 1, icon: 'faUser' }, + ...person, + company: { + id: 1, + name: person.company.company_name, + domain: person.company.company_domain, + }, + countryCode: 'FR', +}); diff --git a/front/src/pages/people/People.tsx b/front/src/pages/people/People.tsx index b5e94f4c95..b3322a7052 100644 --- a/front/src/pages/people/People.tsx +++ b/front/src/pages/people/People.tsx @@ -4,9 +4,12 @@ import Table from '../../components/table/Table'; import styled from '@emotion/styled'; import { peopleColumns } from './people-table'; import { gql, useQuery } from '@apollo/client'; -import { GraphqlPerson, Person } from '../../interfaces/person.interface'; +import { + GraphqlPerson, + Person, + mapPerson, +} from '../../interfaces/person.interface'; import { defaultData } from './default-data'; -import { mapPerson } from './mapper'; const StyledPeopleContainer = styled.div` display: flex; diff --git a/front/src/pages/people/mapper.ts b/front/src/pages/people/mapper.ts deleted file mode 100644 index cff163aa14..0000000000 --- a/front/src/pages/people/mapper.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { GraphqlPerson, Person } from '../../interfaces/person.interface'; - -export const mapPerson = (person: GraphqlPerson): Person => ({ - fullName: `${person.firstname} ${person.lastname}`, - creationDate: new Date(person.created_at), - pipe: { name: 'coucou', id: 1, icon: 'faUser' }, - ...person, - company: { - id: 1, - name: person.company.company_name, - domain: person.company.company_domain, - }, - countryCode: 'FR', -}); From 9122815b077d5d246e8e86c87a0b84a9231ae5f2 Mon Sep 17 00:00:00 2001 From: Sammy Teillet Date: Thu, 20 Apr 2023 15:56:54 +0200 Subject: [PATCH 03/10] feature: order people results --- front/src/pages/people/People.tsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/front/src/pages/people/People.tsx b/front/src/pages/people/People.tsx index b3322a7052..9b33e93075 100644 --- a/front/src/pages/people/People.tsx +++ b/front/src/pages/people/People.tsx @@ -17,8 +17,8 @@ const StyledPeopleContainer = styled.div` `; export const GET_PEOPLE = gql` - query GetPeople { - person { + query GetPeople($orderBy: [person_order_by!]) { + person(order_by: $orderBy) { id phone email @@ -34,8 +34,16 @@ export const GET_PEOPLE = gql` } `; +const orderBy = [ + { + created_at: 'desc', + }, +]; + function People() { - const { data } = useQuery<{ person: GraphqlPerson[] }>(GET_PEOPLE); + const { data } = useQuery<{ person: GraphqlPerson[] }>(GET_PEOPLE, { + variables: { orderBy }, + }); const mydata: Person[] = data ? data.person.map(mapPerson) : defaultData; From 33473aea92a8d7ca88fb47607f11c38d90b4bb53 Mon Sep 17 00:00:00 2001 From: Sammy Teillet Date: Thu, 20 Apr 2023 16:38:29 +0200 Subject: [PATCH 04/10] feature: add setSorts from parent component --- front/src/components/table/Table.tsx | 16 ++++++++++++++-- .../table/table-header/TableHeader.tsx | 15 +++++++++++++-- front/src/pages/people/People.tsx | 7 ++++++- 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/front/src/components/table/Table.tsx b/front/src/components/table/Table.tsx index da7ea635ae..1b2b373c26 100644 --- a/front/src/components/table/Table.tsx +++ b/front/src/components/table/Table.tsx @@ -9,12 +9,14 @@ import { import TableHeader from './table-header/TableHeader'; import { IconProp } from '@fortawesome/fontawesome-svg-core'; import styled from '@emotion/styled'; +import { SortType } from './table-header/SortAndFilterBar'; type OwnProps = { data: Array; columns: Array>; viewName: string; viewIcon?: IconProp; + setSorts?: React.Dispatch>; }; const StyledTable = styled.table` @@ -60,7 +62,13 @@ const StyledTableWithHeader = styled.div` flex: 1; `; -function Table({ data, columns, viewName, viewIcon }: OwnProps) { +function Table({ + data, + columns, + viewName, + viewIcon, + setSorts, +}: OwnProps) { const table = useReactTable({ data, columns, @@ -69,7 +77,11 @@ function Table({ data, columns, viewName, viewIcon }: OwnProps) { return ( - + {table.getHeaderGroups().map((headerGroup) => ( diff --git a/front/src/components/table/table-header/TableHeader.tsx b/front/src/components/table/table-header/TableHeader.tsx index a3c861ce1a..fc6b26ae62 100644 --- a/front/src/components/table/table-header/TableHeader.tsx +++ b/front/src/components/table/table-header/TableHeader.tsx @@ -9,6 +9,7 @@ import { useState } from 'react'; type OwnProps = { viewName: string; viewIcon?: IconProp; + setSorts?: React.Dispatch>; }; const StyledContainer = styled.div` @@ -43,8 +44,18 @@ const StyledFilters = styled.div` margin-right: ${(props) => props.theme.spacing(2)}; `; -function TableHeader({ viewName, viewIcon }: OwnProps) { - const [sorts, setSorts] = useState([] as Array); +function TableHeader({ + viewName, + viewIcon, + setSorts: parentSetSorts, +}: OwnProps) { + const [sorts, localSetSorts] = useState([] as Array); + + const setSorts = (value: React.SetStateAction) => { + parentSetSorts && parentSetSorts(value); + localSetSorts(value); + }; + const onSortItemSelect = (sortId: string) => { setSorts([ { diff --git a/front/src/pages/people/People.tsx b/front/src/pages/people/People.tsx index 9b33e93075..5f5096ed7f 100644 --- a/front/src/pages/people/People.tsx +++ b/front/src/pages/people/People.tsx @@ -10,6 +10,8 @@ import { mapPerson, } from '../../interfaces/person.interface'; import { defaultData } from './default-data'; +import { useState } from 'react'; +import { SortType } from '../../components/table/table-header/SortAndFilterBar'; const StyledPeopleContainer = styled.div` display: flex; @@ -41,8 +43,10 @@ const orderBy = [ ]; function People() { + const [sorts, setSorts] = useState([] as Array); + console.log(sorts); const { data } = useQuery<{ person: GraphqlPerson[] }>(GET_PEOPLE, { - variables: { orderBy }, + variables: { orderBy: sorts ? orderBy : orderBy }, }); const mydata: Person[] = data ? data.person.map(mapPerson) : defaultData; @@ -56,6 +60,7 @@ function People() { columns={peopleColumns} viewName="All People" viewIcon={faList} + setSorts={setSorts} /> )} From fbd338ee7d1dfda5f99683557648a51a8c4669cd Mon Sep 17 00:00:00 2001 From: Sammy Teillet Date: Thu, 20 Apr 2023 16:45:07 +0200 Subject: [PATCH 05/10] feature: apply the sorts to the query --- .../table/table-header/SortAndFilterBar.tsx | 2 +- front/src/pages/people/People.tsx | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/front/src/components/table/table-header/SortAndFilterBar.tsx b/front/src/components/table/table-header/SortAndFilterBar.tsx index 87c7abfc36..682b162609 100644 --- a/front/src/components/table/table-header/SortAndFilterBar.tsx +++ b/front/src/components/table/table-header/SortAndFilterBar.tsx @@ -10,7 +10,7 @@ type OwnProps = { export type SortType = { label: string; - order: string; + order: 'asc' | 'desc'; id: string; icon?: IconProp; }; diff --git a/front/src/pages/people/People.tsx b/front/src/pages/people/People.tsx index 5f5096ed7f..c996379495 100644 --- a/front/src/pages/people/People.tsx +++ b/front/src/pages/people/People.tsx @@ -36,17 +36,28 @@ export const GET_PEOPLE = gql` } `; -const orderBy = [ +// @TODO get those types from generated-code person-order-by +type OrderBy = Record; + +const defaultOrderBy = [ { created_at: 'desc', }, ]; +const reduceSortsToGqlSorts = (sorts: Array): OrderBy[] => { + const mappedSorts = sorts.reduce((acc, sort) => { + acc[sort.id] = sort.order; + return acc; + }, {} as OrderBy); + return [mappedSorts]; +}; + function People() { const [sorts, setSorts] = useState([] as Array); - console.log(sorts); + const orderBy = sorts.length ? reduceSortsToGqlSorts(sorts) : defaultOrderBy; const { data } = useQuery<{ person: GraphqlPerson[] }>(GET_PEOPLE, { - variables: { orderBy: sorts ? orderBy : orderBy }, + variables: { orderBy: orderBy }, }); const mydata: Person[] = data ? data.person.map(mapPerson) : defaultData; From e0a19bdd434f51e393ea576a42d2ce9846965ce8 Mon Sep 17 00:00:00 2001 From: Sammy Teillet Date: Thu, 20 Apr 2023 16:59:03 +0200 Subject: [PATCH 06/10] refactor: rename and remove default data --- front/src/pages/people/People.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/front/src/pages/people/People.tsx b/front/src/pages/people/People.tsx index c996379495..94b96018af 100644 --- a/front/src/pages/people/People.tsx +++ b/front/src/pages/people/People.tsx @@ -45,7 +45,7 @@ const defaultOrderBy = [ }, ]; -const reduceSortsToGqlSorts = (sorts: Array): OrderBy[] => { +const reduceSortsToOrderBy = (sorts: Array): OrderBy[] => { const mappedSorts = sorts.reduce((acc, sort) => { acc[sort.id] = sort.order; return acc; @@ -55,19 +55,17 @@ const reduceSortsToGqlSorts = (sorts: Array): OrderBy[] => { function People() { const [sorts, setSorts] = useState([] as Array); - const orderBy = sorts.length ? reduceSortsToGqlSorts(sorts) : defaultOrderBy; + const orderBy = sorts.length ? reduceSortsToOrderBy(sorts) : defaultOrderBy; const { data } = useQuery<{ person: GraphqlPerson[] }>(GET_PEOPLE, { variables: { orderBy: orderBy }, }); - const mydata: Person[] = data ? data.person.map(mapPerson) : defaultData; - return ( - {mydata && ( + {data && ( Date: Thu, 20 Apr 2023 17:58:26 +0200 Subject: [PATCH 07/10] refactor: rename setSorts to onSortsUpdate --- front/src/components/table/Table.tsx | 6 +++--- .../table/table-header/TableHeader.tsx | 16 ++++------------ front/src/pages/people/People.tsx | 2 +- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/front/src/components/table/Table.tsx b/front/src/components/table/Table.tsx index 1b2b373c26..1a7b9cb9b7 100644 --- a/front/src/components/table/Table.tsx +++ b/front/src/components/table/Table.tsx @@ -16,7 +16,7 @@ type OwnProps = { columns: Array>; viewName: string; viewIcon?: IconProp; - setSorts?: React.Dispatch>; + onSortsUpdate?: React.Dispatch>; }; const StyledTable = styled.table` @@ -67,7 +67,7 @@ function Table({ columns, viewName, viewIcon, - setSorts, + onSortsUpdate, }: OwnProps) { const table = useReactTable({ data, @@ -80,7 +80,7 @@ function Table({ diff --git a/front/src/components/table/table-header/TableHeader.tsx b/front/src/components/table/table-header/TableHeader.tsx index fc6b26ae62..18d651ddaf 100644 --- a/front/src/components/table/table-header/TableHeader.tsx +++ b/front/src/components/table/table-header/TableHeader.tsx @@ -9,7 +9,7 @@ import { useState } from 'react'; type OwnProps = { viewName: string; viewIcon?: IconProp; - setSorts?: React.Dispatch>; + onSortsUpdate?: React.Dispatch>; }; const StyledContainer = styled.div` @@ -44,17 +44,8 @@ const StyledFilters = styled.div` margin-right: ${(props) => props.theme.spacing(2)}; `; -function TableHeader({ - viewName, - viewIcon, - setSorts: parentSetSorts, -}: OwnProps) { - const [sorts, localSetSorts] = useState([] as Array); - - const setSorts = (value: React.SetStateAction) => { - parentSetSorts && parentSetSorts(value); - localSetSorts(value); - }; +function TableHeader({ viewName, viewIcon, onSortsUpdate }: OwnProps) { + const [sorts, setSorts] = useState([] as Array); const onSortItemSelect = (sortId: string) => { setSorts([ @@ -64,6 +55,7 @@ function TableHeader({ id: sortId, }, ]); + onSortsUpdate && onSortsUpdate(sorts); }; const onSortItemUnSelect = (sortId: string) => { diff --git a/front/src/pages/people/People.tsx b/front/src/pages/people/People.tsx index 94b96018af..09837dbfd6 100644 --- a/front/src/pages/people/People.tsx +++ b/front/src/pages/people/People.tsx @@ -69,7 +69,7 @@ function People() { columns={peopleColumns} viewName="All People" viewIcon={faList} - setSorts={setSorts} + onSortsUpdate={setSorts} /> )} From a915d155731332a31494cb4b92bff2624b994568 Mon Sep 17 00:00:00 2001 From: Sammy Teillet Date: Thu, 20 Apr 2023 18:03:15 +0200 Subject: [PATCH 08/10] refactor: remove useless vars --- front/src/pages/people/People.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/front/src/pages/people/People.tsx b/front/src/pages/people/People.tsx index 09837dbfd6..65cff1c701 100644 --- a/front/src/pages/people/People.tsx +++ b/front/src/pages/people/People.tsx @@ -4,12 +4,7 @@ import Table from '../../components/table/Table'; import styled from '@emotion/styled'; import { peopleColumns } from './people-table'; import { gql, useQuery } from '@apollo/client'; -import { - GraphqlPerson, - Person, - mapPerson, -} from '../../interfaces/person.interface'; -import { defaultData } from './default-data'; +import { GraphqlPerson, mapPerson } from '../../interfaces/person.interface'; import { useState } from 'react'; import { SortType } from '../../components/table/table-header/SortAndFilterBar'; From b5affcce3f8d8ed1e16f717b12fc72861286276e Mon Sep 17 00:00:00 2001 From: Sammy Teillet Date: Thu, 20 Apr 2023 18:08:20 +0200 Subject: [PATCH 09/10] test: fix mocks for person request --- front/src/pages/people/__stories__/People.stories.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/front/src/pages/people/__stories__/People.stories.tsx b/front/src/pages/people/__stories__/People.stories.tsx index 02ec4f45ef..52bb7796de 100644 --- a/front/src/pages/people/__stories__/People.stories.tsx +++ b/front/src/pages/people/__stories__/People.stories.tsx @@ -16,6 +16,9 @@ const mocks = [ { request: { query: GET_PEOPLE, + variables: { + orderBy: [{ created_at: 'desc' }], + }, }, result: { data: { From 3a7b1077f8e61b56109e34cfd82d291a0040a980 Mon Sep 17 00:00:00 2001 From: Sammy Teillet Date: Thu, 20 Apr 2023 18:44:43 +0200 Subject: [PATCH 10/10] test: wait for rows to be displayed --- front/src/components/table/Table.tsx | 4 +- front/src/interfaces/person.interface.test.ts | 22 ++++++ .../pages/people/__tests__/People.test.tsx | 10 +-- front/src/pages/people/default-data.ts | 70 ++++++++++++------- 4 files changed, 76 insertions(+), 30 deletions(-) create mode 100644 front/src/interfaces/person.interface.test.ts diff --git a/front/src/components/table/Table.tsx b/front/src/components/table/Table.tsx index 1a7b9cb9b7..7de44456be 100644 --- a/front/src/components/table/Table.tsx +++ b/front/src/components/table/Table.tsx @@ -100,8 +100,8 @@ function Table({ ))} - {table.getRowModel().rows.map((row) => ( - + {table.getRowModel().rows.map((row, index) => ( + {row.getVisibleCells().map((cell) => { return (
diff --git a/front/src/interfaces/person.interface.test.ts b/front/src/interfaces/person.interface.test.ts new file mode 100644 index 0000000000..e5c01f812a --- /dev/null +++ b/front/src/interfaces/person.interface.test.ts @@ -0,0 +1,22 @@ +import { mapPerson } from './person.interface'; + +describe('mapPerson', () => { + it('should map person', () => { + const person = mapPerson({ + id: 1, + firstname: 'John', + lastname: 'Doe', + email: '', + phone: '', + city: '', + created_at: '', + company: { + __typename: '', + company_name: '', + company_domain: '', + }, + __typename: '', + }); + expect(person.fullName).toBe('John Doe'); + }); +}); diff --git a/front/src/pages/people/__tests__/People.test.tsx b/front/src/pages/people/__tests__/People.test.tsx index ce20166a7b..140004316e 100644 --- a/front/src/pages/people/__tests__/People.test.tsx +++ b/front/src/pages/people/__tests__/People.test.tsx @@ -1,10 +1,12 @@ -import { render } from '@testing-library/react'; +import { render, waitFor } from '@testing-library/react'; import { PeopleDefault } from '../__stories__/People.stories'; -it('Checks the People page render', () => { +it('Checks the People page render', async () => { const { getByTestId } = render(); - const title = getByTestId('top-bar-title'); - expect(title).toHaveTextContent('People'); + await waitFor(() => { + const personChip = getByTestId('row-id-0'); + expect(personChip).toBeDefined(); + }); }); diff --git a/front/src/pages/people/default-data.ts b/front/src/pages/people/default-data.ts index 4731d83d70..b0efc97a55 100644 --- a/front/src/pages/people/default-data.ts +++ b/front/src/pages/people/default-data.ts @@ -1,47 +1,69 @@ -import { Person } from '../../interfaces/person.interface'; +import { GraphqlPerson } from '../../interfaces/person.interface'; -export const defaultData: Array = [ +export const defaultData: Array = [ { - fullName: 'Alexandre Prot', - picture: 'http://placekitten.com/256', + id: 1, + __typename: 'Person', + firstname: 'Alexandre', + lastname: 'Prot', email: 'alexandre@qonto.com', - company: { id: 1, name: 'Qonto', domain: 'qonto.com' }, + company: { + company_name: 'Qonto', + company_domain: 'qonto.com', + __typename: 'Company', + }, phone: '06 12 34 56 78', - creationDate: new Date('Feb 23, 2018'), - pipe: { id: 1, name: 'Sales Pipeline', icon: 'faUser' }, + created_at: '2023-04-20T13:20:09.158312+00:00', + city: 'Paris', - countryCode: 'FR', }, { - fullName: 'Alexandre Prot', + id: 2, + __typename: 'Person', + firstname: 'Alexandre', + lastname: 'Prot', email: 'alexandre@qonto.com', - company: { id: 2, name: 'LinkedIn', domain: 'linkedin.com' }, + company: { + company_name: 'LinkedIn', + company_domain: 'linkedin.com', + __typename: 'Company', + }, phone: '06 12 34 56 78', - creationDate: new Date('Feb 22, 2018'), - pipe: { id: 1, name: 'Sales Pipeline', icon: 'faUser' }, + created_at: '2023-04-20T13:20:09.158312+00:00', + city: 'Paris', - countryCode: 'FR', }, { - fullName: 'Alexandre Prot', - picture: 'http://placekitten.com/256', + id: 3, + __typename: 'Person', + firstname: 'Alexandre', + lastname: 'Prot', email: 'alexandre@qonto.com', - company: { id: 5, name: 'Sequoia', domain: 'sequoiacap.com' }, + company: { + company_name: 'Sequoia', + company_domain: 'sequoiacap.com', + __typename: 'Company', + }, phone: '06 12 34 56 78', - creationDate: new Date('Feb 21, 2018'), - pipe: { id: 1, name: 'Sales Pipeline', icon: 'faUser' }, + created_at: '2023-04-20T13:20:09.158312+00:00', + city: 'Paris', - countryCode: 'FR', }, { - fullName: 'Alexandre Prot', + id: 4, + __typename: 'Person', + firstname: 'Alexandre', + lastname: 'Prot', email: 'alexandre@qonto.com', - company: { id: 2, name: 'Facebook', domain: 'facebook.com' }, + company: { + company_name: 'Facebook', + company_domain: 'facebook.com', + __typename: 'Company', + }, phone: '06 12 34 56 78', - creationDate: new Date('Feb 25, 2018'), - pipe: { id: 1, name: 'Sales Pipeline', icon: 'faUser' }, + created_at: '2023-04-20T13:20:09.158312+00:00', + city: 'Paris', - countryCode: 'FR', }, ];