feat(ST-1205): add sprint start_date/end_date UI + server actions

- createSprintAction + updateSprintDatesAction: Zod date validation
  with end_date >= start_date cross-check
- start-sprint-button: date inputs in create dialog
- sprint-header: date display button + edit dialog with updateSprintDatesAction
- sprint page: select start_date/end_date for SprintHeader prop
- Demo blokkade via bestaande isDemo checks
- 6 tests groen (validation + demo guard)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Janpeter Visser 2026-05-02 15:54:30 +02:00
parent 66af3d4d30
commit 080bdf39a0
5 changed files with 233 additions and 7 deletions

View file

@ -33,6 +33,13 @@ export default async function SprintBoardPage({ params, searchParams }: Props) {
const sprint = await prisma.sprint.findFirst({
where: { product_id: id, status: 'ACTIVE' },
select: {
id: true,
sprint_goal: true,
status: true,
start_date: true,
end_date: true,
},
})
if (!sprint) redirect(`/products/${id}`)