feat: org-scoped tasks backend, wire tasks page

Add the tasks table, validation, service and routes (/api/tasks with a
PATCH for partial updates / the done toggle, RBAC-gated) and the frontend
data module. The tasks board now loads, creates and toggles real data
(optimistic toggle with rollback).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Khalid Abdi
2026-06-07 19:41:10 +03:00
parent 7ef9da59bd
commit 25254dd4c1
12 changed files with 2270 additions and 66 deletions
+17
View File
@@ -0,0 +1,17 @@
// The canonical Task shape returned by the API. Mirrors the frontend
// `lib/tasks.ts` Task type. Scoped to the active clinic (a shared care-team
// to-do board). `patient` is an optional free-text reference for context.
export type TaskPriority = "high" | "medium" | "low";
export type Task = {
id: string;
title: string;
assignee: string;
due: string;
priority: TaskPriority;
patient: string | null;
notes: string | null;
done: boolean;
createdAt: string;
updatedAt: string;
};