kelvin.yau 1 неделю назад
Родитель
Сommit
f381ba931e
1 измененных файлов: 6 добавлений и 6 удалений
  1. +6
    -6
      src/components/DoSearch/batchReleaseReplenishmentHtml.ts

+ 6
- 6
src/components/DoSearch/batchReleaseReplenishmentHtml.ts Просмотреть файл

@@ -61,16 +61,16 @@ export function deriveReplenishmentFetchParams(
}; };
} }


const shopTokens = [
...new Set(dosForRelease.map(shopTokenFromDoRow).filter(Boolean)),
];
const trucks = [
...new Set(
const shopTokens = Array.from(
new Set(dosForRelease.map(shopTokenFromDoRow).filter(Boolean)),
);
const trucks = Array.from(
new Set(
dosForRelease dosForRelease
.map((row) => row.truckLanceCode?.trim()) .map((row) => row.truckLanceCode?.trim())
.filter((value): value is string => Boolean(value)), .filter((value): value is string => Boolean(value)),
), ),
];
);


if (shopTokens.length === 1 && trucks.length === 1) { if (shopTokens.length === 1 && trucks.length === 1) {
return { shopName: shopTokens[0], truckLaneCode: trucks[0] }; return { shopName: shopTokens[0], truckLaneCode: trucks[0] };


Загрузка…
Отмена
Сохранить