This commit is contained in:
Jake Kasper
2025-09-05 11:00:46 -04:00
parent f9bd7f6e18
commit 1b8dcab3e9

View File

@@ -367,11 +367,11 @@ const Watering = () => {
</div>
<div className="card space-y-2">
<div className="font-medium">Plan</div>
<div className="flex gap-2 items-center">
<select className="input flex-1" value={plan?.id || ''} onChange={(e)=> selectPlan(e.target.value)} disabled={!selectedProperty}>
<option value="">-- Select plan --</option>
{plans.map(pl => (<option key={pl.id} value={pl.id}>{pl.name}</option>))}
</select>
<select className="input w-full" value={plan?.id || ''} onChange={(e)=> selectPlan(e.target.value)} disabled={!selectedProperty}>
<option value="">-- Select plan --</option>
{plans.map(pl => (<option key={pl.id} value={pl.id}>{pl.name}</option>))}
</select>
<div className="flex gap-2 items-center flex-wrap">
<button className="btn-secondary" disabled={!selectedProperty} onClick={async ()=>{
const name = `Sprinklers ${new Date().toLocaleDateString()}`;
const r = await wateringAPI.createPlan({ propertyId: selectedProperty.id, name });