> 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/housekeeping/schedule.md).

# Staff schedule

{% 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/housekeeping/schedule.md).
{% endhint %}

Housekeeping managers put today's staff on the Schedule tab, each with a role and working hours; until someone is on the schedule, the page shows "Start Your Day" with "Add Staff".

![Staff schedule](https://3653879137-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsVVGa79QbcEkJ7n8srxe%2Fuploads%2Fgit-blob-562cea02e2332e100d7499bab71e9ed88dbd43fb%2Fschedule.png?alt=media)

* **Where:** web `/housekeeping`, "Schedule" tab. The side menu item "Housekeeping" sits under "Modules". The housekeeping page has three tabs, "Schedule", "Timeline" and "Dashboard", and opens on the tab last used on this site; a site with no saved tab opens on the [Dashboard](https://docs.snapfix.com/how-the-apps-work/screens/housekeeping/dashboard.md).
* **Who:** site admins (role "Admin") on a site with housekeeping on, while no multi-site is selected. The side menu hides the item from everyone else, and the route guard sends them to `/fix`. Switching to a site where these conditions fail also sends the user to `/fix`.
* **Feature:** [Staff schedule](https://docs.snapfix.com/product/features/housekeeping/staff-schedule.md)

Saving the schedule changes the working hours that the [Task timeline](https://docs.snapfix.com/how-the-apps-work/screens/housekeeping/timeline.md) and the apps read. The tasks are on the [Task timeline](https://docs.snapfix.com/how-the-apps-work/screens/housekeeping/timeline.md) and the day's totals on the [Dashboard](https://docs.snapfix.com/how-the-apps-work/screens/housekeeping/dashboard.md).

## Layout

1. **Header.** "Today's Schedule" and the board's buttons, the same on all three tabs; see [Task timeline](https://docs.snapfix.com/how-the-apps-work/screens/housekeeping/timeline.md#header-and-bulk-actions-web). On this tab "Reset All", "Bulk Actions" and "Auto Assign Tasks" do nothing; "+" ([Create Tasks](https://docs.snapfix.com/how-the-apps-work/screens/housekeeping/timeline.md#create-tasks)), the expand icon and the print icon work.
2. **Bar.** A "Search" box, an info icon with the legend of task colours and clean types, and the tabs.
3. **Left column.** "Staff Schedule" over the names and "Role" over the role column. One row for each person on today's schedule, in role order ("Both", "Self Checker", "Inspector", "Housekeeper", "House Person", "HK Maintenance") and by name within a role, with no role headings. People added since the last save come last.
4. **Each row.** The avatar and name, or for a new row a "Name" field. A red count of the person's tasks today that fall outside their working hours. The role button, which reads "Select" until a role is set. A gear icon (tooltip "Settings") that opens [Staff work settings](#staff-work-settings), and a trash icon with the tooltip "Delete from On Duty".
5. **Right panel.** A ruler of the whole day, labelled "04.00", "05.00" and so on, and each person's working ranges as bars with a start handle and an end handle. The handles show their times on hover.
6. **"Add Staff"** at the bottom of the left column.
7. **Action bar.** "Cancel" and "Save". Both are off until something changes.
8. **Task list.** The unassigned task list of the [Task timeline](https://docs.snapfix.com/how-the-apps-work/screens/housekeeping/timeline.md#layout) shows below the board on this tab too.

Until someone is on today's schedule, the page shows "Start Your Day", the line "Add your staff to start organizing and assigning today's tasks" and an "Add Staff" button instead of the board. That button opens the board on the tab last used. With no saved tab that is the Dashboard, which has no add control, so the user has to choose the Schedule tab.

## Inputs

| Field         | Type                                | Required                     | Default                                               | Rules and messages                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ------------- | ----------------------------------- | ---------------------------- | ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Search        | Text ("Search")                     | No                           | Empty                                                 | Filters the rows by name or username, 1 second after the last key press (web\_app\_v2 @ 0989b8e685, `src/app/components/search/search.component.ts:59-66`). Switching tabs clears it.                                                                                                                                                                                                                                                                                 |
| Staff member  | Searchable list, placeholder "Name" | Yes, for each row            | Empty for a new row                                   | The site's users who are not deleted, without the people already on the schedule. Picking a person loads their default working hours; when set, they become the row's first range.                                                                                                                                                                                                                                                                                    |
| Role          | Menu                                | Yes, for every range         | The role of the row's first range; none for a new row | "Both", "Self Checker", "Housekeeper" and "Inspector". "House Person" and "HK Maintenance" appear only when the site's clean types use that role, or when the row already has it. Changing the role changes all of the row's ranges. The button shows the label in title case, so "HK Maintenance" reads "Hk Maintenance".                                                                                                                                            |
| Working range | Bar on the ruler                    | Yes, at least one per person | None                                                  | Hovering empty track shows a "+" ("Add Time Range"); the first click sets the start and a second click the end. A range lasts at least 15 minutes and stays 15 minutes away from the person's next range, so ranges never overlap. Edges snap to 15 minutes. Drag a bar or a handle to move it. Hovering an end handle shows "Remove Time Range"; both labels are hard-coded English. The last range cannot be removed. A range that ends at 24:00 is saved as 23:59. |

## Actions

| Action                             | Who   | What happens                                                                                                                                                                                                                   | API                                                                                                                                                          |
| ---------------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Add Staff                          | Admin | Switches to this tab if needed, adds an empty row at the bottom and scrolls to it. Also on the [Task timeline](https://docs.snapfix.com/how-the-apps-work/screens/housekeeping/timeline.md) and in the empty state.            | None                                                                                                                                                         |
| Pick a staff member                | Admin | Fills the row and loads the person's default working hours.                                                                                                                                                                    | [`POST /v1/app/housekeeping/working-hours/list`](https://docs.snapfix.com/engineering-reference/api/housekeeping.md#post-v1apphousekeepingworking-hourslist) |
| Pick a role                        | Admin | Sets the role of every range on the row.                                                                                                                                                                                       | None until Save                                                                                                                                              |
| Add, move or remove a range        | Admin | See Working range under [Inputs](#inputs).                                                                                                                                                                                     | None until Save                                                                                                                                              |
| Gear icon                          | Admin | Opens [Staff work settings](#staff-work-settings) for that person.                                                                                                                                                             | None on open                                                                                                                                                 |
| Trash icon ("Delete from On Duty") | Admin | Removes the row at once, with no confirmation. A new row is dropped; a saved person's ranges are marked deleted and removed on Save.                                                                                           | On Save                                                                                                                                                      |
| Cancel                             | Admin | Restores the saved schedule, which also drops new rows. Leaving the Schedule tab does the same, without asking.                                                                                                                | None                                                                                                                                                         |
| Save                               | Admin | Sends the rows that changed, with the deleted ranges marked. After a successful save the board switches to the [Task timeline](https://docs.snapfix.com/how-the-apps-work/screens/housekeeping/timeline.md) after 1.5 seconds. | [`POST /v1/app/housekeeping/working-hours`](https://docs.snapfix.com/engineering-reference/api/housekeeping.md#post-v1apphousekeepingworking-hours)          |

Opening the housekeeping page loads today's staff with [`POST /v1/app/housekeeping/working-hours/list`](https://docs.snapfix.com/engineering-reference/api/housekeeping.md#post-v1apphousekeepingworking-hourslist). This tab also loads the day's assigned tasks without a loader, for the red counts ([`POST /v1/app/housekeeping/assigned-tasks/list`](https://docs.snapfix.com/engineering-reference/api/housekeeping.md#post-v1apphousekeepingassigned-taskslist)). The server unassigns red tasks that no longer fit a person's new hours, with no warning on this page \[[ASK-93](https://github.com/snapfix/docs/blob/main/ASK.md#ask-93-should-changing-someones-hours-warn-that-tasks-will-be-unassigned)].

## States

* **Loading:** a loading skeleton replaces the page until today's staff list loads.
* **Empty:** "Start Your Day", as under [Layout](#layout).
* **Error:** when today's staff list fails to load, the page shows the same "Start Your Day" state, as if nobody were scheduled, with the shared error alert ("Internal server error" and "OK" when the server sends no message). No retry is offered. A failed save keeps the changes on screen, and the shared alert shows the error.
* **Save disabled:** Save stays off until something changed and every row has a person, a role and at least one range with a start and an end. No text says which row is incomplete.
* **No permission:** as under **Who**.
* **Offline:** the web has no offline mode.

## Dialogs and sheets

### Staff work settings

Opened by the gear icon on a row. It changes people's default working hours and self-check limit. It does not change their role or their ranges on the board.

* **Title:** "Staff Work Settings", with a user icon.
* **Staff:** a menu of the people on the schedule, in role order; the selected person shows with avatar, name and role. Switching people keeps the edits made so far.
* **Maximum Self-Checked Tasks** (only for a "Self Checker"): a number field with the placeholder "0 tasks" and the hint "After this limit is reached, tasks will be assigned to another inspector." The label carries an asterisk, but an empty value is accepted, and the assignment then uses 3. A value must be at least 1. A value of 0 or below keeps Save off and shows "Start time must be before end time." under the time fields, not under this field.
* **Staff Schedule:** "Default Working Hours", with the hint "Set default working hours for staff member." and a switch. With the switch on, "Start Time \*" and "End Time \*" appear: read-only fields that open a 24-hour clock picker in 15-minute steps, with "Cancel" and "Apply". If the start is not before the end, "Start time must be before end time." appears and Save stays off.
* **Buttons:** "Cancel" and "Save". Save is on when something changed and the form is valid.
* **Save** sends only the people who changed to [`POST /v1/app/housekeeping/staff-work-settings`](https://docs.snapfix.com/engineering-reference/api/housekeeping.md#post-v1apphousekeepingstaff-work-settings). With the switch off, no default hours are saved. The ranges on the board do not change; the defaults apply when the person is picked again.

The settings button in the header is commented out, so the housekeeping settings pages cannot be reached (web\_app\_v2 @ 0989b8e685, `src/app/pages/housekeeping/housekeeping.routes.ts:17-27`). The "Remove Staff?" confirmation ("You're about to remove {name} from staff. This action cannot be undone.") is opened only from those pages, so it never shows on this tab.

## Platform differences

Web only. The apps read today's working hours to list staff and to place assigned tasks ([Task timeline](https://docs.snapfix.com/how-the-apps-work/screens/housekeeping/timeline.md)). They cannot change working hours or staff settings, and they have no staff schedule screen \[[ASK-89](https://github.com/snapfix/docs/blob/main/ASK.md#ask-89-which-housekeeping-actions-should-the-mobile-apps-have)].


---

# 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/housekeeping/schedule.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.
