Fixed bug for refectch activities and create activity on the currently filtered user. (#1493)

* Fixed bug for refectch activities and create activity on the currently filtered user.

* Refactor optimistif effect

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Lucas Bordeau
2023-09-11 08:02:51 +02:00
committed by GitHub
parent 08727aafe5
commit 9be069bedc
37 changed files with 363 additions and 243 deletions

View File

@ -59,7 +59,12 @@ export function Notes({ entity }: { entity: ActivityTargetableEntity }) {
Icon={IconNotes}
title="New note"
variant="secondary"
onClick={() => openCreateActivity(ActivityType.Note, [entity])}
onClick={() =>
openCreateActivity({
type: ActivityType.Note,
targetableEntities: [entity],
})
}
/>
</StyledTaskGroupEmptyContainer>
);
@ -76,7 +81,12 @@ export function Notes({ entity }: { entity: ActivityTargetableEntity }) {
size="small"
variant="secondary"
title="Add note"
onClick={() => openCreateActivity(ActivityType.Note, [entity])}
onClick={() =>
openCreateActivity({
type: ActivityType.Note,
targetableEntities: [entity],
})
}
></Button>
}
/>