pf_app/routes
Paul Trowbridge ee4a60475e Type the segment date offset as an interval, not year and month spinners
The Date offset on a baseline or reference segment was a pair of
type="number" inputs, years and months, both clamped at min 0. So no
characters could be typed, days could not be expressed at all, and a segment
could only ever be shifted forward in whole months -- while the stored value
is a Postgres interval that happily accepts "4 months", "1 year" or
"-90 days". parseOffset only read year and month, so anything else would not
have survived a round trip through the edit form either.

One text field now, with suggestions, matching what clone already offers.
parseInterval parses it far enough to draw the timeline preview; Postgres
stays the authority, and assertInterval -- now shared by the baseline,
reference and clone routes -- rejects what it will not accept, with a
message naming the field rather than a parse error from inside a CTE.

Timeline takes months and days separately rather than years and months,
because the two are not interchangeable: a month shift lands on the same day
of another month, a day shift can cross a month boundary. It adds months
then days, as Postgres does, and its label handles negatives.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-17 02:36:50 -04:00
..
auth.js Put the app behind a login 2026-09-14 22:20:25 -04:00
log.js Let a segment say what it counts toward, and pivot on it 2026-09-17 00:59:00 -04:00
operations.js Type the segment date offset as an interval, not year and month spinners 2026-09-17 02:36:50 -04:00
sources.js Keep master data for a dim_group instead of re-deriving it from the source 2026-09-17 00:19:39 -04:00
tables.js Expose pf_note/pf_op in forecast data; fix tables list duplicates 2026-04-28 19:51:45 -04:00
versions.js Complete recode values from the version, not the source view 2026-09-17 00:03:05 -04:00