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

@@ -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>
)}