Merge pull request #76 from madhura68/feat/entity-codes-required

feat(codes): codes verplicht en hiërarchisch zichtbaar voor PBI/Story/Task
This commit is contained in:
Janpeter Visser 2026-05-04 08:40:39 +02:00 committed by GitHub
commit e1f1f29db7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 266 additions and 76 deletions

View file

@ -229,7 +229,6 @@ export function SprintBoardClient({
<TaskList
key="tasks"
storyId={selectedStoryId}
storyCode={stories.find(s => s.id === selectedStoryId)?.code ?? null}
sprintId={sprintId}
productId={productId}
tasks={selectedTasks}

View file

@ -17,7 +17,6 @@ import { Badge } from '@/components/ui/badge'
import { CodeBadge } from '@/components/shared/code-badge'
import { PanelNavBar } from '@/components/shared/panel-nav-bar'
import { PRIORITY_BORDER } from '@/components/backlog/backlog-card'
import { deriveTaskCode } from '@/lib/code'
import { useSprintStore } from '@/stores/sprint-store'
import { updateTaskStatusAction, reorderTasksAction } from '@/actions/tasks'
import { DemoTooltip } from '@/components/shared/demo-tooltip'
@ -38,6 +37,7 @@ const STATUS_LABELS: Record<string, string> = { TO_DO: 'To Do', IN_PROGRESS: 'Be
export interface Task {
id: string
code: string
title: string
description: string | null
priority: number
@ -48,7 +48,6 @@ export interface Task {
interface TaskListProps {
storyId: string
storyCode: string | null
sprintId: string
productId: string
tasks: Task[]
@ -126,7 +125,7 @@ function SortableTaskRow({
)
}
export function TaskList({ storyId, storyCode, sprintId: _sprintId, productId: _productId, tasks, isDemo }: TaskListProps) {
export function TaskList({ storyId, sprintId: _sprintId, productId: _productId, tasks, isDemo }: TaskListProps) {
const { taskOrder, initTasks, reorderTasks, rollbackTasks } = useSprintStore()
const [activeDragId, setActiveDragId] = useState<string | null>(null)
const [, startTransition] = useTransition()
@ -222,11 +221,11 @@ export function TaskList({ storyId, storyCode, sprintId: _sprintId, productId: _
onDragEnd={handleDragEnd}
>
<SortableContext items={orderedTasks.map(t => t.id)} strategy={verticalListSortingStrategy}>
{orderedTasks.map((task, idx) => (
{orderedTasks.map((task) => (
<SortableTaskRow
key={task.id}
task={task}
code={deriveTaskCode(storyCode, idx + 1)}
code={task.code}
isDemo={isDemo}
onStatusToggle={() => handleStatusToggle(task)}
onEdit={() => openEditDialog(task.id)}