improvement: sorts and filters updated for tasks feature.
This commit is contained in:
@@ -38,15 +38,22 @@ Components: `TaskCaseGroupHeader`, `TaskProsthesisGroupHeader`, `TaskRow`.
|
||||
|-------|-----|-----|
|
||||
| `q`, `clinicOrganizationId`, `status` | `GET /tasks` | Search, clinic, status |
|
||||
| `stepCompleted` | `GET /tasks` | Workflow step dropdown |
|
||||
| `important` | `GET /tasks` | Important cases only |
|
||||
| Clinics + steps options | `GET /tasks/filter-options` | Populates dropdowns (not from current page) |
|
||||
|
||||
**Step completed filter:** Restricts to prosthesis groups `(labCaseId, treatmentDetailId, prosthesisTypeCode)` where that `workflowStepCode` task is `COMPLETED`. Combined with `status=IN_PROGRESS`, returns only in-progress tasks in those groups (completed step row hidden).
|
||||
|
||||
- **Important only:** server-side `important=true` on `GET /tasks` (full list pagination, not per-page client filter).
|
||||
- **Reset view:** `resetView` restores `DEFAULT_TASKS_VIEW` from `tasksViewDefaults.ts`.
|
||||
- **Show in case:** flat-sort rows only; resets filters/sort, calls `GET /tasks/locate-page` to find the correct page in the full default-sorted list, then highlights + scrolls to the task.
|
||||
- **Complete animation:** when marking done under in-progress filter, row plays exit animation + success toast before refetch.
|
||||
|
||||
## APIs
|
||||
|
||||
- `GET /tasks` — paginated flat task list (grouping is client-side when `sortBy=date`)
|
||||
- `PATCH /tasks/:taskId` — update status
|
||||
- `GET /tasks/filter-options` — clinics + workflow steps (localized)
|
||||
- `GET /tasks/locate-page` — page number for a task in the sorted filtered list
|
||||
|
||||
List items include `caseSentAt` for case headers.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user