feat(m13): cross-resource search + dashboard completion, tests, e2e
- SearchService (cross-resource keyword search across board/chat/todo/file/ event/meeting/milestone/note with type filter, project isolation) - DashboardService (project dashboard: in-progress todos, near-due(7d), latest chat/board/notes/files(5), next meeting, milestones w/ progress, recent activity(10); personal dashboard: my projects, incomplete todos, upcoming meetings, unread notifications, overdue tasks, recent activity) - CalendarRepository.findByProject - APIs: GET /api/projects/:projectId/search, GET /api/dashboard - Screens: complete personal dashboard, complete project overview, search page + SearchForm, ProjectNav 検索 link - Unit tests (SearchService, DashboardService) + e2e dashboard
This commit is contained in:
@ -23,6 +23,8 @@ import { CalendarRepository } from '@/repositories/CalendarRepository';
|
||||
import { MilestoneRepository } from '@/repositories/MilestoneRepository';
|
||||
import { MeetingService } from '@/services/MeetingService';
|
||||
import { MeetingRepository } from '@/repositories/MeetingRepository';
|
||||
import { SearchService } from '@/services/SearchService';
|
||||
import { DashboardService } from '@/services/DashboardService';
|
||||
|
||||
/**
|
||||
* Route Handler用に各Repository/Serviceを構築するファクトリ。
|
||||
@ -126,6 +128,46 @@ export function createMeetingService(): MeetingService {
|
||||
);
|
||||
}
|
||||
|
||||
export function createSearchService(): SearchService {
|
||||
const db = getDb();
|
||||
return new SearchService(
|
||||
new BoardRepository(db),
|
||||
new ChatRepository(db),
|
||||
new TodoRepository(db),
|
||||
new FileRepository(db),
|
||||
new CalendarRepository(db),
|
||||
new MeetingRepository(db),
|
||||
new MilestoneRepository(db),
|
||||
new ProjectNoteRepository(db),
|
||||
new ProjectMemberRepository(db)
|
||||
);
|
||||
}
|
||||
|
||||
export function createDashboardService(): DashboardService {
|
||||
const db = getDb();
|
||||
const memberRepo = new ProjectMemberRepository(db);
|
||||
const scheduleService = new ScheduleService(
|
||||
new CalendarRepository(db),
|
||||
new MilestoneRepository(db),
|
||||
new TodoRepository(db),
|
||||
memberRepo,
|
||||
new ActivityLogService(new ActivityLogRepository(db))
|
||||
);
|
||||
return new DashboardService(
|
||||
new ProjectRepository(db),
|
||||
new TodoRepository(db),
|
||||
new ChatRepository(db),
|
||||
new BoardRepository(db),
|
||||
new ProjectNoteRepository(db),
|
||||
new FileRepository(db),
|
||||
new MeetingRepository(db),
|
||||
new ActivityLogRepository(db),
|
||||
new NotificationRepository(db),
|
||||
memberRepo,
|
||||
scheduleService
|
||||
);
|
||||
}
|
||||
|
||||
export function createUserRepository(): UserRepository {
|
||||
return new UserRepository(getDb());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user