feat(todo): richer metadata (tags, startDate, files) + edit/detail dialog
ToDoアイテムのメタデータを拡充し、編集/詳細ダイアログを追加。
- lib/db/migrations/003_todo_tags.sql: todo_items に tags 列を追加
- TodoRepository/TodoService: startDate(従来ハードコードNULL)とtagsをcreate/updateで永続化、fileIdsで添付紐付け(トランザクション)、deleteItemで添付クリーンアップ、getItem/getItemAttachments を追加
- API: GET /todos/items/[itemId] ({item, attachments}) を追加、POST/PATCH で startDate/tags/fileIds を受理、PATCH は null(クリア)と undefined(更新しない)を区別
- UI: TodoDialog(タイトル/説明/担当/優先度/開始日/期限/タグ/添付を編集、完了日時・タイムスタンプは読み取り専用)、KanbanBoard のカードクリックでダイアログを開きメタデータを表示
- MilestoneRepository の todo マッピングに tags を追加し as never キャストを修正
- docs/functional-design.md に tags / file_assets.source / attachments テーブルを追記
This commit is contained in:
@ -98,12 +98,19 @@ export function createChatService(): ChatService {
|
||||
|
||||
export function createTodoService(): TodoService {
|
||||
const db = getDb();
|
||||
const memberRepo = new ProjectMemberRepository(db);
|
||||
return new TodoService(
|
||||
new TodoRepository(db),
|
||||
new ProjectMemberRepository(db),
|
||||
memberRepo,
|
||||
new NotificationService(new NotificationRepository(db)),
|
||||
new ActivityLogService(new ActivityLogRepository(db)),
|
||||
getSseHub()
|
||||
getSseHub(),
|
||||
new AttachmentService(
|
||||
new AttachmentRepository(db),
|
||||
new FileRepository(db),
|
||||
memberRepo
|
||||
),
|
||||
db
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
4
lib/db/migrations/003_todo_tags.sql
Normal file
4
lib/db/migrations/003_todo_tags.sql
Normal file
@ -0,0 +1,4 @@
|
||||
-- 003_todo_tags.sql
|
||||
-- ToDoアイテムにタグ列を追加(カンマ区切り、project_notes.tags と同じ方式)。
|
||||
|
||||
ALTER TABLE todo_items ADD COLUMN tags TEXT;
|
||||
@ -127,6 +127,7 @@ export interface TodoItem {
|
||||
completedAt: string | null;
|
||||
orderIndex: number;
|
||||
milestoneId: number | null;
|
||||
tags: string | null;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
deletedAt: string | null;
|
||||
@ -153,7 +154,8 @@ export type FileAssetSource = 'library' | 'attachment';
|
||||
export type AttachmentTargetType =
|
||||
| 'chat_message'
|
||||
| 'board_thread'
|
||||
| 'board_comment';
|
||||
| 'board_comment'
|
||||
| 'todo_item';
|
||||
|
||||
/** attachments エンティティ。 */
|
||||
export interface Attachment {
|
||||
|
||||
Reference in New Issue
Block a user