Deleting a Docket
Delete removes a docket from the project. It needs the Delete docket permission
(dockets.delete). How far the docket has gone decides who else is needed:
| Docket status | Who can delete it |
|---|---|
| Draft | Anyone with Delete docket |
| Field Submitted | Someone who can also Review docket or Confirm docket |
| Submitted | Someone who can also Review docket or Confirm docket |
| Reviewed | Someone who can also Confirm docket |
| Confirmed | Nobody. Unconfirm it first. |
Owner ruling, 2026-10-06: the project team can delete a docket a field user has submitted. The field user who submitted it cannot.
Where Delete appears
- Dockets workbench (web): Delete on each row, and on the selection bar for many rows at once.
- Diary (web and mobile): on its docket rows.
- Docket screen (mobile): in the docket’s menu, including material dockets.
Delete shows only where it will work. A bulk delete leaves alone any docket you cannot delete.
Subcontractor master dockets
A subcontractor master docket is shared: it holds every worker’s day. So it is narrower than the stage rules above.
| Who | Draft | Field-submitted or later |
|---|---|---|
| The office (supervisor, engineer, admin) | Can delete | The stage rules above |
| The crew lead on that docket | Can delete | Cannot delete |
| Any other crew member | Cannot delete | Cannot delete |
A refused delete says “Only the crew lead or the office can delete this docket.” (403). A bulk delete leaves masters alone unless the caller is the office. Crew members still edit only their own lines, and only until the docket is field-submitted; after that it is the supervisor’s work. The phone and the web hide Delete where it would be refused.
Audit trail
Each delete writes a docket.deleted row to the docket’s audit log, with who deleted it and when.
A deleted docket is hidden, not erased, so it can be traced later. Any labour negotiation still open
on it is cancelled.
API
DELETE /v1/orgs/{orgId}/projects/{projectId}/dockets/{docketId} and the two bulk routes,
POST …/dockets/bulk-delete and POST …/dockets/bulk-delete-by-filter, all read one rule:
deleteAllowedStatuses in backend/api/internal/docket/handler.go. A single delete outside the
caller’s rule is refused with 409 “docket is locked” and nothing is written; a bulk delete skips
that docket. Both apps read the same rule from canDeleteDocketAtStage in @lacroo/permissions.
Removing a worker’s rate on a subcontractor master
Only the crew lead or the office can remove (“Unassign”) a worker’s rate on a subcontractor master docket. A crew member cannot remove their own: the phone and the web do not offer it, and a crew member who tries anyway is told “Only the crew lead or the office can remove a rate.” A crew member can still pick or change their own classification until the docket is field-submitted.