feat(tasks): kanban board with To Do / In Progress / Done columns

- add a `status` field to tasks (backend schema/validation/service/types
  + frontend types), kept in sync with the legacy `done` flag
- migration 0017 adds the column and backfills done tasks to "done"
- rewrite the tasks page as a three-column board: per-column add buttons,
  draggable cards, and a status mover in the detail sheet

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Khalid Abdi
2026-06-15 18:35:48 +03:00
parent 6e5598262e
commit 6fdb7bdb46
11 changed files with 3444 additions and 144 deletions
+4 -1
View File
@@ -7,7 +7,7 @@ import {
uuid,
} from "drizzle-orm/pg-core";
import type { TaskPriority } from "../../types/task.js";
import type { TaskPriority, TaskStatus } from "../../types/task.js";
import { organization, user } from "./auth.js";
// One row per care-team to-do, scoped to a clinic (organization). Shared across
@@ -27,6 +27,9 @@ export const tasks = pgTable(
assigneeRole: text("assignee_role"),
due: text("due").notNull().default("No due date"),
priority: text("priority").$type<TaskPriority>().notNull(),
// Board column: todo | in_progress | done. Kept in sync with `done`
// (done === status === "done") so the legacy toggle still works.
status: text("status").$type<TaskStatus>().notNull().default("todo"),
patient: text("patient"),
notes: text("notes"),
done: boolean("done").notNull().default(false),