Security hardening, multi-site portability, and a documentation and API-surface sweep
This commit is contained in:
@@ -31,7 +31,7 @@ import { useRoute } from 'vue-router'
|
||||
import { machinesApi } from '../../api'
|
||||
import { getBadgeLogo } from '@/utils/siteSettings'
|
||||
import { withBase } from '@/utils/basePath'
|
||||
import JsBarcode from 'jsbarcode'
|
||||
import { barcodeInto } from '@/utils/codes'
|
||||
|
||||
const route = useRoute()
|
||||
const loading = ref(true)
|
||||
@@ -75,12 +75,10 @@ onMounted(async () => {
|
||||
function generateBarcode() {
|
||||
if (!barcodeEl.value || !machine.value) return
|
||||
try {
|
||||
JsBarcode(barcodeEl.value, machine.value.assetnumber, {
|
||||
format: 'CODE39',
|
||||
displayValue: false,
|
||||
width: 2,
|
||||
height: 70,
|
||||
margin: 0
|
||||
// CODE39, not the CODE128 default: the badge readers predate the
|
||||
// shop-floor scanners and only decode CODE39.
|
||||
barcodeInto(barcodeEl.value, machine.value.assetnumber, {
|
||||
format: 'CODE39', height: 70,
|
||||
})
|
||||
} catch (e) {
|
||||
console.error('Barcode generation error:', e)
|
||||
|
||||
Reference in New Issue
Block a user