u
This commit is contained in:
@@ -18,6 +18,7 @@ import MenuItem from '@mui/material/MenuItem';
|
||||
import Tab from '@mui/material/Tab';
|
||||
import Tabs from '@mui/material/Tabs';
|
||||
import TextInput from '../../TextInput';
|
||||
import ArticleSearch from '../ArticleSearch';
|
||||
import Tooltip from '@mui/material/Tooltip';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import AddIcon from '@mui/icons-material/Add';
|
||||
@@ -611,6 +612,7 @@ export default class ArticleViewLists extends PureComponent {
|
||||
};
|
||||
|
||||
renderStuecklisteContent(stuecklisteItems, selectableOtherArticles, isStueckliste = true) {
|
||||
const { article } = this.props;
|
||||
const { busy, stuecklisteTargetArticle, stuecklisteCount } = this.state;
|
||||
return (
|
||||
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 0.75, flex: 1, minHeight: 0 }}>
|
||||
@@ -663,23 +665,14 @@ export default class ArticleViewLists extends PureComponent {
|
||||
|
||||
{/* Add Component Row */}
|
||||
<Box sx={{ display: 'flex', alignItems: 'center', gap: 0.5, mt: 0.5 }}>
|
||||
<Autocomplete
|
||||
<ArticleSearch
|
||||
size="small"
|
||||
options={selectableOtherArticles}
|
||||
label="Artikel"
|
||||
placeholder="Artikel suchen..."
|
||||
value={stuecklisteTargetArticle}
|
||||
disabled={busy}
|
||||
onChange={(_e, val) => this.setState({ stuecklisteTargetArticle: val })}
|
||||
getOptionLabel={(opt) =>
|
||||
typeof opt === 'string' ? opt : (opt ? `${opt.sku} - ${opt.name || ''}` : '')
|
||||
}
|
||||
isOptionEqualToValue={(opt, val) => opt?.sku === val?.sku}
|
||||
renderInput={(params) => (
|
||||
<TextInput
|
||||
{...params}
|
||||
label="Artikel"
|
||||
placeholder="Artikel suchen..."
|
||||
/>
|
||||
)}
|
||||
excludeSkus={[article?.sku, ...stuecklisteItems.map((item) => item.component_sku || item.sku)]}
|
||||
onSelect={(val) => this.setState({ stuecklisteTargetArticle: val })}
|
||||
sx={{ flex: 1, minWidth: 0 }}
|
||||
/>
|
||||
|
||||
@@ -807,6 +800,7 @@ export default class ArticleViewLists extends PureComponent {
|
||||
}
|
||||
|
||||
renderOptionsContent(optionsItems, selectableOtherArticles, hasOptions = true) {
|
||||
const { article } = this.props;
|
||||
const { busy, optionTargetArticle, optionCount, optionMandated } = this.state;
|
||||
return (
|
||||
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 0.75, flex: 1, minHeight: 0 }}>
|
||||
@@ -860,23 +854,14 @@ export default class ArticleViewLists extends PureComponent {
|
||||
|
||||
{/* Add Option Row */}
|
||||
<Box sx={{ display: 'flex', alignItems: 'center', gap: 0.5, mt: 0.5 }}>
|
||||
<Autocomplete
|
||||
<ArticleSearch
|
||||
size="small"
|
||||
options={selectableOtherArticles}
|
||||
label="Option"
|
||||
placeholder="Option suchen..."
|
||||
value={optionTargetArticle}
|
||||
disabled={busy}
|
||||
onChange={(_e, val) => this.setState({ optionTargetArticle: val })}
|
||||
getOptionLabel={(opt) =>
|
||||
typeof opt === 'string' ? opt : (opt ? `${opt.sku} - ${opt.name || ''}` : '')
|
||||
}
|
||||
isOptionEqualToValue={(opt, val) => opt?.sku === val?.sku}
|
||||
renderInput={(params) => (
|
||||
<TextInput
|
||||
{...params}
|
||||
label="Option"
|
||||
placeholder="Option suchen..."
|
||||
/>
|
||||
)}
|
||||
excludeSkus={[article?.sku, ...optionsItems.map((item) => item.component_sku || item.sku)]}
|
||||
onSelect={(val) => this.setState({ optionTargetArticle: val })}
|
||||
sx={{ flex: 1, minWidth: 0 }}
|
||||
/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user