feat(projects,sla): accept H:MM / fractional hours in Budget Hours and SLA times (PMS-340) #171
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/PMS-340-duration-fields-hhmm"
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?
Implements PMS-340.
Problem
Follow-up to PMS-314 / PMS-319. The remaining duration-in-hours inputs were bare
<input type="number">with nostep, so the browser blocked fractional entry like1.5(the PMS-233 root cause) and could never acceptH:MM.Changes
src/pages/projects.rs(Budget Hours, create + edit): switched fromtype="number"to free-text with placeholder + help; parses viaparse_input_to_hours(blank clears it; unparseable value errors inline instead of being dropped); edit form pre-fills viafmt_input_hours. Budget Amount (USD) is unchanged (stillvalidate_budget).src/pages/sla.rs(first-response + resolution times, per priority): inputs switched to free-text;parse_hoursnow also acceptsH:MM, reusing the shared minute parser for validation and converting to an exactrust_decimal::Decimal(a plain decimal still parses exactly), so SLA targets keep Decimal precision.Verification
just pre-commit(pinned rust 1.94 = CI) passes: fmt, clippy-D warnings,cargo check --target wasm32-unknown-unknown, all 91 lib tests.Acceptance criteria
1.5and1:30, persists, and rejects malformed input with an inline error.1.5and1:30and persist.type="number"blocked it).🤖 Generated with Claude Code