> For the complete documentation index, see [llms.txt](https://docs.digit.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digit.org/health/v2.1/design/architecture/field-app-architecture/ui-packages/attendance-management-package/signature-capture-and-compare-on-mark-attendance.md).

# Signature capture & compare on Mark Attendance

#### What's new for users

* **Signature capture & compare on Mark Attendance.** Field workers can now capture an individual's signature when marking attendance, and the screen also offers a **compare** view that places the existing signature on file side-by-side with the current capture for visual verification.
  * **Signature capture** widget renders inline on the attendance row (`MARK_ATTENDANCE_CAPTURE_SIGNATURE_LABEL`) with Clear / Confirm actions.
  * **Existing-signature lookup** reads the most recent signature for the individual from the attendance log so the worker has a reference to compare against.
  * **Compare signature dialog** shows the existing signature (reference), the new capture, and labels for present / absent / reference signatures so the worker can confirm a legitimate match before submitting.
  * **Per-individual storage** — signatures are stored as part of the attendance log against the `individualId`, grouped under a `signatureCollection` so they round-trip cleanly through draft / submit.
  * **Signature-required validation** — a register can be configured to require a signature before Submit is allowed (`MARK_ATTENDANCE_SIGNATURE_REQUIRED_LABEL`); the bloc enforces this via the present/absent submit check.
* **One consolidated attendance flow.** All attendance journeys (mark, draft, submit, view registers) are merged into a single config — easier to localize, easier to extend per-campaign, and consistent across the app.
* **Cleaner mark-attendance interaction.** Single-tap marks Present, double-tap marks Absent, and the present/absent toggle behaves correctly after marking absent (previously a sticky-state bug). A new "any selected" check gates Submit so a worker can't accidentally submit an empty register.
* **Better empty / edge states.** A "no result" card shows up cleanly when there are no registers; attendance registers render even when the individual ID is missing; face events show up in the attendance module as expected.
* **Session type captured.** Attendance logs now carry session type in additional details, enabling per-session reporting downstream.
* **QR generation hardened** — null-safety improvements so QR generation no longer crashes on partial register data.
* **Warehouse Manager role added** — warehouse managers can now access attendance, supporting the warehouse-level workforce check-in use case.
* **Manage Attendance card on Home is now config-driven** — no longer hardcoded, so it can be reordered, gated by role, or hidden per project from the console.

#### Attendance — Flow Comparison

**What changed :**

* HCM v2.0 had no signature capture step — attendance was a single tap (present) / double tap (absent) → submit.
* HCM v2.0 routed through the package-level `attendance_bloc`; v2.1 the bloc lives in project code so signature capture and per-individual storage can be extended.
* HCM v2.0 attendance log did not carry session type; v2.1 it does.
* HCM v2.0 had no "any selected" gate on Submit; v2.1 enforces it.

### **Mark Attendance Flow (with signature capture & compare) Sequence Diagram**

<figure><img src="https://2077406040-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FI0KFbSBTySIQ7TCOKnJF%2Fuploads%2FOYXsSU1TF8QDLg3U9REv%2Fimage.png?alt=media&amp;token=2b3caf42-f515-467c-b504-dea6146f267d" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.digit.org/health/v2.1/design/architecture/field-app-architecture/ui-packages/attendance-management-package/signature-capture-and-compare-on-mark-attendance.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
