From 10fa676f1ece712cabf2f186dcdaec4b40fa497c Mon Sep 17 00:00:00 2001 From: Bastien Chanot Date: Mon, 18 May 2026 21:28:53 +0200 Subject: [PATCH] feat(observation): ObservationList with add + per-card actions --- .../observation/ObservationList.tsx | 56 ++++++++++++++++++- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/src/components/observation/ObservationList.tsx b/src/components/observation/ObservationList.tsx index a28a1453..49ce3c4b 100644 --- a/src/components/observation/ObservationList.tsx +++ b/src/components/observation/ObservationList.tsx @@ -1,3 +1,55 @@ -export default function ObservationList() { - return
ObservationList placeholder
+import type { Observation } from '@/domain/schema/observation' +import ObservationCard from './ObservationCard' +import Button from '@/components/ui/Button' + +export interface ObservationListProps { + observations: Observation[] + activeIndex: number + onSelect: (i: number) => void + onAdd: () => void + onDelete: (i: number) => void + onMoveUp: (i: number) => void + onMoveDown: (i: number) => void +} + +export default function ObservationList({ + observations, + activeIndex, + onSelect, + onAdd, + onDelete, + onMoveUp, + onMoveDown, +}: ObservationListProps) { + return ( +
+
+

Observations

+ +
+ {observations.length === 0 ? ( +

+ Aucune observation. Cliquez sur "+ Nouvelle observation" puis sur les zones du schéma. +

+ ) : ( + + )} +
+ ) }