Dashboard: Berichten-tegel naast de Systeemstatus-tegel (twee kolommen vanaf md)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -25,8 +25,8 @@ export function MessagesTile() {
|
|||||||
if (!available) return null;
|
if (!available) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Link to="/messages" className="block" data-testid="messages-tile">
|
<Link to="/messages" className="block h-full" data-testid="messages-tile">
|
||||||
<Card className="transition-colors hover:bg-accent/50">
|
<Card className="h-full transition-colors hover:bg-accent/50">
|
||||||
<CardHeader className="flex-row items-center justify-between space-y-0">
|
<CardHeader className="flex-row items-center justify-between space-y-0">
|
||||||
<CardTitle>{t('contact.title')}</CardTitle>
|
<CardTitle>{t('contact.title')}</CardTitle>
|
||||||
<Mail className="size-5 text-muted-foreground" aria-hidden="true" />
|
<Mail className="size-5 text-muted-foreground" aria-hidden="true" />
|
||||||
|
|||||||
@@ -671,6 +671,9 @@ describe('Dashboard tile', () => {
|
|||||||
expect(screen.getByTestId('messages-tile-count')).toHaveTextContent('1'),
|
expect(screen.getByTestId('messages-tile-count')).toHaveTextContent('1'),
|
||||||
);
|
);
|
||||||
expect(tile).toHaveAttribute('href', '/messages');
|
expect(tile).toHaveAttribute('href', '/messages');
|
||||||
|
// Next to the system status tile in the same grid, not full width.
|
||||||
|
expect(tile.parentElement).toBe(screen.getByTestId('dashboard-tiles'));
|
||||||
|
expect(screen.getByTestId('availability-badge').closest('[data-testid="dashboard-tiles"]')).not.toBeNull();
|
||||||
expect(tile).toHaveTextContent('unread message');
|
expect(tile).toHaveTextContent('unread message');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ export function DashboardPage() {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="grid gap-4 md:grid-cols-2" data-testid="dashboard-tiles">
|
||||||
<Card>
|
<Card>
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<CardTitle>{t('availability.title')}</CardTitle>
|
<CardTitle>{t('availability.title')}</CardTitle>
|
||||||
@@ -62,8 +63,8 @@ export function DashboardPage() {
|
|||||||
{!isLoading && !data && !isError && null}
|
{!isLoading && !data && !isError && null}
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<MessagesTile />
|
<MessagesTile />
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user