Add dashboard working time range controls#5947
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 02ef88b2f7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| 'custom' => $begin, | ||
| 'ytd' => $today, |
There was a problem hiding this comment.
Preserve selected year when building YTD links
When period links are generated, the YTD option always uses $today as its anchor instead of the currently selected anchor date. That means if a user navigates to a past year (e.g. previous YTD) and then switches periods, clicking YTD jumps back to the current year rather than staying on the same year context, which breaks range navigation consistency for historical comparisons.
Useful? React with 👍 / 👎.
Description
Adds configurable range controls to the dashboard working-time widget.
Users can now switch between week, month, quarter, year, YTD, and custom date ranges, and choose daily or weekly hour grouping. The chart keeps the existing stacked bar presentation, including project separation, while preferring customer colors for bar segments and ordering the stacks by customer, project, and activity.
This also updates the widget AJAX handling so range/grouping/custom-date changes reload the widget consistently, and refreshes the generated frontend assets.
Documentation PR: kimai/www.kimai.org#710
Types of changes
Checklist
composer code-check)Validation
composer code-checkpassed in Docker with the LDAP extension enabled for the test run.yarn buildpassed and generated the updated files inpublic/build/.yarn eslint assets/js/widgets/KimaiPaginatedBoxWidget.jspassed.node --check assets/js/widgets/KimaiPaginatedBoxWidget.jspassed.git diff --checkpassed.Note: full
yarn lintcurrently fails on an unrelated existing issue inassets/js/plugins/KimaiAPILink.js(ALERTassigned but unused). The changed dashboard widget JavaScript passes ESLint directly.