diff --git a/CHANGELOG.md b/CHANGELOG.md index 3de3917..b0a9ce2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,19 @@ ADR-007 and ADR-002. ## [Unreleased] +### Added + +- Single-label sheet-position printing. The single asset-label page + (`/print/asset-label/:assettype/:id`) gained an Output control that toggles + between the standalone label (unchanged default) and placing that one label at + a chosen cell (1-6, via a 2x3 grid picker) of a ULINE 6-up sheet, leaving the + other five cells blank. This prints a single label onto the correct physical + spot of a partially-used sheet instead of wasting a fresh sheet, mirroring the + legacy shopdb behavior and complementing the batch page's start-cell offset. + The ULINE 6-up cell layout and dimensions are replicated from + `AssetLabelBatch.vue` (left untouched); encode resolution stays shared via + `assetLabel.js`. + ## [0.7.0] - 2026-07-12 ### Added diff --git a/frontend/src/views/print/AssetLabel.vue b/frontend/src/views/print/AssetLabel.vue index 7426956..53760d4 100644 --- a/frontend/src/views/print/AssetLabel.vue +++ b/frontend/src/views/print/AssetLabel.vue @@ -33,13 +33,36 @@

This tool has no location; the label falls back to the asset page.

+
+ +
+ + +
+ Sheet cell +
+ +
+
- -
+ +
@@ -90,6 +151,10 @@ const codeText = ref('') const style = ref('card') const codetype = ref('qr') const encodes = ref('assetpage') +// Output target: 'single' standalone label, or 'uline-sheet' placing this one +// label at sheetCell (1-6) of a ULINE 6-up sheet. +const outputMode = ref('single') +const sheetCell = ref(1) const hasLocation = computed(() => hasLocationType(assettype)) @@ -168,7 +233,9 @@ onMounted(async () => { } }) -watch([style, codetype, encodes], renderCode) +// outputMode/sheetCell re-mount the live label element, so redraw the barcode +// into the newly rendered svg (the qr path is just an src, unaffected). +watch([style, codetype, encodes, outputMode, sheetCell], renderCode) function print() { window.print() @@ -176,7 +243,11 @@ function print() {