Skip to content

v1.5.0 — equipment time and job costing

Latest

Choose a tag to compare

@phaller222 phaller222 released this 18 Sep 20:41
· 1 commit to main since this release

Equipment can now be clocked onto a task the way people are, and a job can be costed out.

What's new

Equipment time tracking. A sticker on the lift books the lift onto the job it is working:
POST /tasks/{id}/equipment/{resourceId}/start|stop|toggle|stop-at, with GET /tasks/{id}/equipment
and GET /tasks/{id}/equipment/sessions to read it back. Machine hours live on their own paths and in
their own responses — four hours of work plus 120 hours of dryer are not 124 hours of effort, and
separate storage makes that sum impossible rather than merely discouraged.

Corrections for equipment bookings. Nobody walks back to the lift at knock-off time to scan it, so
a booking can be entered by hand, corrected, or removed:
POST /tasks/{id}/equipment/{resourceId}/sessions and PUT|DELETE /tasks/{id}/equipment/sessions/{sessionId}.
Deleting is reserved for the project manager: it is the only operation that removes a cost line without
leaving an audit trail behind.

Costing by qualification, not by person. /qualification-levels holds what an hour of work is
costed at, and a user is put on exactly one level. A booking is stamped with the rate it was closed at,
so changing a price list no longer rewrites past jobs. GET /tasks/{id}/cost reports equipment and
labour together: the money is summed per currency, the hours never are, and the labour block reports
qualification levels rather than individual people.

A task can carry more than one NFC tag, and a slot count nothing can ever be booked on is refused
where it enters instead of surfacing later as a misleading 409 All slots (0) occupied.

Upgrading

Additive throughout: against 1.4.1 no path, schema, operation id, tag, request body, response or
parameter was removed or altered, so a 1.4.x client keeps working. Two additions can still be felt by
an old one — the NFC type enums gained EQUIPMENT, which a strictly generated 1.4.x enum does not
know, and ResourceRequest.maxSlots now carries minimum: 1.

PostgreSQL installations need to widen two check constraints before equipment can be clocked in, and
the unique constraint on nfc_unit.task_id has to go. docs/MIGRATION.md carries the statements and
the reasoning.

The four client libraries are regenerated from docs/openapi.json of this release.