Expand description
Step fields: what the person doing the work records at a step.
An author adds any number of fields to a step (crate::model::Step::fields):
a box to tick, a choice among options, a line or a box of text, a
measurement with its limits, a serial number. The players show them as
inputs and the printed pages as a paper form (a choice prints every option
as its own box to mark). The values are a build’s record, never the
document’s: the players keep them, and a jobs floor stores them with the
step’s sign-off.
A value is plain JSON, the same in the page, the app and a server:
| kind | value |
|---|---|
check | true / false |
choice | the option’s text; with multiple, an array of them; with other, any text |
text, serial | text |
number | a number (or text that reads as one) |
evaluate reads one value against its field and blocking says why a
step cannot be completed yet, so every player and every server apply the
same rule.
Structs§
Enums§
- Field
Kind - What a field records.
Constants§
- MAX_
DECIMALS - The most decimals a measurement shows.
- MAX_
OPTIONS - The most options a choice offers.
- MAX_
TEXT_ LINES - The most lines a text field’s box holds.
- MAX_
VALUE_ CHARS - The longest text a value holds, in characters.
Functions§
- blocking
- Why
fieldkeeps its step from being completed with this value, if it does: a required field left empty, or a measurement outside limits that must be inside. - evaluate
- Read
value(absent: nothing entered) againstfield. AnErris a value the field cannot hold (text for a tick, an option the choice does not offer, something that is no number): a server refuses it. - format_
number valuewithdecimalsdecimals, or as short as it reads when none is set.- missing
- Everything that keeps a step with
fieldsfrom being completed, given the values entered (looked up by field id): one reason per field, in order. A value its field cannot hold is a reason too.