feat: Add project filter to listInitiatives
Add findByProjectId to InitiativeRepository using a subquery on the initiative_projects junction table. Extend the listInitiatives tRPC procedure to accept an optional projectId filter that composes with the existing status filter. Add a project dropdown to the initiatives page alongside the status filter.
This commit is contained in:
@@ -88,7 +88,7 @@ Each procedure uses `require*Repository(ctx)` helpers that throw `TRPCError(INTE
|
||||
| Procedure | Type | Description |
|
||||
|-----------|------|-------------|
|
||||
| createInitiative | mutation | Create with optional branch/projectIds/description, auto-creates root page (seeded with description); if description provided, auto-spawns refine agent |
|
||||
| listInitiatives | query | Filter by status; returns `activity` (state, activePhase, phase counts) computed from phases |
|
||||
| listInitiatives | query | Filter by status and/or projectId; returns `activity` (state, activePhase, phase counts) computed from phases |
|
||||
| getInitiative | query | With projects array |
|
||||
| updateInitiative | mutation | Name, status |
|
||||
| deleteInitiative | mutation | Cascade delete initiative and all children |
|
||||
|
||||
Reference in New Issue
Block a user