diff --git a/frontend/src/pages/Admin/AdminProducts.js b/frontend/src/pages/Admin/AdminProducts.js index bc83818..75e2863 100644 --- a/frontend/src/pages/Admin/AdminProducts.js +++ b/frontend/src/pages/Admin/AdminProducts.js @@ -270,6 +270,58 @@ const AdminProducts = () => { const ProductForm = ({ onSubmit, submitText }) => (
+ {/* Live Preview */} +
+
+
+

{formData.name || 'Untitled Product'}

+ {formData.brand &&

{formData.brand}

} +
+ + {formData.productType || '—'} + +
+ {formData.productType === 'seed' ? ( +
+

Seed Blend:

+ {(formData.seedBlend||[]).length === 0 ? ( +

No blend details

+ ) : ( +
+ {formData.seedBlend.map((b,idx)=> ( + {b.cultivar} — {parseFloat(b.percent||0).toFixed(1)}% + ))} +
+ )} + {/* Rates Preview */} +
+

Application Rates

+ {(() => { + const newRate = (formData.rates||[]).find(r=> (r.applicationType||'').toLowerCase().includes('new')); + const overRate = (formData.rates||[]).find(r=> (r.applicationType||'').toLowerCase().includes('over')); + return ( + <> + {newRate &&
New Lawn: {newRate.rateAmount} {newRate.rateUnit}
} + {overRate &&
Overseeding: {overRate.rateAmount} {overRate.rateUnit}
} + {!newRate && !overRate && (formData.rates||[]).slice(0,2).map((r,i)=> ( +
{r.applicationType}: {r.rateAmount} {r.rateUnit}
+ ))} + + ); + })()} +
+
+ ) : ( + formData.activeIngredients && ( +

Active Ingredients: {formData.activeIngredients}

+ ) + )} +
-
- -