# Flow — Submit & Track Approval (Staff Court Monitor)

> Persona: **Ramesh** (MON). Source: `WORKFLOW_GUIDE` Stage E5–E6 + Stage F + `PROJECT_PLAN §4b`. Screens: `MON-CHK-SUBMIT` → `MON-CHK-STATUS`. Sheet: `bottom-sheets/confirm-submit.html`.

---

## Preconditions
- The instance is `IN_PROGRESS` with every item answered, an issue photo on every A item, and ≥1 completion photo (from `fill-checklist-with-photo.md`).

## Steps

1. **Review.** On `MON-CHK-SUBMIT`, Ramesh sees a summary: G-count vs A-count, the completion photo thumbnail(s), and each A item with its issue-photo thumbnail.

2. **Photo gate (blocked vs allowed).**
   - If **any item is untouched** → submit blocked, inline `danger` lists them.
   - If **no completion photo** → blocked ("Add a completion photo to submit").
   - If **an A item lacks its issue photo** → blocked ("Item X needs a photo of the issue"), row highlighted.
   - All gates pass → the **Submit** button (navy-on-orange) is enabled.

3. **Confirm.** Ramesh taps **Submit** → the **confirm-submit sheet** (`confirm-submit.html`) asks to confirm. He confirms.
   → `POST /checklist-instances/:id/submit` (`If-Match: <version>`).

4. **Server transition.** The server **re-checks the gate** (returns 422 if anything is missing — the UI can't bypass it). On pass: state → `SUBMITTED`, `submittedAt` set, three `ApprovalStep` rows (TL, SM, OH) created, and **Priya (TL) is notified** (FCM + in-app). The TL's verify queue gains this instance.

5. **Track status.** The app routes to `MON-CHK-STATUS`. Ramesh sees the **ApprovalTimeline**:
   `Filled by Ramesh (Monitor) ✓ → TL (pending) → Store Manager → Operation Head (Done)`.
   He sees the **real sub-state** of his instance — "Submitted · awaiting TL" — not "Pending" (Pending is what TL/SM/OH see at their level, derived, L8).

6. **As the cascade moves** (`WORKFLOW_GUIDE` Stage F):
   - Priya **Approves** → timeline node `TL Approved ✓`; passes to Store Manager.
   - Rohit (SM) **Approves** → `Store Manager Approved ✓`; passes to Operation Head.
   - Anjali (OH) **Approves** → `Operation Head Approved (Done)`. The instance is fully done.
   - Until OH approves, OH/SM see it as **Pending**; Ramesh always sees the true step.

## Send-back branch (§9 #3)
- If **any** approver (TL/SM/OH) **sends it back** with a reason, the instance → `SENT_BACK` and returns to **Ramesh** (the original filler), not the previous approver.
- `MON-CHK-STATUS` shows a prominent **red banner** with the reject reason + a **"Re-fill"** CTA → reopens `MON-CHK-FILL` (state `IN_PROGRESS`). Ramesh fixes and re-submits; the cascade restarts from TL.

## Result
- A submitted checklist that climbs TL → SM → OH to **Done**, with Ramesh able to see exactly where it is at every moment — or a sent-back instance he can re-fill.
