瀏覽代碼

no message

MergeProblem1
kelvin.yau 3 天之前
父節點
當前提交
93e61dddbc
共有 1 個檔案被更改,包括 1 行新增3 行删除
  1. +1
    -3
      src/components/InventorySearch/InventorySearch.tsx

+ 1
- 3
src/components/InventorySearch/InventorySearch.tsx 查看文件

@@ -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;


Loading…
取消
儲存