Skip to content

Commit

Permalink
fix: Sku do not track
Browse files Browse the repository at this point in the history
  • Loading branch information
acasazza committed May 10, 2022
1 parent c34ab5b commit b562360
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/components/ShipmentsContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,13 @@ const ShipmentsContainer: React.FunctionComponent<ShipmentsContainerProps> = (
.filter(({ item_type }) => item_type === 'skus')
.map((lineItem) => {
// @ts-ignore
return !(lineItem.item?.inventory?.quantity >= lineItem?.quantity)
? false
: // @ts-ignore
lineItem.item?.do_not_ship ||
// @ts-ignore
lineItem.item?.inventory?.available
return lineItem.item?.do_not_ship ||
// @ts-ignore
lineItem.item?.do_not_track ||
// @ts-ignore
lineItem.item?.inventory?.quantity >= lineItem?.quantity
? true
: false
})
if (hasStocks.includes(false)) {
setShipmentErrors(
Expand Down

0 comments on commit b562360

Please sign in to comment.