fix: update ProductResults and admin panel for parapharmacy
- Updated ProductResults component with new source labels - Added price display for parapharmacy products - Updated admin panel to search both CIMA and Parapharmacy - Updated getSourceBadge to handle parapharmacy sources - Added CSS for product price display
This commit is contained in:
@@ -3,19 +3,27 @@ import './ProductResults.css';
|
||||
|
||||
const categoryLabels = {
|
||||
otc: 'Sin Receta',
|
||||
baby_food: 'Alimentación Infantil',
|
||||
baby_milk: 'Leche de Fórmula',
|
||||
baby_cereal: 'Cereales Bebé'
|
||||
parapharmacy: 'Parafarmacia',
|
||||
dermocosmética: 'Dermocosmética',
|
||||
'Fórmulas lácteas': 'Fórmulas lácteas',
|
||||
vitaminas: 'Vitaminas',
|
||||
analgésicos: 'Analgésicos'
|
||||
};
|
||||
|
||||
const sourceColors = {
|
||||
cima: '#2563eb',
|
||||
openfoodfacts: '#16a34a'
|
||||
promofarma: '#16a34a',
|
||||
docmorris: '#e11d48',
|
||||
primor: '#7c3aed',
|
||||
parapharmacy: '#16a34a'
|
||||
};
|
||||
|
||||
const sourceLabels = {
|
||||
cima: 'CIMA',
|
||||
openfoodfacts: 'Open Food Facts'
|
||||
promofarma: 'Promofarma',
|
||||
docmorris: 'DocMorris',
|
||||
primor: 'Primor',
|
||||
parapharmacy: 'Parafarmacia'
|
||||
};
|
||||
|
||||
function ProductResults({ products, onSelect }) {
|
||||
@@ -95,6 +103,9 @@ function ProductCard({ product, onSelect }) {
|
||||
{product.brand && (
|
||||
<p><strong>Marca:</strong> {product.brand}</p>
|
||||
)}
|
||||
{product.price != null && (
|
||||
<p className="product-price"><strong>Precio:</strong> {product.price} €</p>
|
||||
)}
|
||||
{product.source === 'cima' && product.active_ingredient && (
|
||||
<p><strong>Principio Activo:</strong> {product.active_ingredient}</p>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user