Introduce main identifier to power RelationFieldDisplay (#2577)
* Introduce main identifier to power RelationFieldDisplay, FilterDrodown, TableFirstColumn * Apply to RelationPicker
This commit is contained in:
@ -11,14 +11,12 @@ import { sleep } from '~/testing/sleep';
|
||||
|
||||
import { relationPickerSearchFilterScopedState } from '../../states/relationPickerSearchFilterScopedState';
|
||||
import { EntityForSelect } from '../../types/EntityForSelect';
|
||||
import { Entity } from '../../types/EntityTypeForSelect';
|
||||
import { SingleEntitySelect } from '../SingleEntitySelect';
|
||||
|
||||
const entities = mockedPeopleData.map<EntityForSelect>((person) => ({
|
||||
id: person.id,
|
||||
entityType: Entity.Person,
|
||||
name: person.name.firstName + ' ' + person.name.lastName,
|
||||
originalEntity: person,
|
||||
record: person,
|
||||
}));
|
||||
|
||||
const meta: Meta<typeof SingleEntitySelect> = {
|
||||
|
||||
@ -1,12 +1,9 @@
|
||||
import { AvatarType } from '@/users/components/Avatar';
|
||||
|
||||
import { EntityTypeForSelect } from './EntityTypeForSelect';
|
||||
|
||||
export type EntityForSelect = {
|
||||
id: string;
|
||||
entityType: EntityTypeForSelect;
|
||||
name: string;
|
||||
avatarUrl?: string;
|
||||
avatarType?: AvatarType;
|
||||
originalEntity: any;
|
||||
record: any;
|
||||
};
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
import { ActivityTargetableEntityType } from '@/activities/types/ActivityTargetableEntity';
|
||||
|
||||
export enum Entity {
|
||||
Company = 'Company',
|
||||
Person = 'Person',
|
||||
User = 'User',
|
||||
WorkspaceMember = 'WorkspaceMember',
|
||||
}
|
||||
|
||||
export type EntityTypeForSelect = ActivityTargetableEntityType | Entity;
|
||||
Reference in New Issue
Block a user