Update seeds and mocks (#784)
This commit is contained in:
@ -3,10 +3,11 @@ import { useRecoilState } from 'recoil';
|
||||
|
||||
import { isFetchingEntityTableDataState } from '@/ui/table/states/isFetchingEntityTableDataState';
|
||||
import { tableRowIdsState } from '@/ui/table/states/tableRowIdsState';
|
||||
import { mockedCompaniesData } from '~/testing/mock-data/companies';
|
||||
|
||||
import { useSetCompanyEntityTable } from '../hooks/useSetCompanyEntityTable';
|
||||
|
||||
import { mockedCompaniesData } from './companies-mock-data';
|
||||
|
||||
export function CompanyEntityTableDataMocked() {
|
||||
const [, setTableRowIds] = useRecoilState(tableRowIdsState);
|
||||
|
||||
|
||||
@ -0,0 +1,90 @@
|
||||
import { Company, User } from '../../../../generated/graphql';
|
||||
|
||||
type MockedCompany = Pick<
|
||||
Company,
|
||||
| 'id'
|
||||
| 'name'
|
||||
| 'domainName'
|
||||
| '__typename'
|
||||
| 'createdAt'
|
||||
| 'address'
|
||||
| 'employees'
|
||||
| '_commentThreadCount'
|
||||
> & {
|
||||
accountOwner: Pick<
|
||||
User,
|
||||
| 'id'
|
||||
| 'email'
|
||||
| 'displayName'
|
||||
| 'avatarUrl'
|
||||
| '__typename'
|
||||
| 'firstName'
|
||||
| 'lastName'
|
||||
> | null;
|
||||
};
|
||||
|
||||
export const mockedCompaniesData: Array<MockedCompany> = [
|
||||
{
|
||||
id: '89bb825c-171e-4bcc-9cf7-43448d6fb278',
|
||||
domainName: 'airbnb.com',
|
||||
name: 'Airbnb',
|
||||
createdAt: '2023-04-26T10:08:54.724515+00:00',
|
||||
address: 'San Francisco, CA',
|
||||
employees: 5000,
|
||||
_commentThreadCount: 0,
|
||||
accountOwner: {
|
||||
email: 'charles@test.com',
|
||||
displayName: 'Charles Test',
|
||||
firstName: 'Charles',
|
||||
lastName: 'Test',
|
||||
avatarUrl: null,
|
||||
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6b',
|
||||
__typename: 'User',
|
||||
},
|
||||
__typename: 'Company',
|
||||
},
|
||||
{
|
||||
id: 'b396e6b9-dc5c-4643-bcff-61b6cf7523ae',
|
||||
domainName: 'qonto.com',
|
||||
name: 'Qonto',
|
||||
createdAt: '2023-04-26T10:12:42.33625+00:00',
|
||||
address: 'Paris, France',
|
||||
employees: 800,
|
||||
_commentThreadCount: 0,
|
||||
accountOwner: null,
|
||||
__typename: 'Company',
|
||||
},
|
||||
{
|
||||
id: 'a674fa6c-1455-4c57-afaf-dd5dc086361d',
|
||||
domainName: 'stripe.com',
|
||||
name: 'Stripe',
|
||||
createdAt: '2023-04-26T10:10:32.530184+00:00',
|
||||
address: 'San Francisco, CA',
|
||||
employees: 8000,
|
||||
_commentThreadCount: 0,
|
||||
accountOwner: null,
|
||||
__typename: 'Company',
|
||||
},
|
||||
{
|
||||
id: 'b1cfd51b-a831-455f-ba07-4e30671e1dc3',
|
||||
domainName: 'figma.com',
|
||||
name: 'Figma',
|
||||
createdAt: '2023-03-21T06:30:25.39474+00:00',
|
||||
address: 'San Francisco, CA',
|
||||
employees: 800,
|
||||
_commentThreadCount: 0,
|
||||
accountOwner: null,
|
||||
__typename: 'Company',
|
||||
},
|
||||
{
|
||||
id: '5c21e19e-e049-4393-8c09-3e3f8fb09ecb',
|
||||
domainName: 'notion.com',
|
||||
name: 'Notion',
|
||||
createdAt: '2023-04-26T10:13:29.712485+00:00',
|
||||
address: 'San Francisco, CA',
|
||||
employees: 400,
|
||||
_commentThreadCount: 0,
|
||||
accountOwner: null,
|
||||
__typename: 'Company',
|
||||
},
|
||||
];
|
||||
@ -1,33 +1,33 @@
|
||||
[
|
||||
{
|
||||
"name": "Rudderstack",
|
||||
"domainName": "rudderstack.com",
|
||||
"name": "Airbnb",
|
||||
"domainName": "airbnb.com",
|
||||
"address": "San Francisco",
|
||||
"employees": 195
|
||||
"employees": 5000
|
||||
},
|
||||
{
|
||||
"name": "Medusa",
|
||||
"domainName": "medusajs.com",
|
||||
"address": "Copenhagen",
|
||||
"employees": 57
|
||||
},
|
||||
{
|
||||
"name": "Metabase",
|
||||
"domainName": "metabase.com",
|
||||
"name": "Qonto",
|
||||
"domainName": "qonto.com",
|
||||
"address": "San Francisco",
|
||||
"employees": 68
|
||||
"employees": 800
|
||||
},
|
||||
{
|
||||
"name": "Strapi",
|
||||
"domainName": "strapi.com",
|
||||
"address": "Paris",
|
||||
"employees": 95
|
||||
},
|
||||
{
|
||||
"name": "Posthog",
|
||||
"domainName": "posthog.com",
|
||||
"name": "Stripe",
|
||||
"domainName": "stripe.com",
|
||||
"address": "San Francisco",
|
||||
"employees": 34
|
||||
"employees": 8000
|
||||
},
|
||||
{
|
||||
"name": "Figma",
|
||||
"domainName": "figma.com",
|
||||
"address": "San Francisco",
|
||||
"employees": 800
|
||||
},
|
||||
{
|
||||
"name": "Notion",
|
||||
"domainName": "notion.com",
|
||||
"address": "San Francisco",
|
||||
"employees": 400
|
||||
}
|
||||
]
|
||||
|
||||
@ -1,37 +1,37 @@
|
||||
[
|
||||
{
|
||||
"firstName": "Soumyadeb",
|
||||
"lastName": "Mitra",
|
||||
"firstName": "Brian",
|
||||
"lastName": "Chesky",
|
||||
"city": "San Francisco",
|
||||
"email": "soumyadeb@rudderstack.com",
|
||||
"email": "chesky@airbnb.com",
|
||||
"phone": ""
|
||||
},
|
||||
{
|
||||
"firstName": "Sebastian",
|
||||
"lastName": "Rindom",
|
||||
"city": "Copenhagen",
|
||||
"email": "sebastian@medusajs.com",
|
||||
"phone": ""
|
||||
},
|
||||
{
|
||||
"firstName": "Sameer",
|
||||
"lastName": "Al-Sakran",
|
||||
"city": "San Francisco",
|
||||
"email": "sameer@metabase.com",
|
||||
"phone": ""
|
||||
},
|
||||
{
|
||||
"firstName": "Pierre",
|
||||
"lastName": "Burgy",
|
||||
"firstName": "Alexandre",
|
||||
"lastName": "Prot",
|
||||
"city": "Paris",
|
||||
"email": "pierre@strapi.com",
|
||||
"email": "prot@qonto.com",
|
||||
"phone": ""
|
||||
},
|
||||
{
|
||||
"firstName": "James",
|
||||
"lastName": "Hawkins",
|
||||
"firstName": "Patrick",
|
||||
"lastName": "Collison",
|
||||
"city": "San Francisco",
|
||||
"email": "james@posthog.com",
|
||||
"email": "collison@stripe.com",
|
||||
"phone": ""
|
||||
},
|
||||
{
|
||||
"firstName": "Dylan",
|
||||
"lastName": "Field",
|
||||
"city": "San Francisco",
|
||||
"email": "field@figma.com",
|
||||
"phone": ""
|
||||
},
|
||||
{
|
||||
"firstName": "Ivan",
|
||||
"lastName": "Zhao",
|
||||
"city": "San Francisco",
|
||||
"email": "zhao@notion.com",
|
||||
"phone": ""
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user