feat(ST-360): extend demo seed with claimed and unassigned solo stories

Adds a Solo Demo PBI under the active sprint with 4 stories:
- 3 claimed by demo user, tasks covering TO_DO / IN_PROGRESS / DONE columns
- 1 unassigned story so the sheet demo shows a claimable item

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Janpeter Visser 2026-04-26 16:56:12 +02:00
parent 95ee968f39
commit 9b2cf482ca

View file

@ -180,6 +180,92 @@ async function main() {
}
// Solo board demo data — claimed stories for demo user + 1 unassigned for the sheet
const activeSprint = await prisma.sprint.findFirst({
where: { product_id: product.id, status: 'ACTIVE' },
})
if (activeSprint) {
const soloPbi = await prisma.pbi.create({
data: {
product_id: product.id,
title: 'Solo Demo',
description: 'Voorbeeldtaken voor het Solo bord.',
priority: 3,
sort_order: 99,
},
})
const soloData = [
{
title: 'Gebruikersauthenticatie opzetten',
tasks: [
{ title: 'JWT middleware schrijven', status: 'TO_DO' as const, priority: 1 },
{ title: 'Login endpoint testen', status: 'TO_DO' as const, priority: 2 },
],
assignee_id: demo.id,
sortOrder: 1,
},
{
title: 'REST API endpoints implementeren',
tasks: [
{ title: 'Route handlers aanmaken', status: 'IN_PROGRESS' as const, priority: 2 },
{ title: 'Zod-validatie toevoegen', status: 'TO_DO' as const, priority: 3 },
],
assignee_id: demo.id,
sortOrder: 2,
},
{
title: 'Database schema migreren',
tasks: [
{ title: 'Prisma schema bijwerken', status: 'DONE' as const, priority: 2 },
{ title: 'Migratietest uitvoeren', status: 'DONE' as const, priority: 3 },
],
assignee_id: demo.id,
sortOrder: 3,
},
{
title: 'Frontend unit tests schrijven',
tasks: [
{ title: 'Vitest opzetten', status: 'TO_DO' as const, priority: 3 },
],
assignee_id: null,
sortOrder: 4,
},
]
for (const s of soloData) {
const story = await prisma.story.create({
data: {
pbi_id: soloPbi.id,
product_id: product.id,
sprint_id: activeSprint.id,
title: s.title,
priority: 2,
sort_order: 90 + s.sortOrder,
status: 'IN_SPRINT',
assignee_id: s.assignee_id,
},
})
for (let i = 0; i < s.tasks.length; i++) {
const t = s.tasks[i]
await prisma.task.create({
data: {
story_id: story.id,
sprint_id: activeSprint.id,
title: t.title,
priority: t.priority,
sort_order: i + 1.0,
status: t.status,
},
})
}
}
console.log(' Solo demo stories created (3 claimed, 1 unassigned)')
}
console.log('\nSeeding complete!')
console.log('Demo user: username=demo password=demo1234')
console.log('Main user: username=lars password=scrum4me123')