mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-20 14:54:15 +01:00
(bug) product stock status
This commit is contained in:
parent
ac671ea26d
commit
c7559e3857
@ -66,7 +66,7 @@ export const StoreProductItem: React.FC<StoreProductItemProps> = ({ product, car
|
||||
* Return product's stock status
|
||||
*/
|
||||
const productStockStatus = (product: Product) => {
|
||||
if (product.stock.external === 0) {
|
||||
if (product.stock.external < (product.quantity_min || 1)) {
|
||||
return <span>{t('app.public.store_product_item.out_of_stock')}</span>;
|
||||
}
|
||||
if (product.low_stock_threshold && product.stock.external < product.low_stock_threshold) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user