feat(F-193): completed feature
This commit is contained in:
@@ -151,6 +151,19 @@ export default async function ProductPage({ params }: Props) {
|
||||
<div className="mt-2 text-sm text-gray-500">
|
||||
{formatPrice(netCents)} sin IVA ({vatPercent}%)
|
||||
</div>
|
||||
{/* F-193: expiry and weight */}
|
||||
{(product as { expirationDate?: string }).expirationDate && (
|
||||
<div className="mt-1 text-sm text-gray-400">
|
||||
Caduca: {new Date((product as { expirationDate: string }).expirationDate).toLocaleDateString('es-ES')}
|
||||
</div>
|
||||
)}
|
||||
{primaryVariant?.weightGrams && (
|
||||
<div className="mt-1 text-sm text-gray-400">
|
||||
Peso: {primaryVariant.weightGrams >= 1000
|
||||
? `${(primaryVariant.weightGrams / 1000).toFixed(2)} kg`
|
||||
: `${primaryVariant.weightGrams} g`}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
) : (
|
||||
<div className="mt-6 bg-gray-50 rounded-xl p-6">
|
||||
|
||||
@@ -88,6 +88,7 @@ export interface ProductVariant {
|
||||
sku: string;
|
||||
ean: string | null;
|
||||
attributes: Record<string, unknown>;
|
||||
weightGrams: number | null; // F-193
|
||||
}
|
||||
|
||||
export interface VariantPrice {
|
||||
|
||||
@@ -39,6 +39,7 @@ export interface Product {
|
||||
unitWeightKg?: number;
|
||||
minPurchaseQty?: number;
|
||||
aiAssisted?: boolean;
|
||||
expirationDate?: string; // F-193
|
||||
}
|
||||
|
||||
export interface Category {
|
||||
|
||||
Reference in New Issue
Block a user