| | |
| | | |
| | | const OutStockAnfme = React.memo(function OutStockAnfme(props) { |
| | | const { value } = props; |
| | | const num = Number(value); |
| | | const hasStock = typeof num === 'number' && !Number.isNaN(num) && num > 1e-6; |
| | | return ( |
| | | value > 0 ? |
| | | hasStock ? ( |
| | | <Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}> |
| | | <span>{value}</span> |
| | | </Box> |
| | | : |
| | | ) : ( |
| | | <Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}> |
| | | <span style={{ color: 'red' }}>{translate('common.edit.title.insuffInventory')}</span> |
| | | </Box> |
| | | ) |
| | | ); |
| | | }); |
| | | |