Browse Source

no message

MergeProblem1
kelvin.yau 3 days ago
parent
commit
93e61dddbc
1 changed files with 1 additions and 3 deletions
  1. +1
    -3
      src/components/InventorySearch/InventorySearch.tsx

+ 1
- 3
src/components/InventorySearch/InventorySearch.tsx View File

@@ -59,7 +59,6 @@ type SearchParamNames = keyof SearchQuery;
const InventorySearch: React.FC<Props> = ({ inventories, printerCombo }) => { const InventorySearch: React.FC<Props> = ({ inventories, printerCombo }) => {
const { t, i18n } = useTranslation(['inventory', 'common', 'item']); const { t, i18n } = useTranslation(['inventory', 'common', 'item']);


// #region agent log
useEffect(() => { useEffect(() => {
fetch('http://127.0.0.1:7242/ingest/8c332e19-29c4-4171-9317-8619340856a2', { fetch('http://127.0.0.1:7242/ingest/8c332e19-29c4-4171-9317-8619340856a2', {
method: 'POST', method: 'POST',
@@ -82,7 +81,7 @@ const InventorySearch: React.FC<Props> = ({ inventories, printerCombo }) => {
}), }),
}).catch(() => {}); }).catch(() => {});
}, [i18n.language, t]); }, [i18n.language, t]);
// #endregion


// Inventory // Inventory
const [filteredInventories, setFilteredInventories] = useState<InventoryResult[]>([]); const [filteredInventories, setFilteredInventories] = useState<InventoryResult[]>([]);
@@ -432,7 +431,6 @@ const InventorySearch: React.FC<Props> = ({ inventories, printerCombo }) => {
return; return;
} }


// Try to split label into code and name if possible: "CODE - Name"
const rawLabel = openingSelectedItem.label ?? ''; const rawLabel = openingSelectedItem.label ?? '';
const [codePart, ...nameParts] = rawLabel.split(' - '); const [codePart, ...nameParts] = rawLabel.split(' - ');
const itemCode = codePart?.trim() || rawLabel; const itemCode = codePart?.trim() || rawLabel;


Loading…
Cancel
Save