Feat/activity optimistic activities (#4009)
* Fix naming * Fixed cache.evict bug for relation target deletion * Fixed cascade delete activity targets * Working version * Fix * fix * WIP * Fixed optimistic effect target inline cell * Removed openCreateActivityDrawer v1 * Ok for timeline * Removed console.log * Fix update record optimistic effect * Refactored activity queries into useActivities for everything * Fixed bugs * Cleaned * Fix lint --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -192,11 +192,11 @@ export const CommandMenu = () => {
|
||||
|
||||
const activityCommands = useMemo(
|
||||
() =>
|
||||
activities.map(({ id, title }) => ({
|
||||
id,
|
||||
label: title ?? '',
|
||||
activities.map((activity) => ({
|
||||
id: activity.id,
|
||||
label: activity.title ?? '',
|
||||
to: '',
|
||||
onCommandClick: () => openActivityRightDrawer(id),
|
||||
onCommandClick: () => openActivityRightDrawer(activity),
|
||||
})),
|
||||
[activities, openActivityRightDrawer],
|
||||
);
|
||||
@ -372,7 +372,7 @@ export const CommandMenu = () => {
|
||||
Icon={IconNotes}
|
||||
key={activity.id}
|
||||
label={activity.title ?? ''}
|
||||
onClick={() => openActivityRightDrawer(activity.id)}
|
||||
onClick={() => openActivityRightDrawer(activity)}
|
||||
/>
|
||||
</SelectableItem>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user