From 7e893e5ef6d868649e91537686e9a6681405d7ff Mon Sep 17 00:00:00 2001 From: Jake Kasper Date: Thu, 4 Sep 2025 09:39:06 -0500 Subject: [PATCH] seed --- .../Applications/ApplicationPlanModal.js | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/Applications/ApplicationPlanModal.js b/frontend/src/components/Applications/ApplicationPlanModal.js index f0b1acc..33e3fdf 100644 --- a/frontend/src/components/Applications/ApplicationPlanModal.js +++ b/frontend/src/components/Applications/ApplicationPlanModal.js @@ -464,7 +464,7 @@ const ApplicationPlanModal = ({ nozzleId: selectedNozzleId || null, applicationType, plannedDate, - notes + notes: applicationType === 'seed' ? `${notes || ''} [Seeding: ${seedMode.replace('_',' ')}]`.trim() : notes }; // Add products in the format expected by Applications.js @@ -660,6 +660,23 @@ const ApplicationPlanModal = ({ + {/* Seed mode selector */} + {applicationType === 'seed' && ( +
+ +
+ + +
+
+ )} + {/* Products */}
@@ -710,7 +727,15 @@ const ApplicationPlanModal = ({ // For shared products: check rates array if (selectedProduct.isShared && selectedProduct.rates && selectedProduct.rates.length > 0) { - const defaultRate = selectedProduct.rates[0]; + let defaultRate = selectedProduct.rates[0]; + if (applicationType === 'seed') { + const modeKey = seedMode === 'new_seed' ? 'new' : 'over'; + const match = selectedProduct.rates.find(r => { + const t = (r.applicationType || '').toLowerCase(); + return t.includes('seed') && t.includes(modeKey); + }); + if (match) defaultRate = match; + } updateProduct(index, 'rateAmount', defaultRate.rateAmount || defaultRate.amount); updateProduct(index, 'rateUnit', defaultRate.rateUnit || defaultRate.unit); rateSet = true;