fix(time): accept fractional hours in Log Time form (PMS-233) #116
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/mapps-233-fractional-hours"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
The Log Time form's Hours field rejected fractional values: typing
2.5was blocked by the browser before submit, so a tech could only log whole hours (PMS-233).Root cause
The Hours field is an
<input type="number">rendered by the sharedInputcomponent, which exposed nostepattribute. Per the HTML spec atype="number"input defaults tostep=1, so the browser's native constraint validation treats any non-integer as invalid and the value never reaches the submit handler. The Rust submit path was already decimal-correct (parsesf64, stores(hours * 60).round()minutes); the bug was purely the missingstep.Change
stepprop toInputPropsinsrc/components/form.rsand emit it on the<input>(no-op for non-number inputs).step="0.25"on the Hours input insrc/pages/time.rsso quarter-hour increments are accepted, matching the0.00placeholder and the f64 submit path.Verification
cargo check --target wasm32-unknown-unknownpasses.2.5now submits and persists asduration_minutes = 150; whole numbers still work.🤖 Generated with Claude Code