34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
|
|
import { Edit, Eye } from "lucide-react";
|
||
|
|
import { Button } from "@/Components/ui/button";
|
||
|
|
import { Link } from "@inertiajs/react";
|
||
|
|
import type { PurchaseOrder } from "@/types/purchase-order";
|
||
|
|
|
||
|
|
export function PurchaseOrderActions({
|
||
|
|
order,
|
||
|
|
}: { order: PurchaseOrder }) {
|
||
|
|
return (
|
||
|
|
<div className="flex justify-end gap-2">
|
||
|
|
<Link href={`/purchase-orders/${order.id}`}>
|
||
|
|
<Button
|
||
|
|
variant="outline"
|
||
|
|
size="sm"
|
||
|
|
className="button-outlined-primary h-8 w-8 p-0"
|
||
|
|
title="查看採購單"
|
||
|
|
>
|
||
|
|
<Eye className="h-4 w-4" />
|
||
|
|
</Button>
|
||
|
|
</Link>
|
||
|
|
<Link href={`/purchase-orders/${order.id}/edit`}>
|
||
|
|
<Button
|
||
|
|
variant="outline"
|
||
|
|
size="sm"
|
||
|
|
className="button-outlined-primary h-8 w-8 p-0"
|
||
|
|
title="編輯採購單"
|
||
|
|
>
|
||
|
|
<Edit className="h-4 w-4" />
|
||
|
|
</Button>
|
||
|
|
</Link>
|
||
|
|
</div>
|
||
|
|
);
|
||
|
|
}
|