diff --git a/backend/src/db/schema.ts b/backend/src/db/schema.ts index f2200f3..e7bc71c 100644 --- a/backend/src/db/schema.ts +++ b/backend/src/db/schema.ts @@ -342,9 +342,9 @@ export const ensureSchema = async (database: DatabaseClient = db) => { ON pending_bird_transfers (LOWER(destination_owner_email), created_at DESC) WHERE completed_at IS NULL; - CREATE UNIQUE INDEX IF NOT EXISTS idx_pending_bird_transfers_open_bird - ON pending_bird_transfers (bird_id) - WHERE completed_at IS NULL; + CREATE UNIQUE INDEX IF NOT EXISTS idx_pending_bird_transfers_open_bird + ON pending_bird_transfers (bird_id) + WHERE completed_at IS NULL; CREATE TABLE IF NOT EXISTS bird_transfer_codes ( id UUID PRIMARY KEY DEFAULT gen_random_uuid(), @@ -368,9 +368,9 @@ export const ensureSchema = async (database: DatabaseClient = db) => { WHERE completed_at IS NULL AND revoked_at IS NULL; - CREATE TABLE IF NOT EXISTS flock_notes ( - id UUID PRIMARY KEY DEFAULT gen_random_uuid(), - workspace_id INTEGER NOT NULL REFERENCES workspaces(id) ON DELETE CASCADE, + CREATE TABLE IF NOT EXISTS flock_notes ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + workspace_id INTEGER NOT NULL REFERENCES workspaces(id) ON DELETE CASCADE, bird_id UUID REFERENCES birds(id) ON DELETE SET NULL, title VARCHAR(160) NOT NULL, body TEXT NOT NULL, diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index f4b2df4..576400f 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1627,7 +1627,7 @@ function App() { [birds, selectedBirdId], ); const selectedBirdAdoptionTransferCode = selectedBird ? adoptionTransferCodes[selectedBird.id] ?? '' : ''; - const editingBird = useMemo( + const editingBird = useMemo( () => birds.find((bird) => bird.id === editingBirdId) ?? null, [birds, editingBirdId], ); @@ -6073,26 +6073,26 @@ function App() { aria-selected={selectedBirdTab === 'notes'} aria-label="Notes" title="Notes" - > - - - - - setSelectedBirdTab('reports')} - type="button" + > + + + + + setSelectedBirdTab('reports')} + type="button" role="tab" aria-selected={selectedBirdTab === 'reports'} aria-label="Reports" title="Reports" > - - - - + + + setSelectedBirdTab('audit')} type="button" role="tab" @@ -6452,11 +6452,11 @@ function App() { {selectedBirdTab === 'vet' ? ( - - - Veterinary - Clinic account - + + + Veterinary + Clinic account + {!editingVeterinaryInfo ? ( - + - + Vet visits Care history and notes @@ -6695,13 +6695,13 @@ function App() { )} - - - ) : null} + + + ) : null} - {selectedBirdTab === 'reports' ? ( - - + {selectedBirdTab === 'reports' ? ( + + Reports @@ -6731,11 +6731,11 @@ function App() { {adoptionReportError} ) : null} - - - ) : null} + + + ) : null} - {selectedBirdTab === 'audit' ? ( + {selectedBirdTab === 'audit' ? (
Veterinary
Vet visits
Reports