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:
2026-04-07 11:49:49 +07:00
parent d17eed5bfc
commit d017101ae8
2 changed files with 8 additions and 1 deletions
@@ -15,7 +15,9 @@ export const load: PageServerLoad = async ({ params }) => {
brand: devices.brand,
model: devices.model,
serialNumber: devices.serialNumber,
category: devices.category
category: devices.category,
voltage: devices.voltage,
frequency: devices.frequency
})
.from(devices)
.where(eq(devices.id, params.id));
@@ -55,6 +55,11 @@
S/N: {data.device.serialNumber}
</div>
{/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;">
<img src={data.barcodeDataUrl} alt={data.shortId}
style="height: 7mm; width: auto; max-width: 55mm; display: block;" />