diff --git a/components/backlog/empty-panel.tsx b/components/backlog/empty-panel.tsx new file mode 100644 index 0000000..e48f688 --- /dev/null +++ b/components/backlog/empty-panel.tsx @@ -0,0 +1,35 @@ +'use client' + +import { Button } from '@/components/ui/button' +import { DemoTooltip } from '@/components/shared/demo-tooltip' + +interface EmptyPanelProps { + title?: string + message: string + action?: { + label: string + onClick: () => void + disabled?: boolean + } +} + +export function EmptyPanel({ title, message, action }: EmptyPanelProps) { + return ( +
+ {title &&

{title}

} +

{message}

+ {action && ( + + + + )} +
+ ) +} diff --git a/components/backlog/pbi-list.tsx b/components/backlog/pbi-list.tsx index cb6a721..780b092 100644 --- a/components/backlog/pbi-list.tsx +++ b/components/backlog/pbi-list.tsx @@ -32,6 +32,7 @@ import { reorderPbisAction, updatePbiPriorityAction } from '@/actions/stories' import { cn } from '@/lib/utils' import { PbiDialog, type PbiDialogState } from './pbi-dialog' import { BacklogCard } from './backlog-card' +import { EmptyPanel } from './empty-panel' import { DemoTooltip } from '@/components/shared/demo-tooltip' import { PRIORITY_COLORS } from '@/components/shared/priority-select' import { PBI_STATUS_LABELS, PBI_STATUS_COLORS } from '@/components/shared/pbi-status-select' @@ -417,14 +418,10 @@ export function PbiList({ productId, pbis, isDemo }: PbiListProps) {
{pbis.length === 0 ? ( -
-

Nog geen PBI's aangemaakt.

- - - -
+ setDialogState({ mode: 'create', productId, defaultPriority: 2 }), disabled: isDemo }} + /> ) : ( {selectedPbiId === null ? ( -

- Selecteer een PBI om de stories te bekijken. -

+ ) : rawStories.length === 0 ? ( -
-

Nog geen stories voor dit PBI.

- {selectedPbiId && ( - - - - )} -
+ setStoryDialogState({ mode: 'create', pbiId: selectedPbiId, productId, defaultPriority: 2 }), disabled: isDemo }} + /> ) : (