@@ -152,34 +119,23 @@ export default function Page() {
type="text"
placeholder="Ingresa serie"
value={formData.serie}
- onChange={(e) =>
- setFormData({ ...formData, serie: e.target.value })
- }
+ onChange={(e) => handleInputChange("serie", e.target.value)}
/>
-
- handleInputChange("marca", e.target.value, marcas)
- }
- />
- {suggestions.marca.length > 0 && (
-
- {suggestions.marca.map((s) => (
- - handleSelectSuggestion("marca", s)}
- >
- {s}
-
- ))}
-
- )}
+ onChange={(e) => handleInputChange("marca", e.target.value)}
+ >
+
+ {marcas.map((m) => (
+
+ ))}
+
@@ -188,58 +144,40 @@ export default function Page() {
type="text"
placeholder="Ingresa modelo"
value={formData.modelo}
- onChange={(e) =>
- handleInputChange("modelo", e.target.value, [])
- }
+ onChange={(e) => handleInputChange("modelo", e.target.value)}
/>
-
- handleInputChange("tipoEquipo", e.target.value, tiposEquipo)
+ handleInputChange("tipoEquipo", e.target.value)
}
- />
- {suggestions.tipoEquipo.length > 0 && (
-
- {suggestions.tipoEquipo.map((s) => (
- - handleSelectSuggestion("tipoEquipo", s)}
- >
- {s}
-
- ))}
-
- )}
+ >
+
+ {tiposEquipo.map((t) => (
+
+ ))}
+
-
- handleInputChange("estado", e.target.value, estados)
- }
- />
- {suggestions.estado.length > 0 && (
-
- {suggestions.estado.map((s) => (
- - handleSelectSuggestion("estado", s)}
- >
- {s}
-
- ))}
-
- )}
+ onChange={(e) => handleInputChange("estado", e.target.value)}
+ >
+
+ {estados.map((e) => (
+
+ ))}
+
@@ -247,91 +185,53 @@ export default function Page() {
-
- handleInputChange("tipoUso", e.target.value, tiposUso)
- }
- />
- {suggestions.tipoUso.length > 0 && (
-
- {suggestions.tipoUso.map((s) => (
- - handleSelectSuggestion("tipoUso", s)}
- >
- {s}
-
- ))}
-
- )}
+ onChange={(e) => handleInputChange("tipoUso", e.target.value)}
+ >
+
+ {tiposUso.map((t) => (
+
+ ))}
+
{mostrarCamposComputadora && (
<>
-
- handleInputChange(
- "procesador",
- e.target.value,
- procesadores
- )
+ handleInputChange("procesador", e.target.value)
}
- />
- {suggestions.procesador.length > 0 && (
-
- {suggestions.procesador.map((s) => (
- -
- handleSelectSuggestion("procesador", s)
- }
- >
- {s}
-
- ))}
-
- )}
+ >
+
+ {procesadores.map((p) => (
+
+ ))}
+
-
-
- handleInputChange(
- "sistemaOperativo",
- e.target.value,
- sistemasOperativos
- )
+ handleInputChange("sistemaOperativo", e.target.value)
}
- />
- {suggestions.sistemaOperativo.length > 0 && (
-
- {suggestions.sistemaOperativo.map((s) => (
- -
- handleSelectSuggestion("sistemaOperativo", s)
- }
- >
- {s}
-
- ))}
-
- )}
+ >
+
+ {sistemasOperativos.map((so) => (
+
+ ))}
+
>
)}
@@ -343,11 +243,7 @@ export default function Page() {
placeholder="Selecciona adscripción"
value={formData.adscripcion}
onChange={(e) =>
- handleInputChange(
- "adscripcion",
- e.target.value,
- adscripciones
- )
+ handleInputChange("adscripcion", e.target.value)
}
/>
{suggestions.adscripcion.length > 0 && (
@@ -372,25 +268,25 @@ export default function Page() {
+
+
+
+
+
+
{mostrarCamposComputadora && (
<>
@@ -158,9 +224,11 @@ export default function Editar() {
}
>
-
-
-
+ {procesadores.map((p) => (
+
+ ))}
@@ -176,10 +244,11 @@ export default function Editar() {
}
>
-
-
-
-
+ {sistemasOperativos.map((so) => (
+
+ ))}
>
@@ -194,17 +263,22 @@ export default function Editar() {
}
>