|
|
|
@@ -59,7 +59,6 @@ type SearchParamNames = keyof SearchQuery; |
|
|
|
const InventorySearch: React.FC<Props> = ({ inventories, printerCombo }) => { |
|
|
|
const { t, i18n } = useTranslation(['inventory', 'common', 'item']); |
|
|
|
|
|
|
|
// #region agent log |
|
|
|
useEffect(() => { |
|
|
|
fetch('http://127.0.0.1:7242/ingest/8c332e19-29c4-4171-9317-8619340856a2', { |
|
|
|
method: 'POST', |
|
|
|
@@ -82,7 +81,7 @@ const InventorySearch: React.FC<Props> = ({ inventories, printerCombo }) => { |
|
|
|
}), |
|
|
|
}).catch(() => {}); |
|
|
|
}, [i18n.language, t]); |
|
|
|
// #endregion |
|
|
|
|
|
|
|
|
|
|
|
// Inventory |
|
|
|
const [filteredInventories, setFilteredInventories] = useState<InventoryResult[]>([]); |
|
|
|
@@ -432,7 +431,6 @@ const InventorySearch: React.FC<Props> = ({ inventories, printerCombo }) => { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// Try to split label into code and name if possible: "CODE - Name" |
|
|
|
const rawLabel = openingSelectedItem.label ?? ''; |
|
|
|
const [codePart, ...nameParts] = rawLabel.split(' - '); |
|
|
|
const itemCode = codePart?.trim() || rawLabel; |
|
|
|
|