Angebote bearbeiten fuer Admin und Ersteller implementiert
All checks were successful
Staging Build / build (push) Successful in 3m51s

This commit is contained in:
DanielS
2026-07-03 00:03:48 +02:00
parent 023c789baf
commit a4414cc0e6
5 changed files with 359 additions and 42 deletions

View File

@@ -216,22 +216,29 @@ export function OrdersTable({ initialOrders }: OrdersTableProps) {
</DropdownMenu>
</TableCell>
<TableCell className="text-right">
{order.pdf_url ? (
<div className="flex justify-end gap-1.5">
<Button variant="outline" size="sm" asChild className="h-8 border-white/10 hover:bg-primary/20 text-xs">
<a href={order.pdf_url} target="_blank" rel="noopener noreferrer">
<ExternalLink className="w-3.5 h-3.5 mr-1" /> PDF
</a>
</Button>
<Button variant="secondary" size="sm" asChild className="h-8 text-xs">
<a href={`/api/admin/orders/${order.id}/download`}>
<Download className="w-3.5 h-3.5" />
</a>
</Button>
</div>
) : (
<span className="text-xs text-slate-500 italic">Keine Bestätigung</span>
)}
<div className="flex justify-end gap-1.5">
<Button variant="outline" size="sm" asChild className="h-8 border-amber-500/20 hover:bg-amber-500/10 text-amber-400 text-xs">
<a href={`/order?id=${order.id}`}>
Bearbeiten
</a>
</Button>
{order.pdf_url ? (
<>
<Button variant="outline" size="sm" asChild className="h-8 border-white/10 hover:bg-primary/20 text-xs">
<a href={order.pdf_url} target="_blank" rel="noopener noreferrer">
<ExternalLink className="w-3.5 h-3.5 mr-1" /> PDF
</a>
</Button>
<Button variant="secondary" size="sm" asChild className="h-8 text-xs">
<a href={`/api/admin/orders/${order.id}/download`}>
<Download className="w-3.5 h-3.5" />
</a>
</Button>
</>
) : (
<span className="text-xs text-slate-500 italic self-center px-2">Keine Bestätigung</span>
)}
</div>
</TableCell>
</TableRow>
);