ajustes al formulario de organizaciones
This commit is contained in:
@@ -30,14 +30,13 @@ export function EquipmentList() {
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
const [newItem, setNewItem] = useState({
|
||||
machine: '',
|
||||
specifications: '',
|
||||
quantity: '',
|
||||
});
|
||||
|
||||
const handleAdd = () => {
|
||||
if (newItem.machine && newItem.quantity) {
|
||||
append({ ...newItem, quantity: Number(newItem.quantity) });
|
||||
setNewItem({ machine: '', specifications: '', quantity: '' });
|
||||
setNewItem({ machine: '', quantity: '' });
|
||||
setIsOpen(false);
|
||||
}
|
||||
};
|
||||
@@ -68,16 +67,6 @@ export function EquipmentList() {
|
||||
placeholder="Nombre de la maquinaria"
|
||||
/>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<Label>Especificaciones</Label>
|
||||
<Input
|
||||
value={newItem.specifications}
|
||||
onChange={(e) =>
|
||||
setNewItem({ ...newItem, specifications: e.target.value })
|
||||
}
|
||||
placeholder="Especificaciones técnicas"
|
||||
/>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<Label>Cantidad</Label>
|
||||
<Input
|
||||
@@ -126,14 +115,6 @@ export function EquipmentList() {
|
||||
{/* @ts-ignore */}
|
||||
{field.machine}
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
<input
|
||||
type="hidden"
|
||||
{...register(`equipmentList.${index}.specifications`)}
|
||||
/>
|
||||
{/* @ts-ignore */}
|
||||
{field.specifications}
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
<input
|
||||
type="hidden"
|
||||
|
||||
Reference in New Issue
Block a user