[Refactor] Activity morph: first phase (#1075)

* Add company and person on update and create

* Enable reading with error management on commentable ID

* [CHECKPOINT] backward-compatible

* Migrate data for activity targets

* Revert "Migrate data for activity targets"

This reverts commit f89bc30689655c83cd5370331fec41b59d03fdb9.

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Emilien Chauvet
2023-08-05 00:33:50 +02:00
committed by GitHub
parent 04297b0556
commit ed1662223a
11 changed files with 80 additions and 18 deletions

View File

@ -61,6 +61,10 @@ export function useOpenCreateActivityDrawerForSelectedRowIds() {
commentableType: entity.type,
id: v4(),
createdAt: new Date().toISOString(),
companyId:
entity.type === CommentableType.Company ? entity.id : null,
personId:
entity.type === CommentableType.Person ? entity.id : null,
})),
skipDuplicates: true,
},