Refactor GraphqlPerson to GraphqlQueryPerson
A GraphqlQueryPerson has an id which is used in mutations.
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { GraphqlPerson } from '../../interfaces/person.interface';
|
||||
import { GraphqlQueryPerson } from '../../interfaces/person.interface';
|
||||
|
||||
export const defaultData: Array<GraphqlPerson> = [
|
||||
export const defaultData: Array<GraphqlQueryPerson> = [
|
||||
{
|
||||
id: 1,
|
||||
__typename: 'Person',
|
||||
@ -8,6 +8,7 @@ export const defaultData: Array<GraphqlPerson> = [
|
||||
lastname: 'Prot',
|
||||
email: 'alexandre@qonto.com',
|
||||
company: {
|
||||
id: 1,
|
||||
company_name: 'Qonto',
|
||||
company_domain: 'qonto.com',
|
||||
__typename: 'Company',
|
||||
@ -24,6 +25,7 @@ export const defaultData: Array<GraphqlPerson> = [
|
||||
lastname: 'Prot',
|
||||
email: 'alexandre@qonto.com',
|
||||
company: {
|
||||
id: 1,
|
||||
company_name: 'LinkedIn',
|
||||
company_domain: 'linkedin.com',
|
||||
__typename: 'Company',
|
||||
@ -40,6 +42,7 @@ export const defaultData: Array<GraphqlPerson> = [
|
||||
lastname: 'Prot',
|
||||
email: 'alexandre@qonto.com',
|
||||
company: {
|
||||
id: 1,
|
||||
company_name: 'Sequoia',
|
||||
company_domain: 'sequoiacap.com',
|
||||
__typename: 'Company',
|
||||
@ -57,6 +60,7 @@ export const defaultData: Array<GraphqlPerson> = [
|
||||
lastname: 'Prot',
|
||||
email: 'alexandre@qonto.com',
|
||||
company: {
|
||||
id: 1,
|
||||
company_name: 'Facebook',
|
||||
company_domain: 'facebook.com',
|
||||
__typename: 'Company',
|
||||
|
||||
@ -15,9 +15,11 @@ 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 { GraphqlPerson, Person } from '../../interfaces/person.interface';
|
||||
import { GraphqlQueryPerson, Person } from '../../interfaces/person.interface';
|
||||
import PipeChip from '../../components/chips/PipeChip';
|
||||
import { SortType } from '../../components/table/table-header/SortAndFilterBar';
|
||||
import EditableCell from '../../components/table/EditableCell';
|
||||
import { updatePerson } from '../../services/people';
|
||||
|
||||
export const sortsAvailable = [
|
||||
{
|
||||
@ -34,9 +36,7 @@ export const sortsAvailable = [
|
||||
icon: faCalendar,
|
||||
},
|
||||
{ id: 'city', label: 'City', order: 'asc', icon: faMapPin },
|
||||
] satisfies Array<SortType<keyof GraphqlPerson>>;
|
||||
import EditableCell from '../../components/table/EditableCell';
|
||||
import { updatePerson } from '../../services/people';
|
||||
] satisfies Array<SortType<keyof GraphqlQueryPerson>>;
|
||||
|
||||
const columnHelper = createColumnHelper<Person>();
|
||||
export const peopleColumns = [
|
||||
|
||||
Reference in New Issue
Block a user