Skip to content

feat(dashboard): Employee Workload & Activity Report widget#192

Merged
parth0025 merged 7 commits into
stagingfrom
feat/employee-workload-report-widget
Jun 5, 2026
Merged

feat(dashboard): Employee Workload & Activity Report widget#192
parth0025 merged 7 commits into
stagingfrom
feat/employee-workload-report-widget

Conversation

@parth0025

@parth0025 parth0025 commented May 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a new filter-driven dashboard card, Employee Workload & Activity Report, showing per-employee Logged / Planned / Estimate hours for a chosen time period, with expandable per-task rows, a totals footer, client-side column sorting, employee search, and over-budget (red/amber) highlighting + legend.
  • New backend endpoint POST /api/v1/dashboard/employee-workload (getEmployeeWorkloadReport). The period pivots on estimated_time.Date (planned) and timesheets.LogStartTime (logged) — not task created/due date — and is multi-assignee aware. Returns all matching tasks per employee (no display cap).
  • Role-based visibility aligned with the app-wide convention used in workloadTimeSheet / userTimeSheet / projectTimeSheet / getProjectList: roleType 1 or 2 see all employees the filter selects; everyone else sees only themselves.
  • Frontend widget with sticky-header scroll table, Wasabi-backed avatars (via the users store), subtask indicator, team→user resolution + empty-team hiding, and role-aware Edit Card fields.

Files

  • Modules/UserDashboard/controller.js, routes.js — endpoint + route
  • Modules/EstimatedTime/aiTaskCategory.js, aiWorkloadSummary.js — AI helpers (category returned, not surfaced; summary unused)
  • utils/cardComponent.json — card catalog entry (7 config fields)
  • frontend/.../EmployeeWorkloadReportCard/ — widget + styles
  • frontend/.../CardFieldComponent.vue, commonFunction.js, en.js, HomePage.vue — wiring, i18n, role-aware fields, default grid size
  • .claude/EMPLOYEE-WORKLOAD-REPORT-PLAN.md, .claude/TEST-CASES.md — docs

Operational notes

  • The card catalog is cached for 24h — restart the backend after deploy to pick up cardComponent.json.
  • A card instance saved with old config persists — remove and re-add the card to pick up field changes.

Test plan

  • Admin/Owner (roleType 1) sees all active company employees matching the filter
  • Manager (roleType 2) sees all filtered employees (no longer limited to led-projects)
  • Member (other roleType) sees only themselves; "Hide empty users" field hidden; assignee picker locked to self
  • Selecting a Team in "Show Assignees" resolves to its members; empty teams don't appear as options
  • Project / Status / Time Period / Include Subtasks filters all narrow results correctly
  • Logged/Planned/Estimate totals match the sum of visible rows; all tasks per employee show (no "Showing N of M" cap)
  • Over-estimate (red) and over-planned (amber) highlighting + legend render correctly
  • Employee search, column sorting, sticky header/footer, subtask icon, and task-name → TaskDetail sidebar all work
  • Avatars load from production (Wasabi) storage

🤖 Generated with Claude Code

Add a filter-driven dashboard card showing per-employee planned,
logged, and estimated hours for a chosen period, with expandable
per-task breakdowns, totals footer, client-side sorting, employee
search, and over-budget highlighting.

- Backend: getEmployeeWorkloadReport endpoint + route. Period pivots
  on estimated_time.Date (planned) and timesheets.LogStartTime
  (logged); multi-assignee aware. Role-based visibility aligned with
  the app-wide convention (roleType 1/2 see all filtered employees,
  others see only themselves). Returns all matching tasks per
  employee (no display cap).
- Frontend: EmployeeWorkloadReportCard widget + sticky-header table,
  Wasabi-backed avatars via the users store, subtask indicator,
  team->user resolution, role-aware Edit Card fields.
- Config: cardComponent.json catalog entry, i18n keys, default grid
  size, HomePage getComponent case.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@parth0025 parth0025 self-assigned this May 27, 2026
@parth0025 parth0025 added the enhancement New feature or request label May 27, 2026
@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 17403d4b-bc48-44ef-a568-67d51d08f64b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/employee-workload-report-widget

Comment @coderabbitai help to get the list of available commands and usage tips.

parth0025 and others added 2 commits June 5, 2026 16:29
… badge, column toggles

- Move Time Period filter from edit-card config into an inline dropdown
  before the card search box (same resolveDateRange → fetch path)
- Add "Current" option (default) showing only employees with a live
  running tracker now; backend filters rows to active-tracker pairs
- Add green "Running" badge on tasks with an active tracker, using the
  app's 10-minute startTimeTracker recency rule
- Add per-card refresh button (replaces 5-min auto-refresh)
- Add show/hide toggles for Logged / Planned / Estimate columns; hide
  Total row and the colour legend when the relevant columns are off
- Always hide empty users; remove the hide-empty-users config + the
  employees-selected chip

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Brand-tinted pill at the left of the controls row showing the number of
employees currently shown (tracks search/Current filtering).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@parth0025 parth0025 merged commit 4dbe795 into staging Jun 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant