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> |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| vendor | ||
| .gitignore | ||
| eslint.config.js | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| vite.config.js | ||
React + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Oxc
- @vitejs/plugin-react-swc uses SWC
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the ESLint configuration
If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and typescript-eslint in your project.