Activity as standard object (#6219)
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>
This commit is contained in:
124
packages/twenty-front/src/testing/mock-data/notes.ts
Normal file
124
packages/twenty-front/src/testing/mock-data/notes.ts
Normal file
@ -0,0 +1,124 @@
|
||||
import { Note } from '@/activities/types/Note';
|
||||
import { NoteTarget } from '@/activities/types/NoteTarget';
|
||||
|
||||
type MockedNote = Partial<Note> & { __typename?: string };
|
||||
|
||||
export const mockedNotes: Array<MockedNote> = [
|
||||
{
|
||||
id: '3ecaa1be-aac7-463a-a38e-64078dd451d5',
|
||||
createdAt: '2023-04-26T10:12:42.33625+00:00',
|
||||
updatedAt: '2023-04-26T10:23:42.33625+00:00',
|
||||
title: 'My very first note',
|
||||
body: null,
|
||||
noteTargets: [
|
||||
{
|
||||
id: '89bb825c-171e-4bcc-9cf7-43448d6fb300',
|
||||
createdAt: '2023-04-26T10:12:42.33625+00:00',
|
||||
updatedAt: '2023-04-26T10:23:42.33625+00:00',
|
||||
targetObjectNameSingular: 'company',
|
||||
personId: null,
|
||||
companyId: '89bb825c-171e-4bcc-9cf7-43448d6fb280',
|
||||
company: {
|
||||
__typename: 'Company',
|
||||
id: '89bb825c-171e-4bcc-9cf7-43448d6fb280',
|
||||
name: 'Airbnb',
|
||||
domainName: 'airbnb.com',
|
||||
},
|
||||
person: null,
|
||||
noteId: '89bb825c-171e-4bcc-9cf7-43448d6fb230',
|
||||
note: {
|
||||
__typename: 'Activity',
|
||||
id: '89bb825c-171e-4bcc-9cf7-43448d6fb230',
|
||||
createdAt: '2023-04-26T10:12:42.33625+00:00',
|
||||
updatedAt: '2023-04-26T10:23:42.33625+00:00',
|
||||
},
|
||||
__typename: 'NoteTarget',
|
||||
},
|
||||
{
|
||||
id: '89bb825c-171e-4bcc-9cf7-43448d6fb301',
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
targetObjectNameSingular: 'company',
|
||||
personId: null,
|
||||
companyId: 'b396e6b9-dc5c-4643-bcff-61b6cf7523ae',
|
||||
company: {
|
||||
__typename: 'Company',
|
||||
id: '89bb825c-171e-4bcc-9cf7-43448d6fb278',
|
||||
name: 'Aircall',
|
||||
domainName: 'aircall.io',
|
||||
},
|
||||
person: null,
|
||||
noteId: 'b396e6b9-dc5c-4643-bcff-61b6cf7523ae',
|
||||
note: {
|
||||
__typename: 'Note',
|
||||
id: '89bb825c-171e-4bcc-9cf7-43448d6fb231',
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
},
|
||||
__typename: 'NoteTarget',
|
||||
},
|
||||
] as Array<NoteTarget>,
|
||||
},
|
||||
{
|
||||
id: '89bb825c-171e-4bcc-9cf7-43448d6fb278a',
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
title: 'Another note',
|
||||
body: null,
|
||||
noteTargets: [
|
||||
{
|
||||
id: '89bb825c-171e-4bcc-9cf7-43448d6fb278t',
|
||||
createdAt: '2023-04-26T10:12:42.33625+00:00',
|
||||
updatedAt: '2023-04-26T10:23:42.33625+00:00',
|
||||
targetObjectNameSingular: 'person',
|
||||
personId: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6b', // Alexandre
|
||||
person: {
|
||||
__typename: 'Person',
|
||||
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6b',
|
||||
name: {
|
||||
firstName: 'Alexandre',
|
||||
lastName: 'Test',
|
||||
},
|
||||
avatarUrl: '',
|
||||
},
|
||||
company: null,
|
||||
companyId: null,
|
||||
noteId: '89bb825c-171e-4bcc-9cf7-43448d6fb278a',
|
||||
note: {
|
||||
__typename: 'Note',
|
||||
id: '89bb825c-171e-4bcc-9cf7-43448d6fb278a',
|
||||
createdAt: '2023-04-26T10:12:42.33625+00:00',
|
||||
updatedAt: '2023-04-26T10:23:42.33625+00:00',
|
||||
},
|
||||
__typename: 'NoteTarget',
|
||||
},
|
||||
{
|
||||
id: '89bb825c-171e-4bcc-9cf7-43448d6fb279t',
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
personId: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6d', // Jean d'Eau
|
||||
companyId: null,
|
||||
targetObjectNameSingular: 'person',
|
||||
company: null,
|
||||
person: {
|
||||
__typename: 'Person',
|
||||
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6d',
|
||||
name: {
|
||||
firstName: 'Jean',
|
||||
lastName: "d'Eau",
|
||||
},
|
||||
avatarUrl: '',
|
||||
},
|
||||
noteId: '89bb825c-171e-4bcc-9cf7-43448d6fb278a',
|
||||
note: {
|
||||
__typename: 'Note',
|
||||
id: '89bb825c-171e-4bcc-9cf7-43448d6fb278a',
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
},
|
||||
__typename: 'NoteTarget',
|
||||
},
|
||||
] as Array<NoteTarget>,
|
||||
__typename: 'Note',
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user