auto-claude: subtask-3-4 - Add archive button to PhaseCard.tsx for done features
Co-Authored-By: Claude Opus 4.6 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
8046306ae0
commit
c2db77fb5e
@@ -1,5 +1,5 @@
|
||||
import { useState } from 'react';
|
||||
import { CheckCircle2, ChevronDown, ChevronUp, Circle, ExternalLink, Play, TrendingUp } from 'lucide-react';
|
||||
import { Archive, CheckCircle2, ChevronDown, ChevronUp, Circle, ExternalLink, Play, TrendingUp } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { TaskOutcomeBadge } from './TaskOutcomeBadge';
|
||||
import { Badge } from '../ui/badge';
|
||||
@@ -18,6 +18,7 @@ export function PhaseCard({
|
||||
onFeatureSelect,
|
||||
onConvertToSpec,
|
||||
onGoToTask,
|
||||
onArchive,
|
||||
}: PhaseCardProps) {
|
||||
const { t } = useTranslation('common');
|
||||
const [isExpanded, setIsExpanded] = useState(false);
|
||||
@@ -118,11 +119,41 @@ export function PhaseCard({
|
||||
)}
|
||||
</button>
|
||||
{feature.taskOutcome ? (
|
||||
<span className="flex-shrink-0">
|
||||
<span className="flex items-center gap-1 flex-shrink-0">
|
||||
<TaskOutcomeBadge outcome={feature.taskOutcome} size="lg" showLabel={false} />
|
||||
{onArchive && (
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
className="h-6 px-2"
|
||||
title={t('roadmap.archiveFeature')}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
onArchive(feature.id);
|
||||
}}
|
||||
>
|
||||
<Archive className="h-3 w-3" />
|
||||
</Button>
|
||||
)}
|
||||
</span>
|
||||
) : feature.status === 'done' ? (
|
||||
<CheckCircle2 className="h-4 w-4 text-success flex-shrink-0" />
|
||||
<span className="flex items-center gap-1 flex-shrink-0">
|
||||
<CheckCircle2 className="h-4 w-4 text-success" />
|
||||
{onArchive && (
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
className="h-6 px-2"
|
||||
title={t('roadmap.archiveFeature')}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
onArchive(feature.id);
|
||||
}}
|
||||
>
|
||||
<Archive className="h-3 w-3" />
|
||||
</Button>
|
||||
)}
|
||||
</span>
|
||||
) : feature.linkedSpecId ? (
|
||||
<Button
|
||||
variant="ghost"
|
||||
|
||||
Reference in New Issue
Block a user