stalls
Daily map work: operate and intake
TL;DR
On Property Map, drag a horse onto a stall. Search to spotlight someone, tap a tile for the unit drawer, and use Intake when you are placing new or returning horses. Undo appears for a few seconds after a move.
- map
- operate
- intake
- search
- drawer
- unassigned
- swap
For: Staff. Route: /app/stalls?view=map&property=<id>
Modes: Operate (default), Intake, and Arrange (see Arrange stalls).
How to place a horse
- Open Stalls → Map and confirm the property.
- Stay in Operate (if the button says Done arranging, click it first).
- Drag a horse chip from the Unassigned tray (left) or from another stall onto a unit tile.
- If the stall is full (
capacity1), choose Swap horses or Unassign [name], then place. Multi-horse units that are full block the drop — pick another unit. - After a successful move, Undo appears for about 10 seconds if you dropped on the wrong stall.
- Click a tile (do not drag) to open the unit drawer: horses, owner links, open care, assign/unassign, edit unit, add a horse here.
Example
A returning horse, Maple, sits in Unassigned. In Operate, you search “Maple”, the matching tray chip stays bright, and you drag her onto stall 12. The tile flashes a brief land animation. You meant stall 14 — tap Undo before it expires. For a new arrival with no stall yet, turn on Intake: empty stalls stay bright, occupied ones dim, then click an empty stall and pick the horse in the drawer.
What you can do in Operate
- Drag horses between stalls or from the unassigned tray.
- Search “Find horse or unit…” — matches unit name, type, horse name, and owner name. Non-matches dim; the map scrolls to the first match.
- Unit filter (left panel): All / Stalls / Pastures.
- Morning strip chips filter the same spotlight (empty, unassigned, care, health, units that need attention). See Morning strip & heat.
- Zoom + / − scales the cell grid (does not change saved positions).
- Horse photos appear as chips when a profile photo exists; otherwise the name initial.
Status colors on tiles: empty (amber), occupied/partial (amber fill), full (barn green), inactive (muted).
▶Show details for AI/advancedexhaustive reference & AI context
Property Map: Operate and Intake — Barnflow
For: Staff. Route: /app/stalls?view=map&property=<id>
Modes: Operate (default), Intake, and Arrange (see Arrange stalls).
How to place a horse
- Open Stalls → Map and confirm the property.
- Stay in Operate (if the button says Done arranging, click it first).
- Drag a horse chip from the Unassigned tray (left) or from another stall onto a unit tile.
- If the stall is full (
capacity1), choose Swap horses or Unassign [name], then place. Multi-horse units that are full block the drop — pick another unit. - After a successful move, Undo appears for about 10 seconds if you dropped on the wrong stall.
- Click a tile (do not drag) to open the unit drawer: horses, owner links, open care, assign/unassign, edit unit, add a horse here.
Example
A returning horse, Maple, sits in Unassigned. In Operate, you search “Maple”, the matching tray chip stays bright, and you drag her onto stall 12. The tile flashes a brief land animation. You meant stall 14 — tap Undo before it expires. For a new arrival with no stall yet, turn on Intake: empty stalls stay bright, occupied ones dim, then click an empty stall and pick the horse in the drawer.
What you can do in Operate
- Drag horses between stalls or from the unassigned tray.
- Search “Find horse or unit…” — matches unit name, type, horse name, and owner name. Non-matches dim; the map scrolls to the first match.
- Unit filter (left panel): All / Stalls / Pastures.
- Morning strip chips filter the same spotlight (empty, unassigned, care, health, units that need attention). See Morning strip & heat.
- Zoom + / − scales the cell grid (does not change saved positions).
- Horse photos appear as chips when a profile photo exists; otherwise the name initial.
Status colors on tiles: empty (amber), occupied/partial (amber fill), full (barn green), inactive (muted).
Intake mode
Turn on Intake in the toolbar (orange when active):
- Empty, active units stay usable; occupied units dim.
- Click an empty stall to assign from the unassigned list in the drawer, or drag from the tray.
- Occupied drops are discouraged visually; capacity rules still apply.
- Click Intake again to return to Operate.
Use Intake for arrival days, show-return weekends, or any time the tray count is high. The unassigned badge pulses when horses are waiting.
Unassigned tray
Horses with horses.unit_id null appear in the left Unassigned panel. The count badge is orange when any are waiting. Search filters the tray independently of unit tiles. Morning filter unassigned dims all stalls so the tray is the focus.
Unit drawer
Click a unit tile:
- Occupancy (
count/capacity) and empty / partial / full / inactive. - Alert stickers when care or health is due on that unit.
- Each horse: photo, name →
/app/horses/[id], owner →/app/clients/[id]when linked, Unassign. - Assign unassigned horse dropdown when the unit has room.
- Open care lines for horses on the unit.
- Edit unit and Add horse here (
/app/horses/new?property=&unit=).
Capacity, swap, and blocked drops
canAddHorseToUnit runs on drag-over and drop (not only after save):
| Situation | Result |
|---|---|
| Inactive unit | Blocked: “Cannot place on an inactive unit.” Tile pulses. |
| Horse already on that unit | Blocked. |
| Capacity-1 full | Dialog: Swap or Unassign occupant, then place. |
| Multi-capacity full | Blocked with “X is full (n/cap). Clear a horse or pick another unit.” |
| Same stall drop | Ignored. |
Swap exchanges two horses’ units. Displace unassigns the occupant (unit_id cleared) then assigns the incoming horse.
Undo
After a successful assign/move, a toast stores the reverse in sessionStorage (stablesync-map-undo) for 10 seconds. Undo moves the horse back, or clears the stall if they came from the unassigned tray. Refreshing the page can still undo if the timer has not expired.
Search and spotlight
Query is case-insensitive substring over unit name, unit type, horse names, and owner names. Combined with the morning strip: if both are set, only units in the intersection stay bright. Realtime: a live pulse (“Live update…”) appears when another tab changes horses in this org, then the map refreshes.
Roles, RLS, audit (AI)
- Staff
organization_membersmay assign/move/clear via stall server actions (assignHorseToStallAction,moveHorseToStallAction,swapHorsesAction,clearStallAction). - Portal owners never mutate
horses.unit_idfrom this UI. - Each mutation writes
audit_events. Offline clients sendclient_mutation_id(last-write-wins). - Scope answers by organization + property. Map URL includes
property=so the selected barn survives reload.
Related
- Stalls list and Property Map
- Arrange stalls on the map
- Morning strip, stickers, and heat
- Map questions, answered
AI retrieval keywords: operate, intake, unassigned tray, unit drawer, swap, displace, undo, search, spotlight, drag and drop, capacity, canAddHorseToUnit, /app/stalls?view=map
Barn staff: Open a support ticket
Horse owners: Message your barn