diff --git a/components/sprint/sprint-backlog.tsx b/components/sprint/sprint-backlog.tsx index bffc534..5cbd2ef 100644 --- a/components/sprint/sprint-backlog.tsx +++ b/components/sprint/sprint-backlog.tsx @@ -15,6 +15,7 @@ import { import { PanelNavBar } from '@/components/shared/panel-nav-bar' import { UserAvatar } from '@/components/shared/user-avatar' import { DemoTooltip } from '@/components/shared/demo-tooltip' +import { PRIORITY_BORDER } from '@/components/backlog/backlog-card' import { useSprintStore } from '@/stores/sprint-store' import { claimStoryAction, unclaimStoryAction, reassignStoryAction, claimAllUnassignedInActiveSprintAction } from '@/actions/stories' import { cn } from '@/lib/utils' @@ -26,14 +27,6 @@ const STATUS_COLORS: Record = { } const STATUS_LABELS: Record = { OPEN: 'Open', IN_SPRINT: 'In Sprint', DONE: 'Klaar' } -const PRIORITY_COLORS: Record = { - 1: 'bg-priority-critical/15 text-priority-critical border-priority-critical/30', - 2: 'bg-priority-high/15 text-priority-high border-priority-high/30', - 3: 'bg-priority-medium/15 text-priority-medium border-priority-medium/30', - 4: 'bg-priority-low/15 text-priority-low border-priority-low/30', -} -const PRIORITY_LABELS: Record = { 1: 'Kritiek', 2: 'Hoog', 3: 'Gemiddeld', 4: 'Laag' } - export interface SprintStory { id: string code: string | null @@ -124,86 +117,89 @@ function SortableSprintRow({ ref={setNodeRef} style={style} onClick={onSelect} - className={cn( - 'group flex items-start gap-3 px-4 py-2.5 border-b border-border cursor-pointer transition-colors', - isSelected - ? 'bg-primary-container text-primary-container-foreground' - : 'hover:bg-surface-container' - )} + className="group px-2 py-1 cursor-pointer" > - {!isDemo && ( - e.stopPropagation()} - > - ⠿ - - )} -
-
-

{story.title}

- {story.code && } -
-
- - {PRIORITY_LABELS[story.priority]} - - {story.doneCount}/{story.taskCount} klaar -
-
- {story.assignee_id ? ( - <> - - {story.assignee_username} - - ) : ( - Niet geclaimd - )} -
-
-
e.stopPropagation()}> - - - - - - e.stopPropagation()}> - {story.assignee_id !== currentUserId && ( - Pak op - )} - {story.assignee_id && ( - Geef terug aan team - )} - - Wijs toe aan - - {members.map(m => ( - handleReassign(e, m.userId, m.username)}> - - {m.username} - - ))} - - - - - +
{!isDemo && ( - + ⠿ + )} +
+
+

{story.title}

+ {story.code && } +
+
+
+ + {STATUS_LABELS[story.status]} + + {story.doneCount}/{story.taskCount} klaar + {story.assignee_id ? ( +
+ + {story.assignee_username} +
+ ) : ( + Niet geclaimd + )} +
+
e.stopPropagation()}> + + + + + + e.stopPropagation()}> + {story.assignee_id !== currentUserId && ( + Pak op + )} + {story.assignee_id && ( + Geef terug aan team + )} + + Wijs toe aan + + {members.map(m => ( + handleReassign(e, m.userId, m.username)}> + + {m.username} + + ))} + + + + + + {!isDemo && ( + + )} +
+
+
) @@ -326,35 +322,43 @@ function DraggablePbiStoryRow({ style={style} onClick={!isDemo ? onAdd : undefined} className={cn( - 'flex items-center gap-3 px-6 py-2 border-b border-border/50 transition-colors', - !isDemo && 'cursor-pointer hover:bg-primary/5', + 'px-2 py-1', + !isDemo && 'cursor-pointer', isDemo && 'opacity-60', isDragging && 'opacity-40' )} > - {!isDemo && ( - e.stopPropagation()} - > - ⠿ - - )} -
-
-

{story.title}

- {story.code && } +
+ {!isDemo && ( + e.stopPropagation()} + > + ⠿ + + )} +
+
+

{story.title}

+ {story.code && } +
+
+ + {STATUS_LABELS[story.status]} + +
- - {STATUS_LABELS[story.status]} - + {!isDemo && ( + + toevoegen + )}
- {!isDemo && ( - + toevoegen - )}
) } @@ -404,21 +408,25 @@ export function SprintBacklogRight({ pbisWithStories, sprintStoryIds, isDemo, on const inSprint = sprintStoryIds.has(story.id) if (inSprint) { return ( -
-
-
-
-

{story.title}

- {story.code && } +
+
+
+
+
+

{story.title}

+ {story.code && } +
+
+ + {STATUS_LABELS[story.status]} + +
- - {STATUS_LABELS[story.status]} - + In Sprint
- In Sprint
) }