asdflk
This commit is contained in:
@@ -363,9 +363,6 @@ const Applications = () => {
|
|||||||
selectedPropertyDetails={selectedPropertyDetails}
|
selectedPropertyDetails={selectedPropertyDetails}
|
||||||
onPropertySelect={fetchPropertyDetails}
|
onPropertySelect={fetchPropertyDetails}
|
||||||
editingPlan={editingPlan}
|
editingPlan={editingPlan}
|
||||||
spreaderRecommendation={spreaderRecommendation}
|
|
||||||
loadingRecommendation={loadingRecommendation}
|
|
||||||
loadSpreaderRecommendation={loadSpreaderRecommendation}
|
|
||||||
onSubmit={async (planData) => {
|
onSubmit={async (planData) => {
|
||||||
try {
|
try {
|
||||||
if (editingPlan) {
|
if (editingPlan) {
|
||||||
@@ -484,10 +481,7 @@ const ApplicationPlanModal = ({
|
|||||||
nozzles,
|
nozzles,
|
||||||
selectedPropertyDetails,
|
selectedPropertyDetails,
|
||||||
onPropertySelect,
|
onPropertySelect,
|
||||||
editingPlan,
|
editingPlan
|
||||||
spreaderRecommendation,
|
|
||||||
loadingRecommendation,
|
|
||||||
loadSpreaderRecommendation
|
|
||||||
}) => {
|
}) => {
|
||||||
const [loadingProperty, setLoadingProperty] = useState(false);
|
const [loadingProperty, setLoadingProperty] = useState(false);
|
||||||
|
|
||||||
@@ -538,10 +532,6 @@ const ApplicationPlanModal = ({
|
|||||||
}
|
}
|
||||||
}, [editingPlan, products]);
|
}, [editingPlan, products]);
|
||||||
|
|
||||||
// Load spreader recommendation when relevant fields change
|
|
||||||
useEffect(() => {
|
|
||||||
loadSpreaderRecommendation(planData.selectedProduct, planData.equipmentId, planData.selectedAreas);
|
|
||||||
}, [planData.selectedProduct, planData.equipmentId, planData.selectedAreas, selectedPropertyDetails, equipment, loadSpreaderRecommendation]);
|
|
||||||
|
|
||||||
const handlePropertyChange = async (propertyId) => {
|
const handlePropertyChange = async (propertyId) => {
|
||||||
setPlanData({ ...planData, propertyId, selectedAreas: [] });
|
setPlanData({ ...planData, propertyId, selectedAreas: [] });
|
||||||
@@ -778,61 +768,6 @@ const ApplicationPlanModal = ({
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Spreader Recommendation for Granular Applications */}
|
{/* Spreader Recommendation for Granular Applications */}
|
||||||
{planData.applicationType === 'granular' && (spreaderRecommendation || loadingRecommendation) && (
|
|
||||||
<div className="bg-green-50 border border-green-200 rounded-lg p-4">
|
|
||||||
<div className="flex items-center gap-2 mb-3">
|
|
||||||
<CalculatorIcon className="h-5 w-5 text-green-600" />
|
|
||||||
<h3 className="font-semibold text-green-800">Spreader Recommendation</h3>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{loadingRecommendation ? (
|
|
||||||
<div className="text-sm text-green-700">Loading recommendation...</div>
|
|
||||||
) : spreaderRecommendation ? (
|
|
||||||
<div className="space-y-2">
|
|
||||||
<div className="flex items-start justify-between">
|
|
||||||
<div className="space-y-1">
|
|
||||||
<p className="text-sm font-medium text-green-800">
|
|
||||||
Spreader Setting: <span className="text-lg font-bold">{spreaderRecommendation.setting.settingValue}</span>
|
|
||||||
</p>
|
|
||||||
<p className="text-sm text-green-700">
|
|
||||||
Product Amount: <span className="font-semibold">{spreaderRecommendation.productAmountLbs} lbs</span>
|
|
||||||
</p>
|
|
||||||
<p className="text-xs text-green-600">
|
|
||||||
Total Area: {spreaderRecommendation.totalArea.toLocaleString()} sq ft
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div className="text-right">
|
|
||||||
<div className={`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium ${
|
|
||||||
spreaderRecommendation.isExactMatch
|
|
||||||
? 'bg-green-100 text-green-800'
|
|
||||||
: 'bg-yellow-100 text-yellow-800'
|
|
||||||
}`}>
|
|
||||||
{spreaderRecommendation.isExactMatch ? 'Exact Match' : 'Approximate'}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{spreaderRecommendation.setting.rateDescription && (
|
|
||||||
<p className="text-xs text-green-600 italic">
|
|
||||||
{spreaderRecommendation.setting.rateDescription}
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{spreaderRecommendation.setting.notes && (
|
|
||||||
<p className="text-xs text-green-600">
|
|
||||||
Note: {spreaderRecommendation.setting.notes}
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{!spreaderRecommendation.isExactMatch && (
|
|
||||||
<p className="text-xs text-yellow-700 bg-yellow-50 rounded p-2 mt-2">
|
|
||||||
⚠️ This setting is based on a similar spreader. Please verify the setting is appropriate for your specific equipment.
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
) : null}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* Nozzle Selection for Liquid Applications */}
|
{/* Nozzle Selection for Liquid Applications */}
|
||||||
{planData.applicationType === 'liquid' && (
|
{planData.applicationType === 'liquid' && (
|
||||||
|
|||||||
Reference in New Issue
Block a user