diff --git a/frontend/src/utils/codes.js b/frontend/src/utils/codes.js index cdeba7c7..ff3200b4 100644 --- a/frontend/src/utils/codes.js +++ b/frontend/src/utils/codes.js @@ -41,6 +41,7 @@ export const LABEL_PRESETS = [ // CODE128 is what the scanners on the floor are configured for, and a label // carries its text separately, so the barcode never renders its own. +// Code 39 available as an alternative for compatibility with legacy systems. export const BARCODE_DEFAULTS = { format: 'CODE128', displayValue: false, @@ -130,7 +131,12 @@ export function barcodeInto(element, text, options = {}) { return element } -/** A barcode as an SVG data URI, for pages that print an . */ +/** + * A barcode as an SVG data URI, for pages that print an . + * + * @param {string} text - Content to encode + * @param {object} options - JsBarcode options (format, width, height, etc.) + */ export function barcodeSvgDataUri(text, options = {}) { const element = document.createElementNS('http://www.w3.org/2000/svg', 'svg') barcodeInto(element, text, options) diff --git a/plugins/tools/frontend/views/CodeGenerator.vue b/plugins/tools/frontend/views/CodeGenerator.vue index eb3266e9..2948fcee 100644 --- a/plugins/tools/frontend/views/CodeGenerator.vue +++ b/plugins/tools/frontend/views/CodeGenerator.vue @@ -40,6 +40,7 @@