spec: update api consistency

Align optimistic locking conflict payload, update websocket docs, and adjust tests.
This commit is contained in:
beabigegg
2026-01-11 16:54:28 +08:00
parent f5f870da56
commit 2cb591ef23
9 changed files with 131 additions and 7 deletions

View File

@@ -0,0 +1,35 @@
## MODIFIED Requirements
### Requirement: Workload Heatmap UI
The system SHALL provide a visual workload heatmap interface for managers.
#### Scenario: View workload heatmap
- **GIVEN** user is logged in as manager or admin
- **WHEN** user navigates to /workload page without filters
- **THEN** system displays a heatmap showing all accessible users' workload
- **AND** users with zero workload are included by default
- **AND** each user cell is color-coded by load level (green/yellow/red)
#### Scenario: Hide empty workloads
- **GIVEN** user is viewing the workload page
- **WHEN** user enables the hide_empty filter
- **THEN** the heatmap excludes users with zero workload
#### Scenario: Navigate between weeks
- **GIVEN** user is viewing the workload page
- **WHEN** user clicks previous/next week buttons
- **THEN** the heatmap updates to show that week's workload data
#### Scenario: Default week window on Sunday
- **GIVEN** today is Sunday and user opens workload page without selecting week_start
- **THEN** the default heatmap window includes tasks due in the upcoming week
#### Scenario: View user workload details
- **GIVEN** user is viewing the workload heatmap
- **WHEN** user clicks on a specific user's cell
- **THEN** a modal/drawer opens showing that user's task breakdown
- **AND** tasks show title, project, time estimate, and due date
#### Scenario: Filter by department
- **GIVEN** user is a system admin
- **WHEN** user selects a department from the filter
- **THEN** the heatmap shows only users from that department