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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user