más avances

Signed-off-by: fede <federico.nicolas.polidoro@gmail.com>
This commit is contained in:
2024-11-30 18:45:14 -03:00
parent 28cf77ad18
commit c116c924cd
7 changed files with 119 additions and 21 deletions

View File

@@ -44,6 +44,7 @@ onMount(async ()=> {
<tr>
<th>#</th>
<th>ubicacion</th>
<th>Habitaciones</th>
<th>Letra</th>
<th>Piso</th>
<th>Tipo</th>
@@ -51,7 +52,8 @@ onMount(async ()=> {
</thead>
<tbody>
{#each $propiedades as propiedad}
<RowPropiedad id={propiedad.id} ubicacion={propiedad.ubicacion} letra={propiedad.letra} piso={propiedad.piso} tipo={propiedad.tipo}/>
<RowPropiedad id={propiedad.id} ubicacion={propiedad.ubicacion} letra={propiedad.letra} piso={propiedad.piso} tipo={propiedad.tipo} canthabitaciones={propiedad.canthabitaciones}/>
{/each}
</tbody>
</table>

View File

@@ -3,15 +3,7 @@
import ModalEstatico from "../Componentes/ModalEstatico.svelte";
import NavBarAutocompletable from "../Componentes/NavBarAutocompletable.svelte";
import BarraHorizontalConTexto from "../Componentes/BarraHorizontalConTexto.svelte";
type Propiedad = {
ubicacion: string,
canthabitaciones: number,
piso: number,
letra: string,
email: string,
idtipropiedad: number,
};
import type { Propiedad } from "../types";
let propiedad: Propiedad = {
ubicacion: "",
@@ -28,6 +20,7 @@
const submitForm = async (e: Event) => {
e.preventDefault();
mostrarModal = false;
try {
const response = await fetch("http://localhost:5007/api/propiedad", {
method: 'POST',