diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ca238e..4e3d6c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,6 +24,9 @@ jobs: - name: Install dependencies run: npm ci + - name: Generate Prisma client + run: npx prisma generate + - name: Lint run: npm run lint diff --git a/app/(app)/products/[id]/page.tsx b/app/(app)/products/[id]/page.tsx index e6d35d2..cd31617 100644 --- a/app/(app)/products/[id]/page.tsx +++ b/app/(app)/products/[id]/page.tsx @@ -89,7 +89,7 @@ export default async function ProductBacklogPage({ params }: Props) { left={ ({ id: p.id, title: p.title, priority: p.priority }))} + pbis={pbis.map((p: (typeof pbis)[number]) => ({ id: p.id, title: p.title, priority: p.priority }))} isDemo={isDemo} /> } diff --git a/app/(app)/products/[id]/sprint/page.tsx b/app/(app)/products/[id]/sprint/page.tsx index f6c15de..40cbac8 100644 --- a/app/(app)/products/[id]/sprint/page.tsx +++ b/app/(app)/products/[id]/sprint/page.tsx @@ -34,13 +34,13 @@ export default async function SprintBacklogPage({ params }: Props) { include: { tasks: { select: { id: true, status: true } } }, }) - const sprintStoryItems: SprintStory[] = sprintStories.map(s => ({ + const sprintStoryItems: SprintStory[] = sprintStories.map((s: (typeof sprintStories)[number]) => ({ id: s.id, title: s.title, priority: s.priority, status: s.status, taskCount: s.tasks.length, - doneCount: s.tasks.filter(t => t.status === 'DONE').length, + doneCount: s.tasks.filter((t: (typeof s.tasks)[number]) => t.status === 'DONE').length, })) // All PBIs with their non-sprint stories for the right panel @@ -55,11 +55,11 @@ export default async function SprintBacklogPage({ params }: Props) { }) const pbisWithStories: PbiWithStories[] = pbis - .filter(pbi => pbi.stories.length > 0) - .map(pbi => ({ + .filter((pbi: (typeof pbis)[number]) => pbi.stories.length > 0) + .map((pbi: (typeof pbis)[number]) => ({ id: pbi.id, title: pbi.title, - stories: pbi.stories.map(s => ({ + stories: pbi.stories.map((s: (typeof pbi.stories)[number]) => ({ id: s.id, title: s.title, priority: s.priority, @@ -69,7 +69,7 @@ export default async function SprintBacklogPage({ params }: Props) { })), })) - const sprintStoryIds = new Set(sprintStories.map(s => s.id)) + const sprintStoryIds = new Set(sprintStories.map((s: (typeof sprintStories)[number]) => s.id)) const isDemo = session.isDemo ?? false return ( diff --git a/app/(app)/products/[id]/sprint/planning/page.tsx b/app/(app)/products/[id]/sprint/planning/page.tsx index dc4aa1f..bb3d215 100644 --- a/app/(app)/products/[id]/sprint/planning/page.tsx +++ b/app/(app)/products/[id]/sprint/planning/page.tsx @@ -38,13 +38,13 @@ export default async function SprintPlanningPage({ params }: Props) { }, }) - const sprintStoryItems: SprintStory[] = sprintStories.map(s => ({ + const sprintStoryItems: SprintStory[] = sprintStories.map((s: (typeof sprintStories)[number]) => ({ id: s.id, title: s.title, priority: s.priority, status: s.status, taskCount: s.tasks.length, - doneCount: s.tasks.filter(t => t.status === 'DONE').length, + doneCount: s.tasks.filter((t: (typeof s.tasks)[number]) => t.status === 'DONE').length, })) // Tasks by story