This commit is contained in:
+23
-3
@@ -140,9 +140,19 @@ export default function PartDetailClient({
|
||||
</span>
|
||||
}
|
||||
actions={
|
||||
<Button variant="secondary" onClick={() => setEditOpen(true)}>
|
||||
Edit part
|
||||
</Button>
|
||||
<div className="flex items-center gap-2">
|
||||
<a
|
||||
href={`/api/v1/parts/${part.id}/travelers.pdf`}
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
className="inline-flex items-center rounded-md bg-white border border-slate-300 text-slate-900 text-sm px-3 py-1.5 hover:border-slate-900"
|
||||
>
|
||||
Print travelers (PDF)
|
||||
</a>
|
||||
<Button variant="secondary" onClick={() => setEditOpen(true)}>
|
||||
Edit part
|
||||
</Button>
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -328,6 +338,16 @@ function OperationsSection({
|
||||
<Button variant="ghost" size="sm" onClick={() => setQrFor(op)} disabled={busyId !== null}>
|
||||
QR
|
||||
</Button>
|
||||
<a
|
||||
href={`/api/v1/operations/${op.id}/card.pdf`}
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
className={`inline-flex items-center rounded-md px-2 py-1 text-xs text-slate-600 hover:text-slate-900 hover:underline ${
|
||||
busyId !== null ? "pointer-events-none opacity-50" : ""
|
||||
}`}
|
||||
>
|
||||
Print
|
||||
</a>
|
||||
<Button variant="ghost" size="sm" onClick={() => setEdit(op)} disabled={busyId !== null}>
|
||||
Edit
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user