This commit is contained in:
seb
2026-07-31 18:36:13 +02:00
parent ce8d7d04da
commit 083e48f621
15 changed files with 179 additions and 47 deletions

View File

@@ -13,6 +13,7 @@ import {
primaryPrice,
} from '../../utils/articleDetail';
import { formatPrice } from '../../utils/price';
import { PANEL_TILE_KEYS } from '../../theme';
import { formatStock } from '../../pages/artikel/searchFormat';
function PanelValue({ label, children }) {
@@ -46,7 +47,6 @@ function ArticlePhoto() {
}
const headerTileSx = {
p: 1.25,
minHeight: 0,
};
@@ -99,6 +99,7 @@ export default function ArticleView({ article: articleData, onArticleUpdated })
<PanelTileGrid>
<EditablePanelTile
wide={3}
tileKey={PANEL_TILE_KEYS.name}
minHeight={0}
sx={headerTileSx}
value={{ name: articleData.name ?? '' }}
@@ -145,21 +146,21 @@ export default function ArticleView({ article: articleData, onArticleUpdated })
)}
/>
<PanelTile wide={1} minHeight={0} sx={headerTileSx}>
<PanelTile wide={1} tileKey={PANEL_TILE_KEYS.photo} minHeight={0} sx={headerTileSx}>
<ArticlePhoto />
</PanelTile>
<PanelTile wide={1} title="Bestand">
<PanelTile wide={1} tileKey={PANEL_TILE_KEYS.stock} title="Bestand">
<PanelValue>
{articleData.stock != null ? formatStock(articleData.stock) : null}
</PanelValue>
</PanelTile>
<PanelTile wide={1} title="Marke">
<PanelTile wide={1} tileKey={PANEL_TILE_KEYS.brand} title="Marke">
<PanelValue>{brandName(articleData)}</PanelValue>
</PanelTile>
<PanelTile wide={1} title="SKU / EAN">
<PanelTile wide={1} tileKey={PANEL_TILE_KEYS.identifiers} title="SKU / EAN">
<PanelValue label="SKU">{articleData.sku}</PanelValue>
{eans.map((ean) => (
<PanelValue key={ean} label="EAN">
@@ -168,7 +169,7 @@ export default function ArticleView({ article: articleData, onArticleUpdated })
))}
</PanelTile>
<PanelTile wide={1} title="Preis">
<PanelTile wide={1} tileKey={PANEL_TILE_KEYS.price} title="Preis">
<PanelValue label="Netto">
{basePrice?.net != null ? formatPrice(basePrice.net) : null}
</PanelValue>
@@ -180,14 +181,14 @@ export default function ArticleView({ article: articleData, onArticleUpdated })
</PanelValue>
</PanelTile>
<PanelTile wide={3} title="SEO & Beschreibung" minHeight={200}>
<PanelTile wide={3} tileKey={PANEL_TILE_KEYS.content} title="SEO & Beschreibung" minHeight={200}>
<PanelValue label="Slug">{articleData.slug}</PanelValue>
<PanelValue label="SEO-Titel">{articleData.seoTitle}</PanelValue>
<PanelValue label="SEO-Beschreibung">{articleData.seoDescription}</PanelValue>
<PanelValue label="Beschreibung">{articleData.description}</PanelValue>
</PanelTile>
<PanelTile wide={1} title="Listen" minHeight={200}>
<PanelTile wide={1} tileKey={PANEL_TILE_KEYS.lists} title="Listen" minHeight={200}>
<RelationLine
label="Vaterartikel"
active={articleData.childCount > 0}