From 81620521e72fd3732ce6185b8604761df83baada Mon Sep 17 00:00:00 2001 From: seb Date: Mon, 5 Oct 2026 15:11:49 +0200 Subject: [PATCH] u --- .../article/tabs/ArticleSupplierTab.jsx | 357 ++++++++---------- 1 file changed, 157 insertions(+), 200 deletions(-) diff --git a/src/components/article/tabs/ArticleSupplierTab.jsx b/src/components/article/tabs/ArticleSupplierTab.jsx index affad7e..c864d00 100644 --- a/src/components/article/tabs/ArticleSupplierTab.jsx +++ b/src/components/article/tabs/ArticleSupplierTab.jsx @@ -254,20 +254,11 @@ export default class ArticleSupplierTab extends PureComponent { - - - Zugeordnete Lieferanten ({assignedSuppliers.length}) - - - Bezugsquellen, Lieferanten-Artikelnr. und Konditionen für diesen Artikel - - - - - ) : ( - - - - Reihe - Lieferant - Lief.-Art.-Nr. - VPE (PU) - Lagerbestand - Einkaufspreis - - Aktionen - - - - - {assignedSuppliers.map((row, index) => { - const isBusy = busyId === row.id; - const netPrice = row.price?.net; - const taxRate = row.price?.taxRate; + {/* Content Table */} +
+ + + Reihe + Lieferant + Lief.-Art.-Nr. + VPE (PU) + Lagerbestand + Einkaufspreis + + Aktionen + + + + + {assignedSuppliers.map((row, index) => { + const isBusy = busyId === row.id; + const netPrice = row.price?.net; + const taxRate = row.price?.taxRate; - return ( - - {/* Sort Order & Reorder Controls */} - - - - {index + 1} + return ( + + {/* Sort Order & Reorder Controls */} + + + + {index + 1} + + + + + this.handleMove(index, -1)} + sx={{ p: 0.2 }} + > + + + + + + + this.handleMove(index, 1)} + sx={{ p: 0.2 }} + > + + + + + + + + + {/* Supplier Name */} + + {row.supplierName ?? `Lieferant #${row.entityId}`} + + + {/* Supplier SKU */} + + {row.sku ? ( + + {row.sku} + + ) : ( + + — + + )} + + + {/* PU / VPE */} + + {row.pu ?? 1} + + + {/* Stock */} + + {row.stock != null ? ( + 0 ? 'success' : 'default'} + variant="outlined" + sx={{ fontWeight: 500, height: 22, fontSize: '0.75rem' }} + /> + ) : ( + + — + + )} + + + {/* Purchase Price Net & Tax */} + + {netPrice != null ? ( + + + {formatPrice(netPrice)} - - - - this.handleMove(index, -1)} - sx={{ p: 0.2 }} - > - - - - - - - this.handleMove(index, 1)} - sx={{ p: 0.2 }} - > - - - - - - - - - {/* Supplier Name */} - - {row.supplierName ?? `Lieferant #${row.entityId}`} - - - {/* Supplier SKU */} - - {row.sku ? ( - - {row.sku} - - ) : ( - - — - - )} - - - {/* PU / VPE */} - - {row.pu ?? 1} - - - {/* Stock */} - - {row.stock != null ? ( - 0 ? 'success' : 'default'} - variant="outlined" - sx={{ fontWeight: 500, height: 22, fontSize: '0.75rem' }} - /> - ) : ( - - — - - )} - - - {/* Purchase Price Net & Tax */} - - {netPrice != null ? ( - - - {formatPrice(netPrice)} + {taxRate != null ? ( + + zzgl. {taxRate} % MwSt. - {taxRate != null ? ( - - zzgl. {taxRate} % MwSt. - - ) : null} - - ) : ( - - — - - )} - + ) : null} + + ) : ( + + — + + )} + - {/* Actions */} - - - - this.handleOpenEdit(row)} - disabled={isBusy} - > - - - - - this.handleDelete(row)} - disabled={isBusy} - > - - - - - - - ); - })} - -
- )} + {/* Actions */} + + + + this.handleOpenEdit(row)} + disabled={isBusy} + > + + + + + this.handleDelete(row)} + disabled={isBusy} + > + + + + + + + ); + })} + + {/* Add / Edit Dialog */}