2026-03-11 23:33:10 +00:00
|
|
|
<script setup lang="ts">
|
2026-03-20 12:00:24 +00:00
|
|
|
import { Head, Link, router } from '@inertiajs/vue3';
|
2026-03-11 23:33:10 +00:00
|
|
|
import {
|
|
|
|
|
Briefcase,
|
|
|
|
|
Building2,
|
feat: implement Story 2.4 — Dashboard Activity Feed with review fixes
Add role-scoped activity feed to the dashboard showing the 20 most recent
workspace events. Owners/Managers see all activity (declarations, clients,
team changes); Workers see only their assigned declarations. Includes
French descriptions, relative timestamps, responsive layout (desktop
sidebar, tablet inline, mobile collapsible), and 7 passing Pest tests.
Review fixes applied: batch-load declarations/clients/users to eliminate
N+1 queries, consistent soft-delete handling in URL resolution, French
grammar singular/plural fix, missing icon map entry, and corrected tablet
breakpoint per spec.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 21:21:07 +01:00
|
|
|
ChevronDown,
|
2026-03-22 17:31:23 +01:00
|
|
|
ClipboardList,
|
2026-03-20 12:00:24 +00:00
|
|
|
EllipsisVertical,
|
|
|
|
|
Eye,
|
2026-03-11 23:33:10 +00:00
|
|
|
FolderOpen,
|
2026-03-20 12:00:24 +00:00
|
|
|
Send,
|
|
|
|
|
UserRoundCog,
|
|
|
|
|
Users,
|
2026-03-11 23:33:10 +00:00
|
|
|
} from 'lucide-vue-next';
|
feat: implement Story 2.4 — Dashboard Activity Feed with review fixes
Add role-scoped activity feed to the dashboard showing the 20 most recent
workspace events. Owners/Managers see all activity (declarations, clients,
team changes); Workers see only their assigned declarations. Includes
French descriptions, relative timestamps, responsive layout (desktop
sidebar, tablet inline, mobile collapsible), and 7 passing Pest tests.
Review fixes applied: batch-load declarations/clients/users to eliminate
N+1 queries, consistent soft-delete handling in URL resolution, French
grammar singular/plural fix, missing icon map entry, and corrected tablet
breakpoint per spec.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 21:21:07 +01:00
|
|
|
import { computed, ref } from 'vue';
|
|
|
|
|
import ActivityFeed from '@/components/dashboard/ActivityFeed.vue';
|
2026-03-20 12:33:27 +00:00
|
|
|
import PriorityAlertsPanel from '@/components/dashboard/PriorityAlertsPanel.vue';
|
2026-03-20 12:00:24 +00:00
|
|
|
import StatCard from '@/components/dashboard/StatCard.vue';
|
2026-03-11 23:33:10 +00:00
|
|
|
import { Badge } from '@/components/ui/badge';
|
2026-03-12 18:25:32 +00:00
|
|
|
import { Button } from '@/components/ui/button';
|
2026-03-20 12:00:24 +00:00
|
|
|
import { Card, CardContent } from '@/components/ui/card';
|
feat: implement Story 2.4 — Dashboard Activity Feed with review fixes
Add role-scoped activity feed to the dashboard showing the 20 most recent
workspace events. Owners/Managers see all activity (declarations, clients,
team changes); Workers see only their assigned declarations. Includes
French descriptions, relative timestamps, responsive layout (desktop
sidebar, tablet inline, mobile collapsible), and 7 passing Pest tests.
Review fixes applied: batch-load declarations/clients/users to eliminate
N+1 queries, consistent soft-delete handling in URL resolution, French
grammar singular/plural fix, missing icon map entry, and corrected tablet
breakpoint per spec.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 21:21:07 +01:00
|
|
|
import {
|
|
|
|
|
Collapsible,
|
|
|
|
|
CollapsibleContent,
|
|
|
|
|
CollapsibleTrigger,
|
|
|
|
|
} from '@/components/ui/collapsible';
|
2026-03-20 12:00:24 +00:00
|
|
|
import {
|
|
|
|
|
DropdownMenu,
|
|
|
|
|
DropdownMenuContent,
|
|
|
|
|
DropdownMenuItem,
|
|
|
|
|
DropdownMenuTrigger,
|
|
|
|
|
} from '@/components/ui/dropdown-menu';
|
|
|
|
|
import {
|
|
|
|
|
Table,
|
|
|
|
|
TableBody,
|
|
|
|
|
TableCell,
|
|
|
|
|
TableHead,
|
|
|
|
|
TableHeader,
|
|
|
|
|
TableRow,
|
|
|
|
|
} from '@/components/ui/table';
|
2026-03-12 18:25:32 +00:00
|
|
|
import AppLayout from '@/layouts/AppLayout.vue';
|
2026-03-11 23:33:10 +00:00
|
|
|
import { dashboard } from '@/routes';
|
2026-03-20 12:00:24 +00:00
|
|
|
import { index as usersIndex } from '@/routes/users';
|
|
|
|
|
import { index as workspacesIndex } from '@/routes/workspaces';
|
|
|
|
|
import type {
|
|
|
|
|
BreadcrumbItem,
|
|
|
|
|
DashboardDeclaration,
|
|
|
|
|
DashboardProps,
|
|
|
|
|
StatCardLink,
|
|
|
|
|
} from '@/types';
|
2026-03-11 23:33:10 +00:00
|
|
|
|
2026-03-20 12:00:24 +00:00
|
|
|
type Props = DashboardProps;
|
2026-03-11 23:33:10 +00:00
|
|
|
|
|
|
|
|
const props = defineProps<Props>();
|
|
|
|
|
|
|
|
|
|
const breadcrumbs: BreadcrumbItem[] = [
|
|
|
|
|
{
|
|
|
|
|
title: 'Dashboard',
|
|
|
|
|
href: dashboard().url,
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
const hasWorkspace = computed(() => !!props.workspaceName);
|
feat: implement Story 2.4 — Dashboard Activity Feed with review fixes
Add role-scoped activity feed to the dashboard showing the 20 most recent
workspace events. Owners/Managers see all activity (declarations, clients,
team changes); Workers see only their assigned declarations. Includes
French descriptions, relative timestamps, responsive layout (desktop
sidebar, tablet inline, mobile collapsible), and 7 passing Pest tests.
Review fixes applied: batch-load declarations/clients/users to eliminate
N+1 queries, consistent soft-delete handling in URL resolution, French
grammar singular/plural fix, missing icon map entry, and corrected tablet
breakpoint per spec.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 21:21:07 +01:00
|
|
|
const showFeed = ref(false);
|
2026-03-11 23:33:10 +00:00
|
|
|
|
2026-03-22 17:31:23 +01:00
|
|
|
const isWorkerEmpty = computed(
|
|
|
|
|
() =>
|
|
|
|
|
props.isWorker &&
|
|
|
|
|
props.declarations.length === 0 &&
|
feat: implement Story 2.4 — Dashboard Activity Feed with review fixes
Add role-scoped activity feed to the dashboard showing the 20 most recent
workspace events. Owners/Managers see all activity (declarations, clients,
team changes); Workers see only their assigned declarations. Includes
French descriptions, relative timestamps, responsive layout (desktop
sidebar, tablet inline, mobile collapsible), and 7 passing Pest tests.
Review fixes applied: batch-load declarations/clients/users to eliminate
N+1 queries, consistent soft-delete handling in URL resolution, French
grammar singular/plural fix, missing icon map entry, and corrected tablet
breakpoint per spec.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 21:21:07 +01:00
|
|
|
props.alerts.length === 0 &&
|
2026-03-22 17:31:23 +01:00
|
|
|
props.statCards.every((c) => c.count === 0),
|
|
|
|
|
);
|
|
|
|
|
|
2026-03-20 12:00:24 +00:00
|
|
|
type DeadlineProximity = 'safe' | 'approaching' | 'urgent' | 'overdue' | 'none';
|
2026-03-11 23:33:10 +00:00
|
|
|
|
2026-03-20 12:00:24 +00:00
|
|
|
function deadlineProximity(dueDate: string | null): DeadlineProximity {
|
|
|
|
|
if (!dueDate) return 'none';
|
|
|
|
|
const now = new Date();
|
|
|
|
|
const deadline = new Date(dueDate);
|
|
|
|
|
const diffDays = Math.ceil(
|
|
|
|
|
(deadline.getTime() - now.getTime()) / (1000 * 60 * 60 * 24),
|
|
|
|
|
);
|
|
|
|
|
if (diffDays < 0) return 'overdue';
|
|
|
|
|
if (diffDays <= 5) return 'urgent';
|
|
|
|
|
if (diffDays <= 7) return 'approaching';
|
|
|
|
|
return 'safe';
|
2026-03-11 23:33:10 +00:00
|
|
|
}
|
|
|
|
|
|
2026-03-20 12:00:24 +00:00
|
|
|
function deadlineClass(dueDate: string | null): string {
|
|
|
|
|
const proximity = deadlineProximity(dueDate);
|
|
|
|
|
const map: Record<DeadlineProximity, string> = {
|
|
|
|
|
safe: 'text-green-600',
|
|
|
|
|
approaching: 'text-amber-600',
|
|
|
|
|
urgent: 'text-red-600',
|
|
|
|
|
overdue: 'text-red-600 animate-pulse',
|
|
|
|
|
none: 'text-muted-foreground',
|
|
|
|
|
};
|
|
|
|
|
return map[proximity];
|
2026-03-11 23:33:10 +00:00
|
|
|
}
|
|
|
|
|
|
2026-03-20 12:00:24 +00:00
|
|
|
function statusBadgeVariant(
|
|
|
|
|
status: string,
|
|
|
|
|
): 'default' | 'secondary' | 'destructive' | 'outline' {
|
|
|
|
|
const map: Record<
|
|
|
|
|
string,
|
|
|
|
|
'default' | 'secondary' | 'destructive' | 'outline'
|
|
|
|
|
> = {
|
|
|
|
|
created: 'secondary',
|
|
|
|
|
en_cours: 'default',
|
|
|
|
|
en_attente_client: 'outline',
|
|
|
|
|
termine: 'secondary',
|
|
|
|
|
mise_en_demeure: 'destructive',
|
|
|
|
|
ferme: 'secondary',
|
2026-03-11 23:33:10 +00:00
|
|
|
};
|
2026-03-20 12:00:24 +00:00
|
|
|
return map[status] ?? 'secondary';
|
2026-03-11 23:33:10 +00:00
|
|
|
}
|
|
|
|
|
|
2026-03-20 12:00:24 +00:00
|
|
|
function navigateToDeclaration(declaration: DashboardDeclaration): void {
|
|
|
|
|
router.get(declaration.showUrl);
|
|
|
|
|
}
|
2026-03-11 23:33:10 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<Head title="Dashboard" />
|
|
|
|
|
|
|
|
|
|
<AppLayout :breadcrumbs="breadcrumbs">
|
2026-03-12 18:25:32 +00:00
|
|
|
<div
|
|
|
|
|
class="flex h-full flex-1 flex-col gap-6 overflow-x-auto rounded-xl p-4"
|
|
|
|
|
>
|
2026-03-20 12:00:24 +00:00
|
|
|
<!-- Quick links when no workspace (admin view) -->
|
2026-03-12 18:25:32 +00:00
|
|
|
<div
|
|
|
|
|
v-if="!hasWorkspace"
|
|
|
|
|
class="grid auto-rows-min gap-4 md:grid-cols-3"
|
|
|
|
|
>
|
|
|
|
|
<Link
|
2026-03-20 12:00:24 +00:00
|
|
|
:href="usersIndex().url"
|
2026-03-12 18:25:32 +00:00
|
|
|
class="relative flex aspect-video flex-col items-center justify-center gap-2 overflow-hidden rounded-xl border border-sidebar-border/70 transition-colors hover:bg-muted/50 dark:border-sidebar-border"
|
|
|
|
|
>
|
2026-03-11 23:33:10 +00:00
|
|
|
<Users class="h-8 w-8" />
|
|
|
|
|
<span class="font-medium">Users</span>
|
2026-03-12 18:25:32 +00:00
|
|
|
<span class="text-xs text-muted-foreground"
|
|
|
|
|
>Manage users</span
|
|
|
|
|
>
|
2026-03-11 23:33:10 +00:00
|
|
|
</Link>
|
2026-03-12 18:25:32 +00:00
|
|
|
<Link
|
2026-03-20 12:00:24 +00:00
|
|
|
:href="workspacesIndex().url"
|
2026-03-12 18:25:32 +00:00
|
|
|
class="relative flex aspect-video flex-col items-center justify-center gap-2 overflow-hidden rounded-xl border border-sidebar-border/70 transition-colors hover:bg-muted/50 dark:border-sidebar-border"
|
|
|
|
|
>
|
2026-03-11 23:33:10 +00:00
|
|
|
<Building2 class="h-8 w-8" />
|
|
|
|
|
<span class="font-medium">Workspaces</span>
|
2026-03-12 18:25:32 +00:00
|
|
|
<span class="text-xs text-muted-foreground"
|
|
|
|
|
>Cabinets comptables</span
|
|
|
|
|
>
|
2026-03-11 23:33:10 +00:00
|
|
|
</Link>
|
2026-03-12 18:25:32 +00:00
|
|
|
<Link
|
|
|
|
|
v-if="clientsUrl"
|
|
|
|
|
:href="clientsUrl"
|
|
|
|
|
class="relative flex aspect-video flex-col items-center justify-center gap-2 overflow-hidden rounded-xl border border-sidebar-border/70 transition-colors hover:bg-muted/50 dark:border-sidebar-border"
|
|
|
|
|
>
|
2026-03-11 23:33:10 +00:00
|
|
|
<Briefcase class="h-8 w-8" />
|
|
|
|
|
<span class="font-medium">Clients</span>
|
2026-03-12 18:25:32 +00:00
|
|
|
<span class="text-xs text-muted-foreground"
|
|
|
|
|
>Manage clients</span
|
|
|
|
|
>
|
2026-03-11 23:33:10 +00:00
|
|
|
</Link>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Workspace dashboard -->
|
|
|
|
|
<template v-if="hasWorkspace">
|
2026-03-22 17:31:23 +01:00
|
|
|
<!-- Worker empty state -->
|
|
|
|
|
<Card v-if="isWorkerEmpty">
|
|
|
|
|
<CardContent
|
|
|
|
|
class="flex flex-col items-center justify-center py-16"
|
|
|
|
|
>
|
|
|
|
|
<ClipboardList
|
|
|
|
|
class="mb-3 h-12 w-12 text-muted-foreground"
|
|
|
|
|
/>
|
|
|
|
|
<p class="text-lg font-medium">
|
|
|
|
|
Aucune déclaration assignée
|
|
|
|
|
</p>
|
|
|
|
|
<p class="text-sm text-muted-foreground">
|
feat: implement Story 2.4 — Dashboard Activity Feed with review fixes
Add role-scoped activity feed to the dashboard showing the 20 most recent
workspace events. Owners/Managers see all activity (declarations, clients,
team changes); Workers see only their assigned declarations. Includes
French descriptions, relative timestamps, responsive layout (desktop
sidebar, tablet inline, mobile collapsible), and 7 passing Pest tests.
Review fixes applied: batch-load declarations/clients/users to eliminate
N+1 queries, consistent soft-delete handling in URL resolution, French
grammar singular/plural fix, missing icon map entry, and corrected tablet
breakpoint per spec.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 21:21:07 +01:00
|
|
|
Contactez votre responsable
|
2026-03-22 17:31:23 +01:00
|
|
|
</p>
|
|
|
|
|
</CardContent>
|
|
|
|
|
</Card>
|
2026-03-20 12:33:27 +00:00
|
|
|
|
2026-03-22 17:31:23 +01:00
|
|
|
<template v-if="!isWorkerEmpty">
|
feat: implement Story 2.4 — Dashboard Activity Feed with review fixes
Add role-scoped activity feed to the dashboard showing the 20 most recent
workspace events. Owners/Managers see all activity (declarations, clients,
team changes); Workers see only their assigned declarations. Includes
French descriptions, relative timestamps, responsive layout (desktop
sidebar, tablet inline, mobile collapsible), and 7 passing Pest tests.
Review fixes applied: batch-load declarations/clients/users to eliminate
N+1 queries, consistent soft-delete handling in URL resolution, French
grammar singular/plural fix, missing icon map entry, and corrected tablet
breakpoint per spec.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 21:21:07 +01:00
|
|
|
<div class="grid grid-cols-1 gap-6 lg:grid-cols-3">
|
|
|
|
|
<!-- Main content (2/3 on desktop) -->
|
|
|
|
|
<div class="space-y-6 lg:col-span-2">
|
|
|
|
|
<!-- Worker subtitle -->
|
|
|
|
|
<p
|
|
|
|
|
v-if="isWorker"
|
|
|
|
|
class="text-sm text-muted-foreground"
|
|
|
|
|
>
|
|
|
|
|
Mes déclarations
|
|
|
|
|
</p>
|
2026-03-22 17:31:23 +01:00
|
|
|
|
feat: implement Story 2.4 — Dashboard Activity Feed with review fixes
Add role-scoped activity feed to the dashboard showing the 20 most recent
workspace events. Owners/Managers see all activity (declarations, clients,
team changes); Workers see only their assigned declarations. Includes
French descriptions, relative timestamps, responsive layout (desktop
sidebar, tablet inline, mobile collapsible), and 7 passing Pest tests.
Review fixes applied: batch-load declarations/clients/users to eliminate
N+1 queries, consistent soft-delete handling in URL resolution, French
grammar singular/plural fix, missing icon map entry, and corrected tablet
breakpoint per spec.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 21:21:07 +01:00
|
|
|
<!-- KPI StatCards -->
|
|
|
|
|
<div
|
|
|
|
|
class="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-2 xl:grid-cols-4"
|
2026-03-22 17:31:23 +01:00
|
|
|
>
|
feat: implement Story 2.4 — Dashboard Activity Feed with review fixes
Add role-scoped activity feed to the dashboard showing the 20 most recent
workspace events. Owners/Managers see all activity (declarations, clients,
team changes); Workers see only their assigned declarations. Includes
French descriptions, relative timestamps, responsive layout (desktop
sidebar, tablet inline, mobile collapsible), and 7 passing Pest tests.
Review fixes applied: batch-load declarations/clients/users to eliminate
N+1 queries, consistent soft-delete handling in URL resolution, French
grammar singular/plural fix, missing icon map entry, and corrected tablet
breakpoint per spec.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 21:21:07 +01:00
|
|
|
<StatCard
|
|
|
|
|
v-for="card in statCards"
|
|
|
|
|
:key="card.label"
|
|
|
|
|
:label="card.label"
|
|
|
|
|
:count="card.count"
|
|
|
|
|
:status="
|
|
|
|
|
card.status as StatCardLink['status']
|
|
|
|
|
"
|
|
|
|
|
:href="card.href"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
2026-03-22 17:31:23 +01:00
|
|
|
|
feat: implement Story 2.4 — Dashboard Activity Feed with review fixes
Add role-scoped activity feed to the dashboard showing the 20 most recent
workspace events. Owners/Managers see all activity (declarations, clients,
team changes); Workers see only their assigned declarations. Includes
French descriptions, relative timestamps, responsive layout (desktop
sidebar, tablet inline, mobile collapsible), and 7 passing Pest tests.
Review fixes applied: batch-load declarations/clients/users to eliminate
N+1 queries, consistent soft-delete handling in URL resolution, French
grammar singular/plural fix, missing icon map entry, and corrected tablet
breakpoint per spec.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 21:21:07 +01:00
|
|
|
<!-- Priority Alerts Panel -->
|
|
|
|
|
<PriorityAlertsPanel
|
|
|
|
|
:alerts="alerts"
|
|
|
|
|
:view-all-url="viewAllAlertsUrl"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<!-- Urgent Declarations Table -->
|
|
|
|
|
<div class="space-y-4">
|
|
|
|
|
<div class="flex items-center justify-between">
|
|
|
|
|
<h2 class="text-lg font-semibold">
|
|
|
|
|
Déclarations urgentes
|
|
|
|
|
</h2>
|
|
|
|
|
<Button
|
|
|
|
|
v-if="declarationsUrl"
|
|
|
|
|
variant="outline"
|
|
|
|
|
as-child
|
|
|
|
|
>
|
|
|
|
|
<Link :href="declarationsUrl">
|
|
|
|
|
Toutes les déclarations
|
|
|
|
|
</Link>
|
|
|
|
|
</Button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<Card
|
|
|
|
|
v-if="declarations.length > 0"
|
|
|
|
|
class="overflow-hidden"
|
|
|
|
|
>
|
|
|
|
|
<div class="overflow-x-auto">
|
|
|
|
|
<Table>
|
|
|
|
|
<TableHeader>
|
|
|
|
|
<TableRow>
|
|
|
|
|
<TableHead
|
|
|
|
|
>Client</TableHead
|
|
|
|
|
>
|
|
|
|
|
<TableHead>Type</TableHead>
|
|
|
|
|
<TableHead
|
|
|
|
|
>Date limite</TableHead
|
|
|
|
|
>
|
|
|
|
|
<TableHead v-if="!isWorker"
|
|
|
|
|
>Assigné à</TableHead
|
|
|
|
|
>
|
|
|
|
|
<TableHead
|
|
|
|
|
>Statut</TableHead
|
|
|
|
|
>
|
|
|
|
|
<TableHead class="w-10" />
|
|
|
|
|
</TableRow>
|
|
|
|
|
</TableHeader>
|
|
|
|
|
<TableBody>
|
|
|
|
|
<TableRow
|
|
|
|
|
v-for="declaration in declarations"
|
|
|
|
|
:key="declaration.id"
|
|
|
|
|
class="cursor-pointer"
|
|
|
|
|
@click="
|
|
|
|
|
navigateToDeclaration(
|
|
|
|
|
declaration,
|
2026-03-22 17:31:23 +01:00
|
|
|
)
|
|
|
|
|
"
|
2026-03-12 18:25:32 +00:00
|
|
|
>
|
feat: implement Story 2.4 — Dashboard Activity Feed with review fixes
Add role-scoped activity feed to the dashboard showing the 20 most recent
workspace events. Owners/Managers see all activity (declarations, clients,
team changes); Workers see only their assigned declarations. Includes
French descriptions, relative timestamps, responsive layout (desktop
sidebar, tablet inline, mobile collapsible), and 7 passing Pest tests.
Review fixes applied: batch-load declarations/clients/users to eliminate
N+1 queries, consistent soft-delete handling in URL resolution, French
grammar singular/plural fix, missing icon map entry, and corrected tablet
breakpoint per spec.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 21:21:07 +01:00
|
|
|
<TableCell
|
|
|
|
|
class="font-medium"
|
2026-03-20 12:00:24 +00:00
|
|
|
>
|
feat: implement Story 2.4 — Dashboard Activity Feed with review fixes
Add role-scoped activity feed to the dashboard showing the 20 most recent
workspace events. Owners/Managers see all activity (declarations, clients,
team changes); Workers see only their assigned declarations. Includes
French descriptions, relative timestamps, responsive layout (desktop
sidebar, tablet inline, mobile collapsible), and 7 passing Pest tests.
Review fixes applied: batch-load declarations/clients/users to eliminate
N+1 queries, consistent soft-delete handling in URL resolution, French
grammar singular/plural fix, missing icon map entry, and corrected tablet
breakpoint per spec.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 21:21:07 +01:00
|
|
|
{{
|
|
|
|
|
declaration.clientName
|
|
|
|
|
}}
|
|
|
|
|
</TableCell>
|
|
|
|
|
<TableCell>
|
|
|
|
|
{{
|
|
|
|
|
declaration.typeLabel
|
|
|
|
|
}}
|
|
|
|
|
</TableCell>
|
|
|
|
|
<TableCell>
|
|
|
|
|
<span
|
|
|
|
|
:class="
|
|
|
|
|
deadlineClass(
|
|
|
|
|
declaration.dueDate,
|
2026-03-22 17:31:23 +01:00
|
|
|
)
|
|
|
|
|
"
|
|
|
|
|
>
|
feat: implement Story 2.4 — Dashboard Activity Feed with review fixes
Add role-scoped activity feed to the dashboard showing the 20 most recent
workspace events. Owners/Managers see all activity (declarations, clients,
team changes); Workers see only their assigned declarations. Includes
French descriptions, relative timestamps, responsive layout (desktop
sidebar, tablet inline, mobile collapsible), and 7 passing Pest tests.
Review fixes applied: batch-load declarations/clients/users to eliminate
N+1 queries, consistent soft-delete handling in URL resolution, French
grammar singular/plural fix, missing icon map entry, and corrected tablet
breakpoint per spec.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 21:21:07 +01:00
|
|
|
{{
|
|
|
|
|
declaration.dueDate ??
|
|
|
|
|
'—'
|
|
|
|
|
}}
|
|
|
|
|
</span>
|
|
|
|
|
</TableCell>
|
|
|
|
|
<TableCell v-if="!isWorker">
|
|
|
|
|
{{
|
|
|
|
|
declaration.assigneeName ??
|
|
|
|
|
'—'
|
|
|
|
|
}}
|
|
|
|
|
</TableCell>
|
|
|
|
|
<TableCell>
|
|
|
|
|
<Badge
|
|
|
|
|
:variant="
|
|
|
|
|
statusBadgeVariant(
|
|
|
|
|
declaration.status,
|
|
|
|
|
)
|
|
|
|
|
"
|
2026-03-22 17:31:23 +01:00
|
|
|
>
|
feat: implement Story 2.4 — Dashboard Activity Feed with review fixes
Add role-scoped activity feed to the dashboard showing the 20 most recent
workspace events. Owners/Managers see all activity (declarations, clients,
team changes); Workers see only their assigned declarations. Includes
French descriptions, relative timestamps, responsive layout (desktop
sidebar, tablet inline, mobile collapsible), and 7 passing Pest tests.
Review fixes applied: batch-load declarations/clients/users to eliminate
N+1 queries, consistent soft-delete handling in URL resolution, French
grammar singular/plural fix, missing icon map entry, and corrected tablet
breakpoint per spec.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 21:21:07 +01:00
|
|
|
{{
|
|
|
|
|
declaration.statusLabel
|
|
|
|
|
}}
|
|
|
|
|
</Badge>
|
|
|
|
|
</TableCell>
|
|
|
|
|
<TableCell>
|
|
|
|
|
<DropdownMenu>
|
|
|
|
|
<DropdownMenuTrigger
|
|
|
|
|
as-child
|
|
|
|
|
@click.stop
|
|
|
|
|
>
|
|
|
|
|
<Button
|
|
|
|
|
variant="ghost"
|
|
|
|
|
size="icon"
|
|
|
|
|
class="h-8 w-8"
|
|
|
|
|
>
|
|
|
|
|
<EllipsisVertical
|
|
|
|
|
class="h-4 w-4"
|
|
|
|
|
/>
|
|
|
|
|
</Button>
|
|
|
|
|
</DropdownMenuTrigger>
|
|
|
|
|
<DropdownMenuContent
|
|
|
|
|
align="end"
|
|
|
|
|
>
|
|
|
|
|
<DropdownMenuItem
|
|
|
|
|
@click.stop="
|
|
|
|
|
navigateToDeclaration(
|
|
|
|
|
declaration,
|
|
|
|
|
)
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
<Eye
|
|
|
|
|
class="mr-2 h-4 w-4"
|
|
|
|
|
/>
|
|
|
|
|
Voir
|
|
|
|
|
</DropdownMenuItem>
|
|
|
|
|
<DropdownMenuItem
|
|
|
|
|
disabled
|
|
|
|
|
>
|
|
|
|
|
<Send
|
|
|
|
|
class="mr-2 h-4 w-4"
|
|
|
|
|
/>
|
|
|
|
|
Relancer
|
|
|
|
|
</DropdownMenuItem>
|
|
|
|
|
<DropdownMenuItem
|
|
|
|
|
disabled
|
|
|
|
|
>
|
|
|
|
|
<UserRoundCog
|
|
|
|
|
class="mr-2 h-4 w-4"
|
|
|
|
|
/>
|
|
|
|
|
Réassigner
|
|
|
|
|
</DropdownMenuItem>
|
|
|
|
|
</DropdownMenuContent>
|
|
|
|
|
</DropdownMenu>
|
|
|
|
|
</TableCell>
|
|
|
|
|
</TableRow>
|
|
|
|
|
</TableBody>
|
|
|
|
|
</Table>
|
|
|
|
|
</div>
|
|
|
|
|
</Card>
|
|
|
|
|
|
|
|
|
|
<Card v-else>
|
|
|
|
|
<CardContent
|
|
|
|
|
class="flex flex-col items-center justify-center py-12"
|
|
|
|
|
>
|
|
|
|
|
<FolderOpen
|
|
|
|
|
class="mb-3 h-12 w-12 text-muted-foreground"
|
|
|
|
|
/>
|
|
|
|
|
<p class="text-muted-foreground">
|
|
|
|
|
Aucune déclaration urgente pour le
|
|
|
|
|
moment.
|
|
|
|
|
</p>
|
|
|
|
|
</CardContent>
|
|
|
|
|
</Card>
|
2026-03-22 17:31:23 +01:00
|
|
|
</div>
|
2026-03-11 23:33:10 +00:00
|
|
|
|
feat: implement Story 2.4 — Dashboard Activity Feed with review fixes
Add role-scoped activity feed to the dashboard showing the 20 most recent
workspace events. Owners/Managers see all activity (declarations, clients,
team changes); Workers see only their assigned declarations. Includes
French descriptions, relative timestamps, responsive layout (desktop
sidebar, tablet inline, mobile collapsible), and 7 passing Pest tests.
Review fixes applied: batch-load declarations/clients/users to eliminate
N+1 queries, consistent soft-delete handling in URL resolution, French
grammar singular/plural fix, missing icon map entry, and corrected tablet
breakpoint per spec.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 21:21:07 +01:00
|
|
|
<!-- Mobile (<768px): Collapsible activity feed -->
|
|
|
|
|
<div class="md:hidden">
|
|
|
|
|
<Collapsible v-model:open="showFeed">
|
|
|
|
|
<CollapsibleTrigger
|
|
|
|
|
class="flex w-full items-center justify-between rounded-lg border px-4 py-3 text-sm font-medium transition-colors hover:bg-muted/50"
|
|
|
|
|
>
|
|
|
|
|
<span
|
|
|
|
|
>Activité récente ({{
|
|
|
|
|
activities.length
|
|
|
|
|
}})</span
|
|
|
|
|
>
|
|
|
|
|
<ChevronDown
|
|
|
|
|
:class="[
|
|
|
|
|
'h-4 w-4 transition-transform',
|
|
|
|
|
showFeed ? 'rotate-180' : '',
|
|
|
|
|
]"
|
|
|
|
|
/>
|
|
|
|
|
</CollapsibleTrigger>
|
|
|
|
|
<CollapsibleContent>
|
|
|
|
|
<div class="pt-3">
|
|
|
|
|
<ActivityFeed
|
|
|
|
|
:activities="activities"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</CollapsibleContent>
|
|
|
|
|
</Collapsible>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Tablet (768-1023px): Inline activity feed below table -->
|
|
|
|
|
<div class="hidden md:block lg:hidden">
|
|
|
|
|
<ActivityFeed :activities="activities" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Desktop: Activity feed sidebar (1/3) -->
|
|
|
|
|
<div class="hidden lg:col-span-1 lg:block">
|
|
|
|
|
<ActivityFeed :activities="activities" />
|
|
|
|
|
</div>
|
2026-03-22 17:31:23 +01:00
|
|
|
</div>
|
|
|
|
|
</template>
|
2026-03-11 23:33:10 +00:00
|
|
|
</template>
|
|
|
|
|
</div>
|
|
|
|
|
</AppLayout>
|
|
|
|
|
</template>
|