From b7186528c5c79ebd3a83b66586c3851c75b929ec Mon Sep 17 00:00:00 2001 From: blaisadmin Date: Thu, 21 May 2026 21:23:49 -0400 Subject: [PATCH] Updated bird profile view --- frontend/src/App.tsx | 79 ++++++++++++++++++++++++++++++++++++++++-- frontend/src/index.css | 18 ++++++++++ 2 files changed, 95 insertions(+), 2 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 34eef0e..d29a6a9 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1698,6 +1698,12 @@ function App() { ); const vetVisitDueBirdIds = useMemo(() => new Set(vetVisitDueBirds.map((bird) => bird.id)), [vetVisitDueBirds]); + const selectedBirdWeightRangeAlert = selectedBird + ? outOfRangeBirds.find((alert) => alert.bird.id === selectedBird.id) ?? null + : null; + const selectedBirdWeightDropAlerts = selectedBird ? weightDropAlerts.filter((alert) => alert.bird.id === selectedBird.id) : []; + const selectedBirdVetVisitAlertSignature = selectedBird ? getVetVisitAlertSignature(selectedBird.id) : ''; + const selectedBirdHasVetVisitAlert = selectedBird ? vetVisitDueBirdIds.has(selectedBird.id) : false; const activeMedications = useMemo( () => medications.filter((medication) => !medication.endDate || parseDateValue(medication.endDate) >= parseDateValue(new Date().toISOString().slice(0, 10))), @@ -2336,6 +2342,18 @@ function App() { setPhotoDrag(null); }, [editingBird, editingBirdId]); + useEffect(() => { + if (activePage === 'flock' || !birdEditorOpen) { + return; + } + + setBirdEditorOpen(false); + setEditingBirdId(''); + setBirdPhotoName(''); + setPhotoCrop(null); + setPhotoDrag(null); + }, [activePage, birdEditorOpen]); + useEffect(() => { setBulkWeightRows((current) => { const nextEntries = birds.map((bird) => [bird.id, current[bird.id] ?? { weightGrams: '' }] as const); @@ -3969,7 +3987,9 @@ function App() { return (
- FlockPal + + FlockPal + {publicProfileLoading || authLoading ? (

Loading bird profile...

) : publicProfileError || !publicProfile ? ( @@ -4972,6 +4992,10 @@ function App() { onChange={(event) => setBirdForm({ ...birdForm, chartColor: event.target.value })} /> +
+ +

This color will follow this bird across the overview graph and its individual weight trend.

+