Move the BOM import/export to below the edit buttons

This commit is contained in:
2025-07-06 22:05:01 +02:00
parent a58f95c88a
commit a598d6c15f

View File

@@ -214,31 +214,6 @@ const JobCard: React.FC<JobCardProps> = ({
<Badge className={`${getStatusColor(job.status)} text-white flex-shrink-0`}>
{job.status}
</Badge>
<div className="flex gap-1 flex-shrink-0">
<Button
variant="ghost"
size="sm"
className="p-1 h-6 w-6"
onClick={handleImportClick}
title="Import BOM from clipboard"
>
<Import className="w-4 h-4 text-blue-400" />
</Button>
<Button
variant="ghost"
size="sm"
className="p-1 h-6 w-6"
onClick={handleExportClick}
disabled={!job.billOfMaterials?.length}
title="Export BOM to clipboard"
>
{copyingBom ? (
<Check className="w-4 h-4 text-green-400" />
) : (
<Upload className="w-4 h-4 text-blue-400" />
)}
</Button>
</div>
</div>
<p className="text-gray-400 text-sm">
Quantity: {job.outputQuantity.toLocaleString()}
@@ -272,7 +247,8 @@ const JobCard: React.FC<JobCardProps> = ({
</span>
</p>
</div>
<div className="flex gap-2 flex-shrink-0">
<div className="flex flex-col gap-2 flex-shrink-0">
<div className="flex gap-2">
<Button
variant="outline"
size="sm"
@@ -289,6 +265,32 @@ const JobCard: React.FC<JobCardProps> = ({
Delete
</Button>
</div>
<div className="flex gap-1 justify-end">
<Button
variant="ghost"
size="sm"
className="p-1 h-6 w-6"
onClick={handleImportClick}
title="Import BOM from clipboard"
>
<Import className="w-4 h-4 text-blue-400" />
</Button>
<Button
variant="ghost"
size="sm"
className="p-1 h-6 w-6"
onClick={handleExportClick}
disabled={!job.billOfMaterials?.length}
title="Export BOM to clipboard"
>
{copyingBom ? (
<Check className="w-4 h-4 text-green-400" />
) : (
<Upload className="w-4 h-4 text-blue-400" />
)}
</Button>
</div>
</div>
</div>
</CardHeader>
<CardContent className="flex-1 flex flex-col space-y-4">