# Flow — Fill Checklist with Photo Evidence (Staff Court Monitor)

> Persona: **Ramesh** (MON), Trampoline · Morning, Game Zone Ahmedabad-1. Source: `WORKFLOW_GUIDE` Stage E + `PROJECT_PLAN §4a`. Screens: `MON-CHK-TODAY` → `MON-CHK-FILL`. Sheets: `bottom-sheets/photo-capture.html`, `bottom-sheets/a-item-note-photo.html`.

---

## Preconditions
- Ramesh is logged in (`/me` resolved role = MON); the roster for today is **Published**, so auto-assign has created his **Trampoline Daily** instance (state `NOT_STARTED`). It is visible on `MON-CHK-TODAY`.

## Steps

1. **Open the checklist.** Ramesh taps **Trampoline Daily** on `MON-CHK-TODAY`.
   → App `GET /checklist-instances/:id`; opens `MON-CHK-FILL`. First interaction will move state to `IN_PROGRESS`.

2. **Answer item by item (G/A).** For each `ChecklistItem` (e.g. "Check trampoline beds for tears"):
   - Tap **G (Good)** → row gets a green left rail; `value=G`; **time auto-stamps** (editable); initials captured; note optional.
   - Tap **A (Action required)** → the **A-note+photo sheet** opens (`a-item-note-photo.html`): Ramesh types what's wrong and taps the camera tile → the **photo-capture sheet** (`photo-capture.html`) offers **Camera / Gallery**. He shoots the issue. The row now has a red-orange left rail + the attached issue photo. The item is **flagged photo-satisfied**.
   - Each answer saves via `PATCH …/responses` (`If-Match: <version>`), keeping the draft (`IN_PROGRESS`).

3. **Attach the completion photo.** At the bottom, the **completion-photo** tile (`PhotoUpload`, ≥96px) opens the photo-capture sheet. Ramesh shoots proof the work is done → `POST /uploads/photos` (`kind=COMPLETION`) → thumbnail appears. (One or more allowed; ≥1 required.)

4. **Photo storage.** Every photo is a multipart upload → **local disk on the VPS** → a `Photo` row with uploader (Ramesh), timestamp, device, and kind (`COMPLETION` or `NEGATIVE`+itemId). These are visible up the chain and in the negative report (§4a).

5. **Proceed to review.** Ramesh taps **Review & Submit** → `MON-CHK-SUBMIT` (see `submit-and-track-approval.md`).

## Rules enforced in this flow
- **An A item cannot be left without its issue photo** — the item stays photo-required and will block submit.
- **Time-stamp + initials** are captured per response (§6).
- **Offline (L10):** if the network drops mid-fill, the "No connection — retry" state shows; Ramesh's G/A picks, notes, and staged photos are **held in memory** and re-POST on retry — no tap is lost.
- **Scope:** Ramesh can only open instances assigned to him in his Game Zone; any other id → 403.

## Result
- The instance is `IN_PROGRESS` with: a response per item, a note + issue photo on every A item, and ≥1 completion photo — ready to submit.
