[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:
@ -68,7 +68,9 @@ export function TaskRow({ task }: { task: TaskForList }) {
|
||||
in: task?.activityTargets
|
||||
? task?.activityTargets
|
||||
.filter((target) => target.commentableType === 'Person')
|
||||
.map((target) => target.commentableId ?? '')
|
||||
.map(
|
||||
(target) => (target.personId || target.commentableId) ?? '',
|
||||
)
|
||||
: [],
|
||||
},
|
||||
},
|
||||
@ -82,7 +84,9 @@ export function TaskRow({ task }: { task: TaskForList }) {
|
||||
in: task?.activityTargets
|
||||
? task?.activityTargets
|
||||
.filter((target) => target.commentableType === 'Company')
|
||||
.map((target) => target.commentableId ?? '')
|
||||
.map(
|
||||
(target) => (target.companyId || target.commentableId) ?? '',
|
||||
)
|
||||
: [],
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user