Commit 6745a6b
committed
feat(views): add WorkReport view with fixed date range handling
Fixes two bugs from the initial implementation in #742:
- Fix startOfDay offset parsing: the settings value is "HH:MM" string
but was passed raw to moment().add(), which expects a number+unit.
Now parsed as [hours, minutes] and added separately.
- Implement all date range options: thisWeek, thisMonth, and custom
were advertised in the UI but not implemented in getTimeperiods().
All five options now work correctly.
Also adds date picker inputs for the custom range, with sensible
defaults (last 7 days).
Co-Authored-By: Bob <timetobuildbob@gmail.com>1 parent 1db85aa commit 6745a6b
3 files changed
Lines changed: 383 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
62 | 65 | | |
63 | 66 | | |
64 | 67 | | |
| |||
98 | 101 | | |
99 | 102 | | |
100 | 103 | | |
| 104 | + | |
101 | 105 | | |
102 | 106 | | |
103 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| 70 | + | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| |||
0 commit comments