In this PR I layout the first steps to migrate Activity to a traditional Standard objects Since this is a big transition, I'd rather split it into several deployments / PRs <img width="1512" alt="image" src="https://github.com/user-attachments/assets/012e2bbf-9d1b-4723-aaf6-269ef588b050"> --------- Co-authored-by: Charles Bochet <charles@twenty.com> Co-authored-by: bosiraphael <71827178+bosiraphael@users.noreply.github.com> Co-authored-by: Weiko <corentin@twenty.com> Co-authored-by: Faisal-imtiyaz123 <142205282+Faisal-imtiyaz123@users.noreply.github.com> Co-authored-by: Prateek Jain <prateekj1171998@gmail.com>
105 lines
2.8 KiB
TypeScript
105 lines
2.8 KiB
TypeScript
import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadata/object-metadata.entity';
|
|
import {
|
|
BASE_OBJECT_STANDARD_FIELD_IDS,
|
|
PERSON_STANDARD_FIELD_IDS,
|
|
} from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
|
|
import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
|
|
|
|
export const peopleAllView = async (
|
|
objectMetadataMap: Record<string, ObjectMetadataEntity>,
|
|
) => {
|
|
return {
|
|
name: 'All',
|
|
objectMetadataId: objectMetadataMap[STANDARD_OBJECT_IDS.person].id,
|
|
type: 'table',
|
|
key: 'INDEX',
|
|
position: 0,
|
|
icon: 'IconList',
|
|
kanbanFieldMetadataId: '',
|
|
filters: [],
|
|
fields: [
|
|
{
|
|
fieldMetadataId:
|
|
objectMetadataMap[STANDARD_OBJECT_IDS.person].fields[
|
|
PERSON_STANDARD_FIELD_IDS.name
|
|
],
|
|
position: 0,
|
|
isVisible: true,
|
|
size: 210,
|
|
},
|
|
{
|
|
fieldMetadataId:
|
|
objectMetadataMap[STANDARD_OBJECT_IDS.person].fields[
|
|
PERSON_STANDARD_FIELD_IDS.email
|
|
],
|
|
position: 1,
|
|
isVisible: true,
|
|
size: 150,
|
|
},
|
|
{
|
|
fieldMetadataId:
|
|
objectMetadataMap[STANDARD_OBJECT_IDS.person].fields[
|
|
PERSON_STANDARD_FIELD_IDS.company
|
|
],
|
|
position: 2,
|
|
isVisible: true,
|
|
size: 150,
|
|
},
|
|
{
|
|
fieldMetadataId:
|
|
objectMetadataMap[STANDARD_OBJECT_IDS.person].fields[
|
|
PERSON_STANDARD_FIELD_IDS.phone
|
|
],
|
|
position: 3,
|
|
isVisible: true,
|
|
size: 150,
|
|
},
|
|
{
|
|
fieldMetadataId:
|
|
objectMetadataMap[STANDARD_OBJECT_IDS.person].fields[
|
|
BASE_OBJECT_STANDARD_FIELD_IDS.createdAt
|
|
],
|
|
position: 4,
|
|
isVisible: true,
|
|
size: 150,
|
|
},
|
|
{
|
|
fieldMetadataId:
|
|
objectMetadataMap[STANDARD_OBJECT_IDS.person].fields[
|
|
PERSON_STANDARD_FIELD_IDS.city
|
|
],
|
|
position: 5,
|
|
isVisible: true,
|
|
size: 150,
|
|
},
|
|
{
|
|
fieldMetadataId:
|
|
objectMetadataMap[STANDARD_OBJECT_IDS.person].fields[
|
|
PERSON_STANDARD_FIELD_IDS.jobTitle
|
|
],
|
|
position: 6,
|
|
isVisible: true,
|
|
size: 150,
|
|
},
|
|
{
|
|
fieldMetadataId:
|
|
objectMetadataMap[STANDARD_OBJECT_IDS.person].fields[
|
|
PERSON_STANDARD_FIELD_IDS.linkedinLink
|
|
],
|
|
position: 7,
|
|
isVisible: true,
|
|
size: 150,
|
|
},
|
|
{
|
|
fieldMetadataId:
|
|
objectMetadataMap[STANDARD_OBJECT_IDS.person].fields[
|
|
PERSON_STANDARD_FIELD_IDS.xLink
|
|
],
|
|
position: 8,
|
|
isVisible: true,
|
|
size: 150,
|
|
},
|
|
],
|
|
};
|
|
};
|