Skip to content

Add dashboard working time range controls#5947

Open
peshay wants to merge 2 commits into
kimai:mainfrom
peshay:codex/dashboard-working-time-ranges
Open

Add dashboard working time range controls#5947
peshay wants to merge 2 commits into
kimai:mainfrom
peshay:codex/dashboard-working-time-ranges

Conversation

@peshay
Copy link
Copy Markdown

@peshay peshay commented May 13, 2026

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I verified that my code applies to the guidelines (composer code-check)
  • I updated the documentation (see here)
  • I agree that this code is used in Kimai (see license)

Validation

  • composer code-check passed in Docker with the LDAP extension enabled for the test run.
  • yarn build passed and generated the updated files in public/build/.
  • yarn eslint assets/js/widgets/KimaiPaginatedBoxWidget.js passed.
  • node --check assets/js/widgets/KimaiPaginatedBoxWidget.js passed.
  • git diff --check passed.

Note: full yarn lint currently fails on an unrelated existing issue in assets/js/plugins/KimaiAPILink.js (ALERT assigned but unused). The changed dashboard widget JavaScript passes ESLint directly.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 13, 2026

CLA assistant check
All committers have signed the CLA.

@peshay peshay marked this pull request as ready for review May 13, 2026 07:40
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +359 to +360
'custom' => $begin,
'ytd' => $today,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants