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