FEAT: hecho el arreglo de los botones y empecé con el registro de propiedades
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
<script lang="ts">
|
||||
import NavBarAutocompletable from "../Componentes/NavBarAutocompletable.svelte";
|
||||
type Propiedad = {
|
||||
ubicacion: string,
|
||||
canthabitaciones: number,
|
||||
piso: number,
|
||||
letra: string,
|
||||
email: string,
|
||||
idtipropiedad: number,
|
||||
}
|
||||
let propiedad: Propiedad = {
|
||||
ubicacion: "",
|
||||
canthabitaciones: 1,
|
||||
piso: 0,
|
||||
letra: "",
|
||||
email: "",
|
||||
idtipropiedad: 1,
|
||||
};
|
||||
|
||||
const submitForm = () => {
|
||||
console.log("Formulario enviado:", propiedad);
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<NavBarAutocompletable/>
|
||||
<div class="container mt-4">
|
||||
<h2>Registrar Propiedad</h2>
|
||||
<form on:submit|preventDefault={submitForm}>
|
||||
<div class="form-floating mb-3">
|
||||
<input
|
||||
type="text"
|
||||
id="ubicacion"
|
||||
class="form-control"
|
||||
bind:value={propiedad.ubicacion}
|
||||
placeholder="Ubicación"
|
||||
required
|
||||
/>
|
||||
<label for="ubicacion">Ubicación</label>
|
||||
</div>
|
||||
<div class="form-floating mb-3">
|
||||
<input
|
||||
type="number"
|
||||
id="canthabitaciones"
|
||||
class="form-control"
|
||||
bind:value={propiedad.canthabitaciones}
|
||||
min="1"
|
||||
placeholder="Cantidad de Habitaciones"
|
||||
required
|
||||
/>
|
||||
<label for="canthabitaciones">Cantidad de Habitaciones</label>
|
||||
</div>
|
||||
<div class="form-floating mb-3">
|
||||
<input
|
||||
type="number"
|
||||
id="piso"
|
||||
class="form-control"
|
||||
bind:value={propiedad.piso}
|
||||
min="0"
|
||||
placeholder="Piso"
|
||||
/>
|
||||
<label for="piso">Piso</label>
|
||||
</div>
|
||||
<div class="form-floating mb-3">
|
||||
<input
|
||||
type="text"
|
||||
id="letra"
|
||||
class="form-control"
|
||||
bind:value={propiedad.letra}
|
||||
maxlength="1"
|
||||
placeholder="Letra"
|
||||
/>
|
||||
<label for="letra">Letra</label>
|
||||
</div>
|
||||
|
||||
<div class="form-floating mb-3">
|
||||
<select
|
||||
id="idtipropiedad"
|
||||
class="form-select"
|
||||
bind:value={propiedad.idtipropiedad}
|
||||
required
|
||||
>
|
||||
<option value="1">Casa</option>
|
||||
<option value="2">Departamento</option>
|
||||
<option value="3">Oficina</option>
|
||||
</select>
|
||||
<label for="idtipropiedad">Tipo de Propiedad</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Enviar</button>
|
||||
</form>
|
||||
</div>
|
||||
Reference in New Issue
Block a user