Add voltage and frequency to printed device labels
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -15,7 +15,9 @@ export const load: PageServerLoad = async ({ params }) => {
|
|||||||
brand: devices.brand,
|
brand: devices.brand,
|
||||||
model: devices.model,
|
model: devices.model,
|
||||||
serialNumber: devices.serialNumber,
|
serialNumber: devices.serialNumber,
|
||||||
category: devices.category
|
category: devices.category,
|
||||||
|
voltage: devices.voltage,
|
||||||
|
frequency: devices.frequency
|
||||||
})
|
})
|
||||||
.from(devices)
|
.from(devices)
|
||||||
.where(eq(devices.id, params.id));
|
.where(eq(devices.id, params.id));
|
||||||
|
|||||||
@@ -55,6 +55,11 @@
|
|||||||
S/N: {data.device.serialNumber}
|
S/N: {data.device.serialNumber}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
{#if data.device.voltage || data.device.frequency}
|
||||||
|
<div style="font-size: 6pt; color: #666; margin-top: 0.3mm;">
|
||||||
|
{[data.device.voltage, data.device.frequency].filter(Boolean).join(' / ')}
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
<div style="margin-top: 1mm;">
|
<div style="margin-top: 1mm;">
|
||||||
<img src={data.barcodeDataUrl} alt={data.shortId}
|
<img src={data.barcodeDataUrl} alt={data.shortId}
|
||||||
style="height: 7mm; width: auto; max-width: 55mm; display: block;" />
|
style="height: 7mm; width: auto; max-width: 55mm; display: block;" />
|
||||||
|
|||||||
Reference in New Issue
Block a user