diff --git a/src/components/article/boxes/ArticleViewStock.jsx b/src/components/article/boxes/ArticleViewStock.jsx index c6e49ba..bcc9712 100644 --- a/src/components/article/boxes/ArticleViewStock.jsx +++ b/src/components/article/boxes/ArticleViewStock.jsx @@ -5,7 +5,6 @@ import WarehouseIcon from '@mui/icons-material/Warehouse'; import EditOutlinedIcon from '@mui/icons-material/EditOutlined'; import LocalShippingOutlinedIcon from '@mui/icons-material/LocalShippingOutlined'; import Tooltip from '@mui/material/Tooltip'; -import Chip from '@mui/material/Chip'; import { PanelTile } from 'dashgui/panels'; import { formatStock } from '../searchFormat'; import ArticleStockAdjustDialog from '../ArticleStockAdjustDialog'; @@ -145,40 +144,6 @@ export default class ArticleViewStock extends PureComponent { this.setState({ adjustOpen: false }); } - renderIncomingChip(totalIncoming, incomingItems, unit) { - const tooltipText = `${formatStock(totalIncoming)}${unit ? ` ${unit}` : ''} im Zulauf aus ${ - incomingItems.length === 1 - ? 'einer offenen Lieferung' - : `${incomingItems.length} offenen Lieferungen` - }`; - - return ( - - - } - label={`+${formatStock(totalIncoming)}${unit ? ` ${unit}` : ''} im Zulauf`} - onClick={(e) => e.stopPropagation()} - sx={{ - fontWeight: 600, - fontSize: '0.75rem', - height: 22, - backgroundColor: VEIL_PANEL, - cursor: 'default', - '& .MuiChip-icon': { - color: 'text.secondary', - ml: '6px', - }, - }} - /> - - ); - } - render() { const { article: articleData } = this.props; const { adjustOpen } = this.state; @@ -280,8 +245,8 @@ export default class ArticleViewStock extends PureComponent { {isParent ? ( - - {anyVariantTracksStock || totalVariantsStock > 0 ? ( + anyVariantTracksStock || totalVariantsStock > 0 ? ( + Alle Varianten zusammen: {formatStock(totalVariantsStock)} - ) : null} - {hasIncoming ? ( - - {this.renderIncomingChip(totalIncoming, incomingItems, unit)} - - ) : null} - + + ) : null ) : isStueckliste ? ( - - - - - 0 ? 'text.primary' : 'text.secondary', - }} - > - {formatStock(totalStock)} - - {unit ? ( - - {unit} - - ) : null} - - - Virtueller Bestand (aus Komponenten) - - - - {hasIncoming ? ( - - {this.renderIncomingChip(totalIncoming, incomingItems, unit)} - - ) : null} - - ) : isTrackStock ? ( - - - + + + ) : null} - - {hasIncoming ? ( - - {this.renderIncomingChip(totalIncoming, incomingItems, unit)} - - ) : null} - - ) : ( - + + Virtueller Bestand (aus Komponenten) + + + + ) : isTrackStock ? ( + 0 ? 'text.primary' : 'text.secondary', }} > - Keine Erfassung - - - Bestand wird nicht überwacht + {formatStock(totalStock)} + {unit ? ( + + {unit} + + ) : null} - {hasIncoming ? ( - - {this.renderIncomingChip(totalIncoming, incomingItems, unit)} - - ) : null} + + ) : ( + + + Keine Erfassung + + + Bestand wird nicht überwacht + )}