diff --git a/src/features/stock/stock-detail-page.js b/src/features/stock/stock-detail-page.js index a577ae7..cf3fd6e 100644 --- a/src/features/stock/stock-detail-page.js +++ b/src/features/stock/stock-detail-page.js @@ -1,8 +1,10 @@ import { adjustStockEntry, getStockEntry, + updateStockItem, useStockItem, } from '../../api/stock.js'; +import { BrowserMultiFormatReader } from '@zxing/browser'; import { formatPrintErrorMessage, printItemLabel } from '../../api/labels.js'; import { fetchLocations } from '../../api/locations.js'; import { getRouteContext } from '../../app/router.js'; @@ -27,6 +29,10 @@ function parseDateValue(value) { return new Date(year, month - 1, day); } +function normalizeIdentifierCode(value) { + return String(value || '').replace(/\s+/g, '').trim(); +} + function expirationInfo(entry) { if (!entry?.expire_date) { return { @@ -134,6 +140,42 @@ export function renderStockDetailPage() {
+Point your camera at the barcode to fill the identifier field.
+