mirror of
https://github.com/temetro/temetro.git
synced 2026-08-12 03:26:53 +00:00
tasks: assign a task to a specific person
Backend: add tasks.assignee_user_id (nullable, fk user) + migration; persist it through create/update and surface tasks to the assigned person in listTasks. Frontend: New Task dialog gains a three-way Assignee control (Myself / Department / Person) with a provider picker from /api/staff/providers; task card + detail show the assignee's name when set. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -25,6 +25,11 @@ export const tasks = pgTable(
|
||||
// The department (member role) a task is assigned to, e.g. "reception".
|
||||
// Null means a personal task belonging to its creator. Drives who sees it.
|
||||
assigneeRole: text("assignee_role"),
|
||||
// A specific person the task is assigned to. Null when assigned to a
|
||||
// department or kept personal. The assignee display name lives in `assignee`.
|
||||
assigneeUserId: text("assignee_user_id").references(() => user.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
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`
|
||||
|
||||
Reference in New Issue
Block a user