u
This commit is contained in:
@@ -11,7 +11,7 @@ import IconButton from '@mui/material/IconButton';
|
||||
import InputAdornment from '@mui/material/InputAdornment';
|
||||
import LinearProgress from '@mui/material/LinearProgress';
|
||||
import Skeleton from '@mui/material/Skeleton';
|
||||
import TextField from '@mui/material/TextField';
|
||||
import TextInput from '../TextInput';
|
||||
import Tooltip from '@mui/material/Tooltip';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import Chip from '@mui/material/Chip';
|
||||
@@ -358,9 +358,9 @@ export default class ArticleImageSearchDialog extends PureComponent {
|
||||
}}
|
||||
sx={{ display: 'flex', alignItems: 'center', gap: 1, mb: 1 }}
|
||||
>
|
||||
<TextField
|
||||
size="small"
|
||||
<TextInput
|
||||
fullWidth
|
||||
label="Suchbegriff"
|
||||
value={query}
|
||||
disabled={isSearching || Boolean(processingId)}
|
||||
onChange={(e) => this.setState({ query: e.target.value })}
|
||||
|
||||
@@ -9,7 +9,7 @@ import DialogContent from '@mui/material/DialogContent';
|
||||
import DialogTitle from '@mui/material/DialogTitle';
|
||||
import IconButton from '@mui/material/IconButton';
|
||||
import InputAdornment from '@mui/material/InputAdornment';
|
||||
import TextField from '@mui/material/TextField';
|
||||
import TextInput from '../TextInput';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import { formatPriceAmount, parsePriceInput } from '../../utils/price';
|
||||
|
||||
@@ -111,27 +111,24 @@ class ArticlePriceTiersDialog extends Component {
|
||||
alignItems: 'flex-start',
|
||||
}}
|
||||
>
|
||||
<TextField
|
||||
<TextInput
|
||||
label="Ab Menge"
|
||||
value={tier.minmultiplier}
|
||||
onChange={(event) =>
|
||||
this.handleChange(index, 'minmultiplier', event.target.value)
|
||||
}
|
||||
size="small"
|
||||
error={tier.minmultiplier !== '' && mult == null}
|
||||
slotProps={{
|
||||
inputLabel: { shrink: true },
|
||||
htmlInput: { inputMode: 'numeric' },
|
||||
}}
|
||||
sx={{ width: 120 }}
|
||||
/>
|
||||
<TextField
|
||||
<TextInput
|
||||
label="Brutto"
|
||||
value={tier.gross}
|
||||
onChange={(event) =>
|
||||
this.handleChange(index, 'gross', event.target.value)
|
||||
}
|
||||
size="small"
|
||||
fullWidth
|
||||
error={tier.gross !== '' && gross == null}
|
||||
slotProps={{
|
||||
|
||||
@@ -16,7 +16,7 @@ import InputLabel from '@mui/material/InputLabel';
|
||||
import MenuItem from '@mui/material/MenuItem';
|
||||
import Select from '@mui/material/Select';
|
||||
import Stack from '@mui/material/Stack';
|
||||
import TextField from '@mui/material/TextField';
|
||||
import TextInput from '../TextInput';
|
||||
import ToggleButton from '@mui/material/ToggleButton';
|
||||
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
|
||||
import Typography from '@mui/material/Typography';
|
||||
@@ -480,9 +480,8 @@ export default class ArticleStockAdjustDialog extends PureComponent {
|
||||
|
||||
{/* Amount input */}
|
||||
{mode === 'diff' ? (
|
||||
<TextField
|
||||
<TextInput
|
||||
fullWidth
|
||||
size="small"
|
||||
label="Menge (+ für Zugang, - für Abgang)"
|
||||
type="number"
|
||||
value={diffValue}
|
||||
@@ -509,9 +508,8 @@ export default class ArticleStockAdjustDialog extends PureComponent {
|
||||
}
|
||||
/>
|
||||
) : (
|
||||
<TextField
|
||||
<TextInput
|
||||
fullWidth
|
||||
size="small"
|
||||
label="Tatsächlicher Zählbestand (Ist-Bestand)"
|
||||
type="number"
|
||||
value={targetValue}
|
||||
@@ -560,9 +558,8 @@ export default class ArticleStockAdjustDialog extends PureComponent {
|
||||
|
||||
{/* Reason / Memo */}
|
||||
<Box>
|
||||
<TextField
|
||||
<TextInput
|
||||
fullWidth
|
||||
size="small"
|
||||
label="Grund / Buchungstext"
|
||||
value={reason}
|
||||
onChange={this.handleReasonChange}
|
||||
|
||||
@@ -9,7 +9,7 @@ import DialogTitle from '@mui/material/DialogTitle';
|
||||
import InputAdornment from '@mui/material/InputAdornment';
|
||||
import MenuItem from '@mui/material/MenuItem';
|
||||
import Stack from '@mui/material/Stack';
|
||||
import TextField from '@mui/material/TextField';
|
||||
import TextInput from '../TextInput';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import { companyTaxRateOptions } from '../../utils/articleDetail';
|
||||
import { formatPriceAmount, parsePriceInput } from '../../utils/price';
|
||||
@@ -135,7 +135,7 @@ export default class ArticleSupplierDialog extends PureComponent {
|
||||
value={selectedSupplier}
|
||||
onChange={(_e, val) => this.setState({ entityId: val ? val.id : null })}
|
||||
renderInput={(params) => (
|
||||
<TextField
|
||||
<TextInput
|
||||
{...params}
|
||||
label="Lieferant auswählen"
|
||||
required
|
||||
@@ -146,7 +146,7 @@ export default class ArticleSupplierDialog extends PureComponent {
|
||||
/>
|
||||
)}
|
||||
|
||||
<TextField
|
||||
<TextInput
|
||||
label="Lieferanten-Artikelnummer (SKU)"
|
||||
value={sku}
|
||||
onChange={(e) => this.setState({ sku: e.target.value })}
|
||||
@@ -155,22 +155,22 @@ export default class ArticleSupplierDialog extends PureComponent {
|
||||
/>
|
||||
|
||||
<Stack direction={{ xs: 'column', sm: 'row' }} spacing={2}>
|
||||
<TextField
|
||||
<TextInput
|
||||
label="Verpackungseinheit (VPE / PU)"
|
||||
type="number"
|
||||
required
|
||||
error={!puValid}
|
||||
helperText={!puValid ? 'Muss größer als 0 sein' : undefined}
|
||||
inputProps={{ step: 'any', min: 0.0001 }}
|
||||
slotProps={{ htmlInput: { step: 'any', min: 0.0001 } }}
|
||||
value={pu}
|
||||
onChange={(e) => this.setState({ pu: e.target.value })}
|
||||
sx={{ flex: 1 }}
|
||||
/>
|
||||
|
||||
<TextField
|
||||
<TextInput
|
||||
label="Bestand beim Lieferanten"
|
||||
type="number"
|
||||
inputProps={{ step: 'any', min: 0 }}
|
||||
slotProps={{ htmlInput: { step: 'any', min: 0 } }}
|
||||
value={stock}
|
||||
onChange={(e) => this.setState({ stock: e.target.value })}
|
||||
sx={{ flex: 1 }}
|
||||
@@ -179,7 +179,7 @@ export default class ArticleSupplierDialog extends PureComponent {
|
||||
</Stack>
|
||||
|
||||
<Stack direction={{ xs: 'column', sm: 'row' }} spacing={2}>
|
||||
<TextField
|
||||
<TextInput
|
||||
label="Einkaufspreis Netto"
|
||||
value={netPrice}
|
||||
onChange={(e) => this.setState({ netPrice: e.target.value })}
|
||||
@@ -193,7 +193,7 @@ export default class ArticleSupplierDialog extends PureComponent {
|
||||
helperText="Optionaler Einkaufspreis (EK)"
|
||||
/>
|
||||
|
||||
<TextField
|
||||
<TextInput
|
||||
select
|
||||
label="MwSt.-Satz"
|
||||
value={taxRate}
|
||||
@@ -208,7 +208,7 @@ export default class ArticleSupplierDialog extends PureComponent {
|
||||
{rate} %
|
||||
</MenuItem>
|
||||
))}
|
||||
</TextField>
|
||||
</TextInput>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</DialogContent>
|
||||
|
||||
@@ -13,7 +13,7 @@ import List from '@mui/material/List';
|
||||
import ListItem from '@mui/material/ListItem';
|
||||
import ListItemButton from '@mui/material/ListItemButton';
|
||||
import ListItemText from '@mui/material/ListItemText';
|
||||
import TextField from '@mui/material/TextField';
|
||||
import TextInput from '../TextInput';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import { StorageManagerContext } from '../../api/storageManagerContext';
|
||||
import { requireObject } from '../../utils/apiShape';
|
||||
@@ -241,47 +241,38 @@ export default class ArticleUnitEditorDialog extends Component {
|
||||
</Box>
|
||||
|
||||
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 1.5 }}>
|
||||
<TextField
|
||||
<TextInput
|
||||
label="Name"
|
||||
value={form.name}
|
||||
onChange={(e) => this.handleField('name', e.target.value)}
|
||||
size="small"
|
||||
fullWidth
|
||||
disabled={busy}
|
||||
slotProps={{ inputLabel: { shrink: true } }}
|
||||
/>
|
||||
<TextField
|
||||
<TextInput
|
||||
label="Symbol"
|
||||
value={form.symbol}
|
||||
onChange={(e) => this.handleField('symbol', e.target.value)}
|
||||
size="small"
|
||||
fullWidth
|
||||
disabled={busy}
|
||||
slotProps={{ inputLabel: { shrink: true } }}
|
||||
/>
|
||||
<TextField
|
||||
<TextInput
|
||||
label="si"
|
||||
value={form.si}
|
||||
onChange={(e) => this.handleField('si', e.target.value)}
|
||||
size="small"
|
||||
fullWidth
|
||||
disabled={busy}
|
||||
slotProps={{ inputLabel: { shrink: true } }}
|
||||
/>
|
||||
<TextField
|
||||
<TextInput
|
||||
label="basesi"
|
||||
value={form.basesi}
|
||||
onChange={(e) => this.handleField('basesi', e.target.value)}
|
||||
size="small"
|
||||
fullWidth
|
||||
disabled={busy}
|
||||
slotProps={{ inputLabel: { shrink: true } }}
|
||||
/>
|
||||
<TextField
|
||||
<TextInput
|
||||
label="basesifactor"
|
||||
value={form.basesifactor}
|
||||
onChange={(e) => this.handleField('basesifactor', e.target.value)}
|
||||
size="small"
|
||||
fullWidth
|
||||
disabled={busy}
|
||||
error={
|
||||
@@ -290,7 +281,6 @@ export default class ArticleUnitEditorDialog extends Component {
|
||||
parseFactor(form.basesifactor) <= 0)
|
||||
}
|
||||
slotProps={{
|
||||
inputLabel: { shrink: true },
|
||||
htmlInput: { inputMode: 'decimal' },
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, PureComponent } from 'react';
|
||||
import Autocomplete from '@mui/material/Autocomplete';
|
||||
import TextField from '@mui/material/TextField';
|
||||
import TextInput from '../../TextInput';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import Box from '@mui/material/Box';
|
||||
import { EditablePanelTile } from 'dashgui/panels';
|
||||
@@ -86,22 +86,22 @@ class BrandEdit extends Component {
|
||||
);
|
||||
}}
|
||||
renderInput={(params) => (
|
||||
<TextField
|
||||
<TextInput
|
||||
{...params}
|
||||
inputRef={inputRef}
|
||||
size="small"
|
||||
slotProps={{
|
||||
...params.slotProps,
|
||||
input: {
|
||||
...params.slotProps?.input,
|
||||
startAdornment: matchingBrand ? (
|
||||
<InputAdornment position="start" sx={{ mr: 0.5 }}>
|
||||
<BrandThumb brand={matchingBrand} size={20} />
|
||||
</InputAdornment>
|
||||
) : (
|
||||
params.slotProps?.input?.startAdornment
|
||||
),
|
||||
},
|
||||
label="Marke"
|
||||
InputProps={{
|
||||
...params.InputProps,
|
||||
startAdornment: (
|
||||
<>
|
||||
{matchingBrand ? (
|
||||
<InputAdornment position="start" sx={{ mr: 0.5 }}>
|
||||
<BrandThumb brand={matchingBrand} size={20} />
|
||||
</InputAdornment>
|
||||
) : null}
|
||||
{params.InputProps?.startAdornment}
|
||||
</>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
@@ -182,6 +182,7 @@ export default class ArticleViewBrand extends PureComponent {
|
||||
wide={1}
|
||||
minHeight={SECOND_ROW_MIN_HEIGHT}
|
||||
color="#e9d5ff"
|
||||
contentAlignItems="flex-start"
|
||||
value={value}
|
||||
onSave={this.handleSave}
|
||||
onError={notifyError}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, PureComponent } from 'react';
|
||||
import Autocomplete from '@mui/material/Autocomplete';
|
||||
import TextField from '@mui/material/TextField';
|
||||
import TextInput from '../../TextInput';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import Box from '@mui/material/Box';
|
||||
import { EditablePanelTile } from 'dashgui/panels';
|
||||
@@ -117,18 +117,10 @@ class EansEdit extends Component {
|
||||
value={draft.eans ?? []}
|
||||
onChange={(_event, eans) => onChange({ eans })}
|
||||
renderInput={(params) => (
|
||||
<TextField
|
||||
<TextInput
|
||||
{...params}
|
||||
inputRef={inputRef}
|
||||
label="EANs (Enter zum Hinzufügen)"
|
||||
size="small"
|
||||
slotProps={{
|
||||
...params.slotProps,
|
||||
inputLabel: {
|
||||
...params.slotProps?.inputLabel,
|
||||
shrink: true,
|
||||
},
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -11,14 +11,11 @@ import DialogActions from '@mui/material/DialogActions';
|
||||
import DialogContent from '@mui/material/DialogContent';
|
||||
import DialogContentText from '@mui/material/DialogContentText';
|
||||
import DialogTitle from '@mui/material/DialogTitle';
|
||||
import FormControl from '@mui/material/FormControl';
|
||||
import FormControlLabel from '@mui/material/FormControlLabel';
|
||||
import IconButton from '@mui/material/IconButton';
|
||||
import InputLabel from '@mui/material/InputLabel';
|
||||
import Link from '@mui/material/Link';
|
||||
import MenuItem from '@mui/material/MenuItem';
|
||||
import Select from '@mui/material/Select';
|
||||
import TextField from '@mui/material/TextField';
|
||||
import TextInput from '../../TextInput';
|
||||
import Tooltip from '@mui/material/Tooltip';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import AddIcon from '@mui/icons-material/Add';
|
||||
@@ -638,21 +635,18 @@ export default class ArticleViewLists extends PureComponent {
|
||||
}
|
||||
isOptionEqualToValue={(opt, val) => opt.sku === val?.sku}
|
||||
renderInput={(params) => (
|
||||
<TextField
|
||||
<TextInput
|
||||
{...params}
|
||||
label="Artikel"
|
||||
placeholder="Artikel suchen..."
|
||||
sx={{
|
||||
bgcolor: 'background.paper',
|
||||
'& .MuiInputBase-input': { py: 0.5, px: 1, fontSize: '0.82rem' },
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
sx={{ flex: 1, minWidth: 0 }}
|
||||
/>
|
||||
|
||||
<TextField
|
||||
size="small"
|
||||
<TextInput
|
||||
type="number"
|
||||
label="Menge"
|
||||
value={stuecklisteCount}
|
||||
disabled={busy}
|
||||
onChange={(e) =>
|
||||
@@ -660,11 +654,13 @@ export default class ArticleViewLists extends PureComponent {
|
||||
stuecklisteCount: Math.max(1, parseInt(e.target.value, 10) || 1),
|
||||
})
|
||||
}
|
||||
inputProps={{
|
||||
min: 1,
|
||||
style: { padding: '4px 6px', textAlign: 'center', fontSize: '0.82rem' },
|
||||
slotProps={{
|
||||
htmlInput: {
|
||||
min: 1,
|
||||
style: { textAlign: 'center' },
|
||||
},
|
||||
}}
|
||||
sx={{ width: 44, bgcolor: 'background.paper', flexShrink: 0 }}
|
||||
sx={{ width: 72, flexShrink: 0 }}
|
||||
/>
|
||||
|
||||
<Tooltip title="Komponente hinzufügen">
|
||||
@@ -809,21 +805,17 @@ export default class ArticleViewLists extends PureComponent {
|
||||
}
|
||||
isOptionEqualToValue={(opt, val) => opt.sku === val?.sku}
|
||||
renderInput={(params) => (
|
||||
<TextField
|
||||
<TextInput
|
||||
{...params}
|
||||
label="Artikel"
|
||||
placeholder="Artikel suchen..."
|
||||
sx={{
|
||||
bgcolor: 'background.paper',
|
||||
'& .MuiInputBase-input': { py: 0.5, px: 1, fontSize: '0.82rem' },
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
sx={{ width: '100%' }}
|
||||
/>
|
||||
|
||||
<Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 1 }}>
|
||||
<TextField
|
||||
size="small"
|
||||
<TextInput
|
||||
type="number"
|
||||
label="Menge"
|
||||
value={stuecklisteCount}
|
||||
@@ -833,11 +825,13 @@ export default class ArticleViewLists extends PureComponent {
|
||||
stuecklisteCount: Math.max(1, parseInt(e.target.value, 10) || 1),
|
||||
})
|
||||
}
|
||||
inputProps={{
|
||||
min: 1,
|
||||
style: { padding: '4px 6px', textAlign: 'center', fontSize: '0.82rem' },
|
||||
slotProps={{
|
||||
htmlInput: {
|
||||
min: 1,
|
||||
style: { textAlign: 'center' },
|
||||
},
|
||||
}}
|
||||
sx={{ width: 70 }}
|
||||
sx={{ width: 72 }}
|
||||
/>
|
||||
|
||||
<Box sx={{ display: 'flex', gap: 0.75 }}>
|
||||
@@ -917,21 +911,18 @@ export default class ArticleViewLists extends PureComponent {
|
||||
}
|
||||
isOptionEqualToValue={(opt, val) => opt.sku === val?.sku}
|
||||
renderInput={(params) => (
|
||||
<TextField
|
||||
<TextInput
|
||||
{...params}
|
||||
label="Option"
|
||||
placeholder="Option suchen..."
|
||||
sx={{
|
||||
bgcolor: 'background.paper',
|
||||
'& .MuiInputBase-input': { py: 0.5, px: 1, fontSize: '0.82rem' },
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
sx={{ flex: 1, minWidth: 0 }}
|
||||
/>
|
||||
|
||||
<TextField
|
||||
size="small"
|
||||
<TextInput
|
||||
type="number"
|
||||
label="Menge"
|
||||
value={optionCount}
|
||||
disabled={busy}
|
||||
onChange={(e) =>
|
||||
@@ -939,11 +930,13 @@ export default class ArticleViewLists extends PureComponent {
|
||||
optionCount: Math.max(1, parseInt(e.target.value, 10) || 1),
|
||||
})
|
||||
}
|
||||
inputProps={{
|
||||
min: 1,
|
||||
style: { padding: '4px 6px', textAlign: 'center', fontSize: '0.82rem' },
|
||||
slotProps={{
|
||||
htmlInput: {
|
||||
min: 1,
|
||||
style: { textAlign: 'center' },
|
||||
},
|
||||
}}
|
||||
sx={{ width: 44, bgcolor: 'background.paper', flexShrink: 0 }}
|
||||
sx={{ width: 72, flexShrink: 0 }}
|
||||
/>
|
||||
|
||||
<Tooltip title="Option hinzufügen">
|
||||
@@ -1119,21 +1112,17 @@ export default class ArticleViewLists extends PureComponent {
|
||||
}
|
||||
isOptionEqualToValue={(opt, val) => opt.sku === val?.sku}
|
||||
renderInput={(params) => (
|
||||
<TextField
|
||||
<TextInput
|
||||
{...params}
|
||||
label="Option"
|
||||
placeholder="Option suchen..."
|
||||
sx={{
|
||||
bgcolor: 'background.paper',
|
||||
'& .MuiInputBase-input': { py: 0.5, px: 1, fontSize: '0.82rem' },
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
sx={{ width: '100%' }}
|
||||
/>
|
||||
|
||||
<Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 1 }}>
|
||||
<TextField
|
||||
size="small"
|
||||
<TextInput
|
||||
type="number"
|
||||
label="Menge"
|
||||
value={optionCount}
|
||||
@@ -1143,11 +1132,13 @@ export default class ArticleViewLists extends PureComponent {
|
||||
optionCount: Math.max(1, parseInt(e.target.value, 10) || 1),
|
||||
})
|
||||
}
|
||||
inputProps={{
|
||||
min: 1,
|
||||
style: { padding: '4px 6px', textAlign: 'center', fontSize: '0.82rem' },
|
||||
slotProps={{
|
||||
htmlInput: {
|
||||
min: 1,
|
||||
style: { textAlign: 'center' },
|
||||
},
|
||||
}}
|
||||
sx={{ width: 70 }}
|
||||
sx={{ width: 72 }}
|
||||
/>
|
||||
|
||||
<FormControlLabel
|
||||
@@ -1231,34 +1222,27 @@ export default class ArticleViewLists extends PureComponent {
|
||||
Alle vorhandenen Merkmale sind diesem Artikel bereits zugewiesen.
|
||||
</Typography>
|
||||
) : (
|
||||
<FormControl size="small" fullWidth>
|
||||
<InputLabel id="activate-attr-label" sx={{ fontSize: '0.8rem' }}>
|
||||
Merkmal für Varianten
|
||||
</InputLabel>
|
||||
<Select
|
||||
labelId="activate-attr-label"
|
||||
label="Merkmal für Varianten"
|
||||
value={selectedAttributeId}
|
||||
size="small"
|
||||
onChange={(e) => this.setState({ selectedAttributeId: e.target.value })}
|
||||
sx={{ fontSize: '0.82rem', height: 32 }}
|
||||
>
|
||||
{attributes.map((a) => {
|
||||
const isAssigned = assignedAttributeIds.has(a.id);
|
||||
return (
|
||||
<MenuItem
|
||||
key={a.id}
|
||||
value={a.id}
|
||||
disabled={isAssigned}
|
||||
sx={{ fontSize: '0.82rem' }}
|
||||
>
|
||||
{a.name}
|
||||
{isAssigned ? ' (bereits zugewiesen)' : ''}
|
||||
</MenuItem>
|
||||
);
|
||||
})}
|
||||
</Select>
|
||||
</FormControl>
|
||||
<TextInput
|
||||
select
|
||||
fullWidth
|
||||
label="Merkmal für Varianten"
|
||||
value={selectedAttributeId}
|
||||
onChange={(e) => this.setState({ selectedAttributeId: e.target.value })}
|
||||
>
|
||||
{attributes.map((a) => {
|
||||
const isAssigned = assignedAttributeIds.has(a.id);
|
||||
return (
|
||||
<MenuItem
|
||||
key={a.id}
|
||||
value={a.id}
|
||||
disabled={isAssigned}
|
||||
>
|
||||
{a.name}
|
||||
{isAssigned ? ' (bereits zugewiesen)' : ''}
|
||||
</MenuItem>
|
||||
);
|
||||
})}
|
||||
</TextInput>
|
||||
)}
|
||||
|
||||
<Box sx={{ display: 'flex', gap: 0.75, justifyContent: 'flex-end' }}>
|
||||
@@ -1475,8 +1459,8 @@ export default class ArticleViewLists extends PureComponent {
|
||||
{/* Add Child Variant Row */}
|
||||
<Box sx={{ display: 'flex', alignItems: 'center', gap: 0.5, mt: 0.5 }}>
|
||||
{isCustomChildValue || availableFatherValues.length === 0 ? (
|
||||
<TextField
|
||||
size="small"
|
||||
<TextInput
|
||||
label="Neuer Wert"
|
||||
placeholder="Neuer Wert..."
|
||||
value={newChildText}
|
||||
disabled={busy}
|
||||
@@ -1487,38 +1471,26 @@ export default class ArticleViewLists extends PureComponent {
|
||||
void this.handleAddChild();
|
||||
}
|
||||
}}
|
||||
sx={{
|
||||
flex: 1,
|
||||
minWidth: 0,
|
||||
bgcolor: 'background.paper',
|
||||
'& .MuiInputBase-input': { py: 0.5, px: 1, fontSize: '0.82rem' },
|
||||
}}
|
||||
sx={{ flex: 1, minWidth: 0 }}
|
||||
/>
|
||||
) : (
|
||||
<FormControl size="small" sx={{ flex: 1, minWidth: 0 }}>
|
||||
<Select
|
||||
size="small"
|
||||
value={selectedChildValueId}
|
||||
displayEmpty
|
||||
disabled={busy}
|
||||
onChange={(e) => this.setState({ selectedChildValueId: e.target.value })}
|
||||
sx={{
|
||||
bgcolor: 'background.paper',
|
||||
fontSize: '0.82rem',
|
||||
height: 32,
|
||||
'& .MuiSelect-select': { py: 0.5, px: 1 },
|
||||
}}
|
||||
>
|
||||
<MenuItem value="" disabled>
|
||||
<em>Variante wählen...</em>
|
||||
<TextInput
|
||||
select
|
||||
label="Variante"
|
||||
value={selectedChildValueId}
|
||||
disabled={busy}
|
||||
onChange={(e) => this.setState({ selectedChildValueId: e.target.value })}
|
||||
sx={{ flex: 1, minWidth: 0 }}
|
||||
>
|
||||
<MenuItem value="" disabled>
|
||||
<em>Variante wählen...</em>
|
||||
</MenuItem>
|
||||
{availableFatherValues.map((v) => (
|
||||
<MenuItem key={v.id} value={v.id}>
|
||||
{v.value}
|
||||
</MenuItem>
|
||||
{availableFatherValues.map((v) => (
|
||||
<MenuItem key={v.id} value={v.id} sx={{ fontSize: '0.82rem' }}>
|
||||
{v.value}
|
||||
</MenuItem>
|
||||
))}
|
||||
</Select>
|
||||
</FormControl>
|
||||
))}
|
||||
</TextInput>
|
||||
)}
|
||||
|
||||
<Tooltip title="Variante hinzufügen">
|
||||
|
||||
@@ -8,7 +8,7 @@ import MenuItem from '@mui/material/MenuItem';
|
||||
import Select from '@mui/material/Select';
|
||||
import StraightenOutlinedIcon from '@mui/icons-material/StraightenOutlined';
|
||||
import Switch from '@mui/material/Switch';
|
||||
import TextField from '@mui/material/TextField';
|
||||
import TextInput from '../../TextInput';
|
||||
import { findUnitBySi, unitLabel } from '../../../utils/units';
|
||||
|
||||
const priceUnitCornerSx = {
|
||||
@@ -73,15 +73,13 @@ export class PriceUnitRow extends Component {
|
||||
width: '100%',
|
||||
}}
|
||||
>
|
||||
<TextField
|
||||
<TextInput
|
||||
label="Menge"
|
||||
value={unitamount}
|
||||
onChange={(event) => onChangeAmount(event.target.value)}
|
||||
size="small"
|
||||
error={amountError}
|
||||
sx={{ width: 88, flexShrink: 0 }}
|
||||
slotProps={{
|
||||
inputLabel: { shrink: true },
|
||||
htmlInput: { inputMode: 'decimal' },
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -3,10 +3,7 @@ import Box from '@mui/material/Box';
|
||||
import CircularProgress from '@mui/material/CircularProgress';
|
||||
import IconButton from '@mui/material/IconButton';
|
||||
import MenuItem from '@mui/material/MenuItem';
|
||||
import Select from '@mui/material/Select';
|
||||
import FormControl from '@mui/material/FormControl';
|
||||
import InputLabel from '@mui/material/InputLabel';
|
||||
import TextField from '@mui/material/TextField';
|
||||
import TextInput from '../../TextInput';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import Chip from '@mui/material/Chip';
|
||||
import Tooltip from '@mui/material/Tooltip';
|
||||
@@ -397,51 +394,45 @@ export default class ArticleAttributesTab extends PureComponent {
|
||||
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 2 }}>
|
||||
{/* Unified Add Bar: [Merkmal ▼] [Wert ▼ / Input] [+] */}
|
||||
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
|
||||
<FormControl size="small" sx={{ minWidth: 170 }}>
|
||||
<InputLabel id="merkmal-select-label">Merkmal</InputLabel>
|
||||
<Select
|
||||
labelId="merkmal-select-label"
|
||||
value={selectedMerkmalKey}
|
||||
label="Merkmal"
|
||||
disabled={saving || merkmalOptions.length === 0}
|
||||
onChange={this.handleMerkmalChange}
|
||||
sx={{ bgcolor: 'background.paper' }}
|
||||
>
|
||||
{merkmalOptions.map((m) => (
|
||||
<MenuItem key={m.key} value={m.key}>
|
||||
{m.name}
|
||||
</MenuItem>
|
||||
))}
|
||||
</Select>
|
||||
</FormControl>
|
||||
<TextInput
|
||||
select
|
||||
label="Merkmal"
|
||||
value={selectedMerkmalKey}
|
||||
disabled={saving || merkmalOptions.length === 0}
|
||||
onChange={this.handleMerkmalChange}
|
||||
sx={{ minWidth: 170 }}
|
||||
>
|
||||
{merkmalOptions.map((m) => (
|
||||
<MenuItem key={m.key} value={m.key}>
|
||||
{m.name}
|
||||
</MenuItem>
|
||||
))}
|
||||
</TextInput>
|
||||
|
||||
{isAttr ? (
|
||||
<FormControl size="small" sx={{ minWidth: 170 }}>
|
||||
<InputLabel id="item-select-label">Wert</InputLabel>
|
||||
<Select
|
||||
labelId="item-select-label"
|
||||
value={selectedItemId}
|
||||
label="Wert"
|
||||
disabled={saving || availableItems.length === 0}
|
||||
onChange={this.handleItemChange}
|
||||
sx={{ bgcolor: 'background.paper' }}
|
||||
>
|
||||
{availableItems.length === 0 ? (
|
||||
<MenuItem value="" disabled>
|
||||
(Keine Werte)
|
||||
<TextInput
|
||||
select
|
||||
label="Wert"
|
||||
value={selectedItemId}
|
||||
disabled={saving || availableItems.length === 0}
|
||||
onChange={this.handleItemChange}
|
||||
sx={{ minWidth: 170 }}
|
||||
>
|
||||
{availableItems.length === 0 ? (
|
||||
<MenuItem value="" disabled>
|
||||
(Keine Werte)
|
||||
</MenuItem>
|
||||
) : (
|
||||
availableItems.map((val) => (
|
||||
<MenuItem key={val.id} value={val.id}>
|
||||
{val.value}
|
||||
</MenuItem>
|
||||
) : (
|
||||
availableItems.map((val) => (
|
||||
<MenuItem key={val.id} value={val.id}>
|
||||
{val.value}
|
||||
</MenuItem>
|
||||
))
|
||||
)}
|
||||
</Select>
|
||||
</FormControl>
|
||||
))
|
||||
)}
|
||||
</TextInput>
|
||||
) : (
|
||||
<TextField
|
||||
size="small"
|
||||
<TextInput
|
||||
label="Wert"
|
||||
placeholder="Wert..."
|
||||
value={customValueText}
|
||||
disabled={saving || !selectedMerkmalKey}
|
||||
@@ -452,7 +443,7 @@ export default class ArticleAttributesTab extends PureComponent {
|
||||
void this.handleAddItem();
|
||||
}
|
||||
}}
|
||||
sx={{ minWidth: 170, bgcolor: 'background.paper' }}
|
||||
sx={{ minWidth: 170 }}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import Box from '@mui/material/Box';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import CircularProgress from '@mui/material/CircularProgress';
|
||||
import Button from '@mui/material/Button';
|
||||
import TextField from '@mui/material/TextField';
|
||||
import TextInput from '../../TextInput';
|
||||
import MenuItem from '@mui/material/MenuItem';
|
||||
import Grid from '@mui/material/Grid';
|
||||
import Paper from '@mui/material/Paper';
|
||||
@@ -210,22 +210,21 @@ export default class ArticleLabelTab extends PureComponent {
|
||||
|
||||
<Box>
|
||||
<Box sx={{ display: 'flex', flexWrap: 'wrap', gap: 3, alignItems: 'flex-start' }}>
|
||||
<TextField
|
||||
<TextInput
|
||||
select
|
||||
label="Drucker"
|
||||
value={selectedPrinterId}
|
||||
onChange={(e) => this.setState({ selectedPrinterId: e.target.value })}
|
||||
sx={{ minWidth: 200 }}
|
||||
size="small"
|
||||
>
|
||||
{printers.map((p) => (
|
||||
<MenuItem key={p.id} value={p.id}>
|
||||
{p.desc ? `${p.desc} (${p.address})` : p.address}
|
||||
</MenuItem>
|
||||
))}
|
||||
</TextField>
|
||||
</TextInput>
|
||||
|
||||
<TextField
|
||||
<TextInput
|
||||
type="number"
|
||||
label="Anzahl"
|
||||
value={quantity}
|
||||
@@ -233,9 +232,8 @@ export default class ArticleLabelTab extends PureComponent {
|
||||
const val = parseInt(e.target.value, 10);
|
||||
this.setState({ quantity: isNaN(val) ? 1 : Math.max(1, val) });
|
||||
}}
|
||||
inputProps={{ min: 1, max: 9999 }}
|
||||
slotProps={{ htmlInput: { min: 1, max: 9999 } }}
|
||||
sx={{ width: 100 }}
|
||||
size="small"
|
||||
/>
|
||||
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user