fix: prisma generate in CI en expliciete types in map/filter callbacks
This commit is contained in:
parent
7dfc389be4
commit
567e91493e
4 changed files with 12 additions and 9 deletions
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
|
|
@ -24,6 +24,9 @@ jobs:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Generate Prisma client
|
||||||
|
run: npx prisma generate
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ export default async function ProductBacklogPage({ params }: Props) {
|
||||||
left={
|
left={
|
||||||
<PbiList
|
<PbiList
|
||||||
productId={id}
|
productId={id}
|
||||||
pbis={pbis.map(p => ({ 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}
|
isDemo={isDemo}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,13 +34,13 @@ export default async function SprintBacklogPage({ params }: Props) {
|
||||||
include: { tasks: { select: { id: true, status: true } } },
|
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,
|
id: s.id,
|
||||||
title: s.title,
|
title: s.title,
|
||||||
priority: s.priority,
|
priority: s.priority,
|
||||||
status: s.status,
|
status: s.status,
|
||||||
taskCount: s.tasks.length,
|
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
|
// 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
|
const pbisWithStories: PbiWithStories[] = pbis
|
||||||
.filter(pbi => pbi.stories.length > 0)
|
.filter((pbi: (typeof pbis)[number]) => pbi.stories.length > 0)
|
||||||
.map(pbi => ({
|
.map((pbi: (typeof pbis)[number]) => ({
|
||||||
id: pbi.id,
|
id: pbi.id,
|
||||||
title: pbi.title,
|
title: pbi.title,
|
||||||
stories: pbi.stories.map(s => ({
|
stories: pbi.stories.map((s: (typeof pbi.stories)[number]) => ({
|
||||||
id: s.id,
|
id: s.id,
|
||||||
title: s.title,
|
title: s.title,
|
||||||
priority: s.priority,
|
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<string>(sprintStories.map((s: (typeof sprintStories)[number]) => s.id))
|
||||||
const isDemo = session.isDemo ?? false
|
const isDemo = session.isDemo ?? false
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -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,
|
id: s.id,
|
||||||
title: s.title,
|
title: s.title,
|
||||||
priority: s.priority,
|
priority: s.priority,
|
||||||
status: s.status,
|
status: s.status,
|
||||||
taskCount: s.tasks.length,
|
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
|
// Tasks by story
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue