- {/* Thumbnail */}
- {h.photo_url && (
-

- )}
+ {scans.map(h => {
+ const isChecked = selectedScanIds.includes(h.id);
+
+ return (
+
+ {/* REQUIREMENT 1 & 2: Checkbox toggle placed side-by-side with scan card */}
+
+ toggleScanSelection(h.id)}
+ className="w-5 h-5 accent-neon cursor-pointer bg-surface-mid border-on-surface-variant/30 rounded focus:ring-0"
+ />
+
-
-
-
- {h.species_detected}
-
-
- {h.grade}
-
+
+
+
+
+ {/* Thumbnail */}
+ {h.photo_url && (
+

+ )}
+
+
+
+
+ {h.species_detected}
+
+
+ {h.grade}
+
+
+
+
+ {h.scan_display_id}
+
+
+ {h.market_name}
+
+ {h.timestamp && (
+
+ {new Date(h.timestamp).toLocaleString('en-IN', {
+ day: '2-digit', month: 'short', year: 'numeric',
+ hour: '2-digit', minute: '2-digit',
+ })}
+
+ )}
+
+
-
-
- {h.scan_display_id}
-
-
- {h.market_name}
+
+
+
+ {h.freshness_index}
- {h.timestamp && (
-
- {new Date(h.timestamp).toLocaleString('en-IN', {
- day: '2-digit', month: 'short', year: 'numeric',
- hour: '2-digit', minute: '2-digit',
- })}
-
- )}
+
-
+
+
+
+ );
+ })}
+
+ )}
-
-
- {h.freshness_index}
-
-
-
-
-
-
- ))}
+ {/* REQUIREMENT 3 & 4: Floating action bar to maintain selection state & conditionally enable action */}
+ {selectedScanIds.length > 0 && (
+
+
+ SELECTED: {selectedScanIds.length}/4_SCANS
+
+
+
)}