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

> Persona: **Karan** (SCM), Trampoline · Morning, Game Zone Ahmedabad-1. Source: `WORKFLOW_GUIDE` Stage E + `PROJECT_PLAN §4a`. Screens: `SCM-CHK-TODAY` → `SCM-CHK-FILL`. Sheets: `bottom-sheets/photo-capture.html`, `bottom-sheets/a-item-note-photo.html`.
> Identical to the anchor (Staff Court Monitor) fill flow — same gates, same sheets — adapted to the SCM persona.

---

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

## Steps

1. **Open the checklist.** Karan taps **Trampoline Daily** on `SCM-CHK-TODAY`.
   → App `GET /checklist-instances/:id`; opens `SCM-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`; **server time stamps** the response; **initials auto-derived** from Karan's account (§9 #9); note optional.
   - Tap **A (Action required)** → the **A-note+photo sheet** opens (`a-item-note-photo.html`): Karan 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. Karan shoots proof the work is done → `POST /uploads/photos` (`kind=COMPLETION`) → thumbnail appears. (One or more allowed; ≥1 required, §9 #7.)

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

5. **Proceed to review.** Karan taps **Review & Submit** → `SCM-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 = server time + auto-initials** are captured per response (§9 #9) — not user-entered.
- **Offline (L10):** if the network drops mid-fill, the "No connection — retry" state shows; Karan's G/A picks, notes, and staged photos are **held in memory** and re-POST on retry — no tap is lost.
- **Scope:** Karan can only open instances assigned to him in his Game Zone; any other id → 403. (The Team view is a separate read-only path — see `spec.md` `SCM-TEAM-STATUS`.)

## 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.
