What this page shows
Staff Activity is a read-only operational audit page with four independent widgets. It helps an authorized operator investigate failed CRM sign-ins and review changes that other staff members caused in audited admin workflows.
This page is not a complete employee monitoring history. The three activity widgets read change-audit records created by instrumented write operations. Read-only page views, searches, clicks, and any write path that does not create a change-audit record are not represented.
Access
The navigation item and page require StaffActivity:R. The backend applies the same read permission to all four data endpoints and all four CSV export endpoints. Without that permission the page shows a no-permission state and the backend rejects direct requests.
The four widgets
Failed Login Attempts
Shows failed CRM authentication events from the last seven Riga calendar days, including the current Riga day.
Columns:
- Occurred At (UTC): timestamp of the failed attempt, displayed in UTC
- Account Identifier: normalized account value recorded by the failed-login logger
- IP Address: source IP recorded with the event
- Reason: safe failure description, not a password or credential
The default order is newest event first. Search performs a case-insensitive contains match across Reason, IP Address, and Account Identifier.
Daily Staff Activity
Groups audited changes by staff member and Riga calendar day for the same last seven Riga days.
Columns:
- Riga Date
- Staff
- First Activity (UTC)
- Last Activity (UTC)
- Actions Count
- Activity Span
One row represents one staff identity on one Riga day. The default order is the latest Riga Date first.
Staff Activity - Current Month
Groups audited changes by staff member from the start of the current Riga month through the current instant.
Columns:
- Staff
- First Activity (UTC)
- Last Activity (UTC)
- Actions Count
- Active Riga Days
- Activity Span
One row represents one staff identity for the whole current-month window. The default order is highest Actions Count first.
Today's Staff Activities
Shows individual, unaggregated audit records for the current Riga day.
Columns:
- Occurred At (UTC)
- Staff
- Change Type
- Entity Type
- Entity ID
- Description
The default order is newest event first. Empty Entity ID or Description values are shown with the table's blank placeholder.
Time and grouping rules
Calendar boundaries are calculated in Europe/Riga and then converted to UTC for database filtering:
- Failed Login Attempts: seven complete Riga date buckets ending after today
- Daily Staff Activity: the same seven Riga date buckets
- Current Month: Riga month start through the current instant
- Today's Staff Activities: Riga day start through the next Riga day start
The lower boundary is inclusive and the upper boundary is exclusive. Riga daylight-saving changes are handled when the boundaries are converted to UTC. Timestamp columns are still displayed in UTC, while Riga Date and Active Riga Days use Riga calendar dates.
Filters
Failed Login Attempts has one draft Search field. The other three widgets have independent draft fields:
- Search
- Change Type
- Entity Type
For activity widgets, Search is a case-insensitive contains match across Staff, Change Type, Entity Type, Entity ID, and Description. Change Type and Entity Type are exact stored-value filters.
Editing a draft field does not reload data. Apply activates that widget's draft filters and returns it to page one. Reset clears that widget's drafts and active filters, then returns it to page one. Filters, pagination, sorting, loading, errors, and export state are isolated per widget.
Staff identity
Staff is resolved from the current staff record in this order:
- first and last name
- username
- Admin plus the staff id
If the referenced staff record no longer exists, the value is Former/Unknown Staff plus the staff id. Because the audit query joins the current staff record, a later profile rename can change the name displayed for older audit rows; the historical staff id remains the grouping key.
Calculated values
- Actions Count is the number of change-audit records in the row's group.
- Activity Span is the whole number of minutes between the first and last record in the group, never below zero. A single-record group shows 0 min.
- Active Riga Days is the number of distinct Riga calendar dates on which the staff member has at least one matching audited change in the current-month window.
Sorting and pagination
Selecting a different sortable column starts with descending order. Selecting the same column toggles between descending and ascending. Every sort change returns that widget to page one.
All Failed Login, Daily, and Current Month columns are sortable. In Today's Staff Activities, Entity ID and Description are not sortable.
The mounted page initially requests 200 rows per widget. The shared table offers 5, 10, 25, 50, 100, 500, 1,000, 5,000, and 10,000 as visible page-size choices, but the backend caps every page at 200 rows. Selecting a value above 200 can therefore make the browser's displayed page size and range disagree with the rows and offset returned by the backend. Use 200 or less for reliable pagination.
Refresh, retry, and export
Refresh re-runs only that widget with its currently active filters; it does not apply unsaved draft text. After an error, Retry performs the same widget-local revalidation.
Each Export CSV action sends that widget's active filters and sort and removes pagination from the backend query. It does not export unapplied draft values. Exports can therefore be much larger than one page and currently have no separate row cap. Avoid broad exports when the audit history is large.
Browser download names are:
- staff-activity-failed-logins.csv
- staff-activity-daily.csv
- staff-activity-current-month.csv
- staff-activity-today.csv
Only the export button for the running widget is disabled. Export requires the active admin access token. A failed export shows an error message and does not change audit data.
Empty, loading, and error states
Each widget loads independently. A widget can show loading rows, an error with Retry, or No results found while the other widgets remain usable. No-result state means that no source records matched that widget's fixed time window and active filters.
Known caveats
- Staff Activity covers recorded failed CRM authentication and instrumented change-audit writes, not every staff interaction.
- Historical rows display the currently resolved staff name when the staff record still exists.
- Failed login Account Identifier may be absent when the authentication path could not safely record one.
- Search is a broad contains match, while Change Type and Entity Type require exact stored values.
- The shared page-size selector exposes values above the backend's 200-row cap.
- CSV export bypasses pagination and has no explicit export row limit.
- Refresh does not apply text still waiting in draft filters; use Apply first.
- All endpoints are GET and do not mutate users, permissions, audit rows, or authentication records.