base commit
This commit is contained in:
@@ -11,7 +11,7 @@ export type Product = {
|
||||
slug: string
|
||||
shortDescription: string | null
|
||||
description: string | null
|
||||
quantity?: number | null
|
||||
quantity: number
|
||||
materials?: string[]
|
||||
priceCents: number
|
||||
imageUrl: string | null
|
||||
|
||||
@@ -117,6 +117,14 @@ export function ProductCard({ product, mediaHeight = 200, actions }: Props) {
|
||||
<CardContent sx={{ flexGrow: 1 }}>
|
||||
<Stack spacing={1}>
|
||||
{product.category && <Chip label={product.category.name} size="small" />}
|
||||
{!product.inStock && (
|
||||
<Chip
|
||||
label={`Под заказ · ${product.leadTimeDays ?? '—'} дн.`}
|
||||
size="small"
|
||||
variant="outlined"
|
||||
color="warning"
|
||||
/>
|
||||
)}
|
||||
<Typography
|
||||
variant="h6"
|
||||
component={RouterLink}
|
||||
@@ -126,7 +134,7 @@ export function ProductCard({ product, mediaHeight = 200, actions }: Props) {
|
||||
{product.title}
|
||||
</Typography>
|
||||
{(product.materials?.length ?? 0) > 0 && (
|
||||
<Stack direction="row" spacing={1} useFlexGap flexWrap="wrap">
|
||||
<Stack direction="row" spacing={1} useFlexGap sx={{ flexWrap: 'wrap' }}>
|
||||
{materials.map((m) => (
|
||||
<Chip key={m} label={m} size="small" variant="outlined" />
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user