+
+ {/* Main Content */}
+
{/* Basic Info */}
@@ -940,77 +941,6 @@ export default function ProductEditPage() {
)}
-
- {/* Right Column: Preview/Summary */}
-
-
-
-
-
-
Preview Gallery
-
-
- Live
-
-
-
-
- {/* Main Image Preview */}
-
-

img.url)?.url ? fixUrl(images.find(img => img.url)!.url!) : getCategoryImage(typeof product?.category.name === 'string' ? product.category.name : (product?.category.name as any)?.en || '')}
- className="w-full h-full object-contain transition-all duration-700"
- alt=""
- />
-
-
-
{typeof product?.category.name === 'string' ? product.category.name : (product?.category.name as any)?.th || (product?.category.name as any)?.en || ''}
-
{product?.brand.name}
-
-
-
-
- {/* Thumbnail Strip Preview */}
- {images.length > 0 && (
-
- {images.filter(img => img.url).map((img, i) => (
-
-

-
- ))}
-
- )}
-
-
-
Summary
-
-
- Variants
- {variants.length}
-
-
- Min Price
-
- {variants.length > 0
- ? formatPrice(Math.min(...variants.map(v => Number(v.price) || 0)))
- : '-'}
-
-
-
- Images
- {images.filter(img => img.url).length}
-
-
-
-
-
-
-
-
- Tip: The first image in the list will be used as the primary thumbnail across the store.
-
-
-
+
)
}
diff --git a/apps/admin/src/pages/ProductsPage.tsx b/apps/admin/src/pages/ProductsPage.tsx
index b7652db..c861cce 100644
--- a/apps/admin/src/pages/ProductsPage.tsx
+++ b/apps/admin/src/pages/ProductsPage.tsx
@@ -284,7 +284,7 @@ export default function ProductsPage() {
Product |
Category |
Variants |
-
Base Price |
+
Price |
Actions |
@@ -335,7 +335,13 @@ export default function ProductsPage() {
- {formatPrice(product.price)}
+ {(() => {
+ const prices = product.variants?.map(v => v.price || 0) || []
+ const minPrice = prices.length > 0 ? Math.min(...prices) : 0
+ const maxPrice = prices.length > 0 ? Math.max(...prices) : 0
+ const priceDisplay = minPrice === maxPrice ? formatPrice(minPrice) : `${formatPrice(minPrice)} - ${formatPrice(maxPrice)}`
+ return {priceDisplay}
+ })()}
|
@@ -353,6 +359,13 @@ export default function ProductsPage() {
+
|