From 6745a6b626303f13b552a6d7d4d40eb2c539d874 Mon Sep 17 00:00:00 2001 From: Bob Date: Fri, 27 Feb 2026 13:38:30 +0000 Subject: [PATCH] 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 --- src/components/Header.vue | 4 + src/route.js | 2 + src/views/WorkReport.vue | 377 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 383 insertions(+) create mode 100644 src/views/WorkReport.vue diff --git a/src/components/Header.vue b/src/components/Header.vue index 9a4a7827..c7f37db3 100644 --- a/src/components/Header.vue +++ b/src/components/Header.vue @@ -59,6 +59,9 @@ div(:class="{'fixed-top-padding': fixedTopMenu}") b-dropdown-item(to="/search") icon(name="search") | Search + b-dropdown-item(to="/work-report") + icon(name="briefcase") + | Work Report b-dropdown-item(to="/trends" v-if="devmode") icon(name="chart-line") | Trends @@ -98,6 +101,7 @@ div(:class="{'fixed-top-padding': fixedTopMenu}") + +