diff --git a/app/components/EventListItem.tsx b/app/components/EventListItem.tsx
index c8cdeb740..abe87e8b9 100644
--- a/app/components/EventListItem.tsx
+++ b/app/components/EventListItem.tsx
@@ -86,6 +86,18 @@ const EventListItem = ({ event, latest, document, ...rest }: Props) => {
icon = ;
meta = t("{{userName}} deleted", opts);
break;
+ case "documents.add_user":
+ meta = t("{{userName}} added {{addedUserName}}", {
+ ...opts,
+ addedUserName: event.user?.name ?? t("a user"),
+ });
+ break;
+ case "documents.remove_user":
+ meta = t("{{userName}} removed {{removedUserName}}", {
+ ...opts,
+ removedUserName: event.user?.name ?? t("a user"),
+ });
+ break;
case "documents.restore":
meta = t("{{userName}} moved from trash", opts);
diff --git a/app/components/PaginatedList.tsx b/app/components/PaginatedList.tsx
index 3daea4bed..8f6b86662 100644
--- a/app/components/PaginatedList.tsx
+++ b/app/components/PaginatedList.tsx
@@ -218,7 +218,10 @@ class PaginatedList extends React.Component> {
// If the heading is different to any previous heading then we
// should render it, otherwise the item can go under the previous
// heading
- if (!previousHeading || currentHeading !== previousHeading) {
+ if (
+ children &&
+ (!previousHeading || currentHeading !== previousHeading)
+ ) {
previousHeading = currentHeading;
return (
diff --git a/app/models/Event.ts b/app/models/Event.ts
index 22a882d9b..5ead9c48f 100644
--- a/app/models/Event.ts
+++ b/app/models/Event.ts
@@ -11,19 +11,22 @@ class Event extends Model {
modelId: string | null | undefined;
- actorId: string;
-
actorIpAddress: string | null | undefined;
documentId: string;
collectionId: string | null | undefined;
+ @Relation(() => User)
+ user: User;
+
userId: string;
@Relation(() => User)
actor: User;
+ actorId: string;
+
data: {
name: string;
email: string;
diff --git a/server/presenters/event.ts b/server/presenters/event.ts
index beaacf1d9..803afdc8b 100644
--- a/server/presenters/event.ts
+++ b/server/presenters/event.ts
@@ -6,6 +6,7 @@ export default function presentEvent(event: Event, isAdmin = false) {
id: event.id,
name: event.name,
modelId: event.modelId,
+ userId: event.userId,
actorId: event.actorId,
actorIpAddress: event.ip || undefined,
collectionId: event.collectionId,
diff --git a/shared/i18n/locales/en_US/translation.json b/shared/i18n/locales/en_US/translation.json
index 5cfe6a22b..7948374c0 100644
--- a/shared/i18n/locales/en_US/translation.json
+++ b/shared/i18n/locales/en_US/translation.json
@@ -204,6 +204,8 @@
"{{userName}} archived": "{{userName}} archived",
"{{userName}} restored": "{{userName}} restored",
"{{userName}} deleted": "{{userName}} deleted",
+ "{{userName}} added {{addedUserName}}": "{{userName}} added {{addedUserName}}",
+ "{{userName}} removed {{removedUserName}}": "{{userName}} removed {{removedUserName}}",
"{{userName}} moved from trash": "{{userName}} moved from trash",
"{{userName}} published": "{{userName}} published",
"{{userName}} unpublished": "{{userName}} unpublished",