> For the complete documentation index, see [llms.txt](https://docs.snapfix.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snapfix.com/how-the-apps-work/screens/compliance/dashboard.md).

# Dashboard

{% hint style="info" %}
Draft, written by an agent and not yet checked by a person ([how to read these docs](https://docs.snapfix.com/how-to-read.md)). Platforms: web. [Source on GitHub](https://github.com/snapfix/docs/blob/main/spec/screens/compliance/dashboard.md).
{% endhint %}

The site's compliance at a glance: the systems by status and by type, the compliance tasks that are overdue or due, and the documents that have expired or expire soon, with a "Download" button for the compliance report.

![Dashboard](https://3653879137-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsVVGa79QbcEkJ7n8srxe%2Fuploads%2Fgit-blob-12846840e3b0e355fde6c5a8cb62b10942de548b%2Fdashboard.png?alt=media)

* **Where:** web `/comply`, "Dashboard" tab (side menu "Comply"). The `tab` query parameter picks a tab (`/comply?tab=timeline`); without it the page opens the tab last used on that site, or this one. Unknown `/comply/...` addresses redirect to `/comply/comply`, which is not a page.
* **Who:** site admins (role "Admin"). See [Getting here](#getting-here).
* **Feature:** [Comply](https://docs.snapfix.com/product/features/compliance/comply.md)

## Getting here

* **Side menu.** "Comply" opens `/comply`. The item is hidden unless the role on the current site is "Admin".
* **Route guards.** `/comply` has `authAdminGuard` (site admin or group admin) and `authComplyGuard` (site admin) (web\_app\_v2 @ 0989b8e685, `src/app/app.routes.ts:186`). The second decides, so a group admin who is not a site admin goes to `/fix`. The guards cover the whole `/comply` branch, including [System detail](https://docs.snapfix.com/how-the-apps-work/screens/compliance/system-detail.md) and [Contractor detail](https://docs.snapfix.com/how-the-apps-work/screens/compliance/contractor-detail.md).
* **Switching site.** Switching to a site where the role is not "Admin" goes to `/fix`. On a detail page, switching to another admin site goes to `/comply`.
* **API.** The four overview endpoints need the site's admin role, so other members get `403` "Access denied" ([overviews](https://docs.snapfix.com/engineering-reference/api/compliance.md#get-v1appcomplyoverviewsystem-typeparentuuid)).

## Layout

The page header reads "Comply" on the tab pages; System detail and Contractor detail show a breadcrumb instead.

1. **Tab bar:** "Dashboard", "Timeline", "Systems", "Contractors" and "Folders". The Systems and Contractors tabs add their count in brackets, for example "Systems (27)", only while that tab is open. With a multi-site selected, a site dropdown sits at the right end of the bar.
2. **Title row:** "Dashboard", with "Download" on the right.
3. **Top row, two cards:**
   * "Compliance System Overview" (a third of the width): a donut chart and three numbered rows, "Out of compliance", "Expiring compliance" and "In compliance". Each row shows its count and its share of all systems, to one decimal place. A system is out of compliance once its expiry date has passed, expiring within its alert days before that, and in compliance otherwise, also when it has no expiry date ([overview](https://docs.snapfix.com/engineering-reference/api/compliance.md#get-v1appcomplyoverviewsystemparentuuid)). The labels are written in the code, not the string files.
   * "Compliance Systems" (two thirds): one panel per system type, in the saved order, all open when the page loads. A panel shows the type's name and a status icon: red when any system is out of compliance, green when all are in compliance, amber otherwise. Each system row shows its name, a status dot and an arrow. A type with no systems shows only its name. With no types the card says "No data available".
4. **Middle row:** "Compliance Tasks" with three boxes, "Overdue", "Due Today" and "Due Soon", and "Priority" with "High Priority" and "Medium Priority". Each box shows a count; the priority boxes also show a star with the level, 1 for high and 2 for medium.
5. **Bottom row:** "Expired & Expiring Documents" with two boxes, "Expired" and "Expiring", each with a count.

A box with a count of zero opens nothing.

## Inputs

None. The page only reads; its one control is "Download".

## Actions

| Action                        | Who         | What happens                                                                                                                                                                                                                                                               | API                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ----------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Open the tab                  | Site admins | Loads the four overviews at once and waits for all four before it shows any card. If the system type list comes back empty, creates the default types and systems, then loads again                                                                                        | [system types](https://docs.snapfix.com/engineering-reference/api/compliance.md#get-v1appcomplyoverviewsystem-typeparentuuid), [systems](https://docs.snapfix.com/engineering-reference/api/compliance.md#get-v1appcomplyoverviewsystemparentuuid), [tasks](https://docs.snapfix.com/engineering-reference/api/compliance.md#get-v1appcomplyoverviewjobparentuuid), [documents](https://docs.snapfix.com/engineering-reference/api/compliance.md#get-v1appcomplyoverviewdocumentparentuuid); [defaults](https://docs.snapfix.com/engineering-reference/api/compliance.md#post-v1appparentscomply-defaults) |
| "Download"                    | Site admins | Asks for the site's compliance report, then downloads the file it names, or opens its link when the download fails. The button shows a loading state, then a success state for 1.5 seconds. A failed request shows the shared error alert and the button returns to normal | [`GET /v1/app/report/comply`](https://docs.snapfix.com/engineering-reference/api/reports.md#get-v1appreportcomply)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| Open or close a type panel    | Site admins | Shows or hides the type's systems. No request                                                                                                                                                                                                                              | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Click a system                | Site admins | Opens [System detail](https://docs.snapfix.com/how-the-apps-work/screens/compliance/system-detail.md) with the type's name and ID in the address (`?type=…&id=…`)                                                                                                          | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Click a task box              | Site admins | When its count is above zero, opens the [task list](#task-list)                                                                                                                                                                                                            | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Click "Expired" or "Expiring" | Site admins | When its count is above zero, opens the [document list](#document-list)                                                                                                                                                                                                    | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |

The tab bar's page also loads the [frequency list](https://docs.snapfix.com/engineering-reference/api/compliance.md#get-v1appfrequencies). When the site has no system types and the defaults call answers success without creating any, the page asks again after each empty answer, for as long as it is open.

The task boxes count every matching task linked to a system of the site. "High Priority" and "Medium Priority" also count finished tasks, unlike the other three. Tasks of deleted systems and of systems under a deleted type still count. A document counts as expiring when it expires within the next 30 days, a fixed window \[[ASK-110](https://github.com/snapfix/docs/blob/main/ASK.md#ask-110-should-expiring-documents-use-a-fixed-30-day-window)].

## States

* **Loading:** grey placeholder blocks in the three rows until all four overviews arrive.
* **Loaded:** seen once on the QA site on 2026-11-13: the donut and the three status rows, every type panel open with a status dot on each system row, and counts in the task and document boxes.
* **Empty:** a site with no system types gets the default set on the first open, so the systems card is rarely empty. With no types at all, the systems card says "No data available" and every count is 0.
* **Error:** the four overviews load as one batch, so when one fails, every card stays empty although the other three answered: zeros, "No data available" in the systems card and no chart. The shared alert says "Internal server error" with one button, "OK"; closing it leaves the cards empty, with no retry. On the QA site on 2026-11-13 the task overview took 90 seconds or more and then failed in two checks, once with `504`, and took 58 seconds and finished in a third, while the other three overviews took 1.2 to 1.7 seconds.
* **No permission:** a non-admin never reaches the page ([Getting here](#getting-here)). If the API refuses a call, the shared alert shows "Access denied".
* **Offline (mobile):** not applicable (web only).

## Dialogs and sheets

### Task list

Opened from a task box. The title is the box's label and "Compliance Tasks", in title case, for example "Overdue Compliance Tasks" or "High Priority Compliance Tasks". The header has only a close button. The body lists one task card per task. A click on a card closes the dialog and opens the task at `/group/{group}/task/{task}` ([Task detail](https://docs.snapfix.com/how-the-apps-work/screens/tasks/task-detail.md)).

### Document list

Opened from "Expired" or "Expiring". The title is "Expired Documents" or "Expiring Documents". The body lists one card per document, with its file name and its expiry date (DD/MM/YYYY) or "No Expiry Date". A click on a card closes the dialog and opens the document's contractor ([Contractor detail](https://docs.snapfix.com/how-the-apps-work/screens/compliance/contractor-detail.md)) or, for a system document, its system with the type in the address ([System detail](https://docs.snapfix.com/how-the-apps-work/screens/compliance/system-detail.md)). A document with neither closes the dialog and goes nowhere. Documents of deleted contractors and systems are not listed.

## Platform differences

Web only. The apps show a notice instead ([Comply](https://docs.snapfix.com/how-the-apps-work/screens/compliance/mobile-notice.md)).


---

# 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.snapfix.com/how-the-apps-work/screens/compliance/dashboard.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.
