Create and EditableRelation component and make it generic (#107)
* Create and EditableRelation component and make it generic * Refactor EditableCell component to be more flexible * Complete Company picker on people page * Fix lint
This commit is contained in:
@ -6,7 +6,7 @@ export interface Opportunity {
|
||||
icon: string;
|
||||
}
|
||||
|
||||
export interface Company {
|
||||
export type Company = {
|
||||
id: string;
|
||||
name: string;
|
||||
domain_name: string;
|
||||
@ -15,7 +15,10 @@ export interface Company {
|
||||
opportunities: Opportunity[];
|
||||
accountOwner?: User;
|
||||
creationDate: Date;
|
||||
}
|
||||
};
|
||||
|
||||
export type PartialCompany = Partial<Company> &
|
||||
Pick<Company, 'id' | 'name' | 'domain_name'>;
|
||||
|
||||
export type GraphqlQueryCompany = {
|
||||
id: string;
|
||||
|
||||
@ -31,8 +31,12 @@ describe('mapPerson', () => {
|
||||
city: '',
|
||||
company: {
|
||||
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6b',
|
||||
name: '',
|
||||
name: 'Test',
|
||||
domain_name: '',
|
||||
opportunities: [],
|
||||
employees: 0,
|
||||
address: '',
|
||||
creationDate: new Date(),
|
||||
},
|
||||
creationDate: new Date(),
|
||||
pipe: {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Company } from './company.interface';
|
||||
import { PartialCompany } from './company.interface';
|
||||
import { Pipe } from './pipe.interface';
|
||||
|
||||
export type Person = {
|
||||
@ -7,10 +7,7 @@ export type Person = {
|
||||
lastname: string;
|
||||
picture?: string;
|
||||
email: string;
|
||||
company: Omit<
|
||||
Company,
|
||||
'employees' | 'address' | 'opportunities' | 'accountOwner' | 'creationDate'
|
||||
>;
|
||||
company: PartialCompany;
|
||||
phone: string;
|
||||
creationDate: Date;
|
||||
pipe: Pipe;
|
||||
|
||||
Reference in New Issue
Block a user