Offline reasons
Purpose
Offline reasons let an operator pick a reason when they go offline. The selected reason is stored for each offline period and can later be reviewed in the operator statistics, which is useful for reporting and for supervisors who want to understand why operators went offline.
How it's used
When at least one offline reason is configured, the online/offline status control in the operator's dashboard becomes a dropdown. The operator can:
- Go online (switches the status back, no reason is stored).
- Select one of the configured reasons and go offline.
The currently applied reason is shown next to the status icon while the operator is offline.
If no offline reasons are configured, the status control behaves as a simple online/offline toggle without asking for a reason.
The selected reason is:
- Stored on the operator's current user record (
lh_users.offline_reason_id). - Persisted on the matching online session record (
lh_users_online_session.offline_reason_id), so each offline period keeps its own reason. - Cleared automatically when the operator goes back online.
- Shown in the
Online hoursstatistics (Statistic -> Online hours) in theOffline reasoncolumn of every offline session.
Configuring offline reasons
Offline reasons are managed through the generic entity list:
System configuration -> Users section -> Offline reasons
From there you can add and edit reasons. Deleting a reason is intentionally not exposed in the UI because offline sessions reference them.
Fields
Each reason has the following fields:
| Field | Type | Description |
|---|---|---|
Name | Text (required) | Display name of the reason, shown in the operator's dropdown and in the statistics. |
Description | Textarea | Longer explanation. Shown as a tooltip when hovering over the reason in the dropdown. |
Icon | Text | Material icon name displayed next to the reason, e.g. flash_off, coffee, lunch_dining. If empty, flash_off is used as the default. |
Position | Number | Controls the order in which reasons are listed. Higher values are shown first (sorted by pos descending, then name ascending). |
Database
Reasons are stored in the lh_abstract_offline_reason table:
| Column | Type | Description |
|---|---|---|
id | int(11) unsigned, PK, auto increment | Reason ID |
name | varchar(250) | Display name |
description | text | Longer description |
icon | varchar(250) | Material icon name |
pos | int(11) unsigned, default 0 | Sorting position |
The reason is linked to the offline session through the offline_reason_id column of lh_users_online_session and to the current user state through lh_users.offline_reason_id.
Permissions
Two permissions are involved:
lhuser,offlinereasons— Allow user to manage offline reasons
Required to configure offline reasons (the Offline reasons link in the configuration is only visible with this permission).
lhuser,changeonlinestatus— Allow user to change their online status
Required for an operator to change their online/offline status, which includes going offline with a selected reason.