This commit is contained in:
seb
2026-10-08 18:48:28 +02:00
parent 30b573cc63
commit b165f86811
10 changed files with 139 additions and 30 deletions

View File

@@ -7,7 +7,7 @@ import FormControl from '@mui/material/FormControl';
import FormLabel from '@mui/material/FormLabel';
import InputAdornment from '@mui/material/InputAdornment';
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 { enqueueSnackbar } from 'notistack';
@@ -178,7 +178,7 @@ export default class CompanySettingsPanel extends Component {
</FormControl>
<Stack direction="row" spacing={2}>
<TextField
<TextInput
fullWidth
required
size="small"
@@ -195,7 +195,7 @@ export default class CompanySettingsPanel extends Component {
htmlInput: { min: 0, max: 100, step: 0.01, required: true },
}}
/>
<TextField
<TextInput
fullWidth
required
size="small"

View File

@@ -23,6 +23,7 @@ import { company } from '../../api';
import categoryAutomat from '../../automats/categoryAutomat';
import articleIndexAutomat from '../../automats/articleIndexAutomat';
import brandAutomat from '../../automats/brandAutomat';
import { orderAutomat } from '../../automats/orderAutomat';
function formatBytes(bytes) {
if (bytes == null || isNaN(bytes) || bytes === 0) return '0 B';
@@ -47,6 +48,7 @@ const PHASE_LABELS = {
articles: 'Artikel werden abgeglichen…',
variants: 'Varianten werden verknüpft…',
images: 'Bilder werden optimiert…',
orders: 'Aufträge werden importiert…',
};
const EXPORT_OPTIONS = [
@@ -299,6 +301,9 @@ export default class ImportExportSettingsPanel extends Component {
void categoryAutomat.actions.loadTree();
void articleIndexAutomat.actions.reload?.();
void brandAutomat.actions.load?.();
if (stats?.ordersImported) {
void orderAutomat.actions.reload?.();
}
},
onError: (message) => {
this.setState({
@@ -628,6 +633,27 @@ export default class ImportExportSettingsPanel extends Component {
</Typography>
</Box>
)}
{importStats.ordersImported != null && (
<Box
sx={{
p: 1.5,
bgcolor: 'background.paper',
borderRadius: 1.5,
border: '1px solid',
borderColor: 'divider',
}}
>
<Typography variant="caption" color="text.secondary">
Aufträge
</Typography>
<Typography variant="h6" fontWeight={700}>
{importStats.ordersImported}
</Typography>
<Typography variant="caption" color="text.secondary" display="block">
{importStats.ordersSkipped ? `+${importStats.ordersSkipped} übersprungen` : 'importiert'}
</Typography>
</Box>
)}
</Box>
</Box>
)}

View File

@@ -10,7 +10,7 @@ import TableCell from '@mui/material/TableCell';
import TableContainer from '@mui/material/TableContainer';
import TableHead from '@mui/material/TableHead';
import TableRow from '@mui/material/TableRow';
import TextField from '@mui/material/TextField';
import TextInput from '../TextInput';
import Typography from '@mui/material/Typography';
import SaveOutlinedIcon from '@mui/icons-material/SaveOutlined';
import { enqueueSnackbar } from 'notistack';
@@ -212,16 +212,15 @@ export default class NumberSettingsPanel extends Component {
<Typography variant="body2">{row.type}</Typography>
</TableCell>
<TableCell>
<TextField
<TextInput
size="small"
value={draft.prefix}
disabled={draft.busy}
onChange={(e) => this.handleChange(row.id, 'prefix', e.target.value)}
autoComplete="off"
/>
</TableCell>
<TableCell>
<TextField
<TextInput
size="small"
type="number"
value={draft.padding}
@@ -231,7 +230,7 @@ export default class NumberSettingsPanel extends Component {
/>
</TableCell>
<TableCell>
<TextField
<TextInput
size="small"
type="number"
value={draft.next}