fix(#145): deep-link notifications; show createdAt in recent docs

- Notification widget builds full link with ?commentId= and
  &annotationId= params, matching the bell notification behaviour
- Recent docs widget shows createdAt (upload date) instead of
  documentDate (the date on the original document)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-03-29 10:03:36 +02:00
parent c8da2224f8
commit 7734ce7bae
4 changed files with 31 additions and 17 deletions

View File

@@ -5,7 +5,7 @@ import { getLocale } from '$lib/paraglide/runtime.js';
type Document = {
id: string;
title: string;
documentDate?: string;
createdAt?: string;
sender?: { id: string; firstName: string; lastName: string };
};
@@ -20,7 +20,7 @@ function formatDate(dateStr: string): string {
day: 'numeric',
month: 'long',
year: 'numeric'
}).format(new Date(dateStr + 'T12:00:00'));
}).format(new Date(dateStr));
}
</script>
@@ -37,12 +37,12 @@ function formatDate(dateStr: string): string {
>
{doc.title}
</a>
{#if doc.documentDate}
{#if doc.createdAt}
<span
data-testid="doc-date-{doc.id}"
class="ml-2 shrink-0 font-sans text-xs text-gray-400"
>
{formatDate(doc.documentDate)}
{formatDate(doc.createdAt)}
</span>
{/if}
</div>