Sammy/t 195 aau i see filters and sort on company (#104)
* feature: add company filter by name * feature: add fitler on URL * feature: set icons for sorts * feature: add creation date and address sorts * Add tests --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -3,7 +3,7 @@ import Companies from '../Companies';
|
||||
import { ThemeProvider } from '@emotion/react';
|
||||
import { lightTheme } from '../../../layout/styles/themes';
|
||||
import { GET_COMPANIES } from '../../../services/companies';
|
||||
import { mockCompanyData } from './mock-data';
|
||||
import { mockData } from '../__tests__/__data__/mock-data';
|
||||
import { MockedProvider } from '@apollo/client/testing';
|
||||
|
||||
const component = {
|
||||
@ -19,11 +19,12 @@ const mocks = [
|
||||
query: GET_COMPANIES,
|
||||
variables: {
|
||||
orderBy: [{ name: 'asc' }],
|
||||
where: {},
|
||||
},
|
||||
},
|
||||
result: {
|
||||
data: {
|
||||
companies: mockCompanyData,
|
||||
companies: mockData,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@ -1,18 +0,0 @@
|
||||
import { GraphqlQueryCompany } from '../../../interfaces/company.interface';
|
||||
|
||||
export const mockCompanyData: Array<GraphqlQueryCompany> = [
|
||||
{
|
||||
id: 'f121ab32-fac4-4b8c-9a3d-150c877319c2',
|
||||
name: 'ACME',
|
||||
domain_name: 'example.com',
|
||||
account_owner: {
|
||||
id: '91510aa5-ede6-451f-8029-a7fa69e4bad6',
|
||||
email: 'john@example.com',
|
||||
displayName: 'John Doe',
|
||||
__typename: 'User',
|
||||
},
|
||||
employees: 10,
|
||||
address: '1 Infinity Loop, 95014 Cupertino, California',
|
||||
created_at: new Date().toUTCString(),
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user