creado componente para las rows y mejorado el pagination stepper

This commit is contained in:
2025-02-04 21:38:59 -03:00
parent d0ea1171f8
commit b4090f74e0
4 changed files with 78 additions and 42 deletions
+2 -30
View File
@@ -8,6 +8,7 @@
import ModalEstatico from "../Componentes/ModalEstatico.svelte";
import ModalPublicarPropiedadParaVenta from "../Componentes/ModalPublicarPropiedadParaVenta.svelte";
import ModificarPropiedadForm from "../Componentes/modificarPropiedadForm.svelte";
import RowPropiedadVenta from "../Componentes/RowPropiedadVenta.svelte";
let token = sessionStorage.getItem("token")||"";
@@ -118,36 +119,7 @@
</tr>
{:else}
{#each propiedades as p}
<tr in:fade>
<td>{p.id}</td>
<td>{p.ubicacion}</td>
<td>{p.canthabitaciones}</td>
<td>{p.letra}</td>
<td>{p.piso}</td>
<td>{p.tipo}</td>
<td>{p.servicios}</td>
<td>
{#if p.iddivisa == 0}
AR$
{:else}
US$
{/if}
</td>
<td>{p.monto}</td>
<td class="d-flex justify-content-between gap-2">
<button class="btn btn-secondary btn-sm" onclick={()=> setmod(p)}>Modificar</button>
<button class="btn btn-secondary btn-sm" onclick={()=> unsetventa(p)}>Bajar de venta</button>
</td>
</tr>
{#if modificar}
<tr transition:fade={{duration:100}}>
<td colspan="10">
<ModificarPropiedadForm id={selprop.id} ubicacion={selprop.ubicacion}
canthabitaciones={selprop.canthabitaciones} letra={selprop.letra} piso={selprop.piso}
tipo={selprop.tipo} servicios={selprop.servicios} monto={selprop.monto} iddivisa={selprop.iddivisa}/>
</td>
</tr>
{/if}
<RowPropiedadVenta {p} {unsetventa}/>
{/each}
{/if}
</tbody>
+1 -1
View File
@@ -106,6 +106,6 @@
</tbody>
</table>
<div class="d-flex justify-content-center">
<PaginacionStepper currentPag={pagina} {cantpag} {queryPag}/>
<PaginacionStepper currentPag={pagina} {cantpag} {queryPag} centrado={true}/>
</div>
</div>