Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions js/app/packages/app/component/Soup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,19 @@ export function Soup() {
});
});

createEffectOnEntityTypeNotification(
notificationSource,
'document',
(notification) => {
if (notification.notificationEventType === 'task_assigned') {
entityQueryClient.invalidateQueries({
queryKey: queryKeys.all.dss,
});
invalidateEntityNotifications(notification.entity_id);
}
}
);

const saveViewMutation = useUpsertSavedViewMutation();

let tabsRef: HTMLDivElement | undefined;
Expand Down
6 changes: 5 additions & 1 deletion js/app/packages/app/component/soupFilters.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { EntityData } from '@macro-entity';
import { type EntityData, isTaskEntity } from '@macro-entity';
import type { APIEmailThreadPreviewMetadata } from '@service-email/generated/schemas';
import type { SoupEmailThreadPreviewMetadata } from '@service-storage/generated/schemas';
import { makePersisted } from '@solid-primitives/storage';
Expand Down Expand Up @@ -253,6 +253,10 @@ export const signalFilter: ClientFilter = {
return hasRecentlyViewed(entity);
}
case 'document': {
if (isTaskEntity(entity)) {
// TODO (seamus) : filter on isCompleted
return true;
}
return hasRecentlyViewed(entity);
}
case 'email': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ function NotificationRow(props: {
) {
return 'shared';
}
if (props.notification.notificationEventType === 'task_assigned') {
return 'assigned to you';
}

const metadata = tryToTypedNotification(
props.notification
Expand Down
Loading