Skip to content

Site Protector Can Edit Worksite Limits ​

INFO

This is an offline action

Context & Background ​

To maintain safety and operational flexibility, the person in charge of a worksite must be able to adjust its defined boundaries. This requirement allows a Site Protector to modify the start and end limits of a worksite, either to correct an initial setup error or to adapt to changing conditions on the ground (e.g., a work gang needing to move beyond their original limits).

These changes must be possible while protection is active and when the device is offline to avoid unnecessary downtime. All modifications must be recorded locally and synchronised with the server when a connection is available.

Architecture Decisions ​

  • [ ] ADR needed: Audit logging strategy for worksite modifications, including offline scenarios.
  • [ ] ADR needed: Offline-first data synchronisation strategy for worksite data.

User Story ​

As a Site Protector

I want to edit the limitStart and limitEnd for a worksite I am controlling

So that I can ensure the defined digital boundaries accurately reflect the physical worksite at all times, even when offline.

Business Rules ​

  1. The controlling Site Protector of a worksite can edit its limits.
  2. Worksite limits can be edited regardless of whether protection is active or if workers are currently locked-on to the site.
  3. The device SHALL function fully offline. Changes to worksite limits SHALL be saved to the local device immediately.
  4. When a network connection becomes available, the local changes SHALL be synchronised with the server automatically.
  5. A complete audit log of all changes SHALL be maintained locally and synchronised with the server, capturing:
    • The user who made the change (Site Protector).
    • The timestamp of the change (using the device's clock).
    • The previous limitStart and limitEnd values.
    • The new limitStart and limitEnd values.
  6. By manual process, the Site Protector is responsible for ensuring no worker is outside the new limits before making the change. The system does not enforce this.

Acceptance Criteria ​

Event-Driven Requirements ​

  • When a Site Protector with control of a worksite modifies the limitStart or limitEnd and saves the changes, the system SHALL immediately update the worksite record on the local device storage.
  • When the local worksite record is updated, the system SHALL create an audit log entry on the local device.
  • When a network connection is established and there are pending changes, the system SHALL synchronise the updated worksite data and audit logs with the server.

State-Driven Requirements ​

  • While protection is active on a worksite, the system SHALL still allow the controlling Site Protector to edit the worksite limits.
  • While the device is offline, the system SHALL allow the controlling Site Protector to edit worksite limits and save them locally.

Dependencies ​

Requires: TBC

Enables: TBC

Linked Specifications ​

  • [ ] To be specified: API endpoint for updating worksite details.
  • [ ] To be specified: UI components for editing worksite limits.
  • [ ] To be specified: Local database schema for worksite and audit data.

Internal use only