fix(PBI-59): drop invalid Sprint.code select in fetchJobsPageData (#151)
Sprint heeft geen `code` veld; de query crashte met PrismaClientValidationError zodra /jobs werd geopend. sprintCode blijft in JobWithRelations als string|null voor UI-compat (JobCard.titleText fallback) maar is nu altijd null. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f166186374
commit
a7e9ca1c35
1 changed files with 3 additions and 3 deletions
|
|
@ -35,7 +35,7 @@ const JOB_INCLUDE = {
|
|||
task: { select: { code: true, title: true } },
|
||||
idea: { select: { code: true, title: true } },
|
||||
product: { select: { name: true } },
|
||||
sprint_run: { include: { sprint: { select: { sprint_goal: true, code: true } } } },
|
||||
sprint_run: { include: { sprint: { select: { sprint_goal: true } } } },
|
||||
} as const
|
||||
|
||||
function mapJob(j: {
|
||||
|
|
@ -59,7 +59,7 @@ function mapJob(j: {
|
|||
task: { code: string | null; title: string } | null
|
||||
idea: { code: string | null; title: string } | null
|
||||
product: { name: string }
|
||||
sprint_run: { sprint: { sprint_goal: string; code: string | null } } | null
|
||||
sprint_run: { sprint: { sprint_goal: string } } | null
|
||||
}): JobWithRelations {
|
||||
return {
|
||||
id: j.id,
|
||||
|
|
@ -70,7 +70,7 @@ function mapJob(j: {
|
|||
ideaCode: j.idea?.code ?? null,
|
||||
ideaTitle: j.idea?.title ?? null,
|
||||
sprintGoal: j.sprint_run?.sprint.sprint_goal ?? null,
|
||||
sprintCode: j.sprint_run?.sprint.code ?? null,
|
||||
sprintCode: null,
|
||||
productName: j.product.name,
|
||||
modelId: j.model_id,
|
||||
inputTokens: j.input_tokens,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue