@@ -1,10 +1,18 @@
|
||||
<script lang="ts">
|
||||
import { fade } from "svelte/transition";
|
||||
import type {PropiedadDto} from "../types"
|
||||
import ModalEstatico from "./ModalEstatico.svelte";
|
||||
let { id, ubicacion, tipo, letra, piso }: PropiedadDto = $props();
|
||||
import ModificarPropiedadForm from "./modificarPropiedadForm.svelte";
|
||||
let { id, ubicacion, tipo, letra, piso,canthabitaciones }: PropiedadDto = $props();
|
||||
|
||||
let modal: boolean = $state(false)
|
||||
let modalpayload: string = $state("")
|
||||
let modal: boolean = $state(false);
|
||||
let modalpayload: string = $state("");
|
||||
|
||||
let modificar: boolean = $state(false);
|
||||
|
||||
function setmod(){
|
||||
modificar = !modificar;
|
||||
}
|
||||
|
||||
async function BajaPropiedad(){
|
||||
modal = false;
|
||||
@@ -15,7 +23,7 @@
|
||||
'Auth' : String(sessionStorage.getItem("token")),
|
||||
'Email' : String(localStorage.getItem("email"))
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
if (responce.ok){
|
||||
const json = await responce.json();
|
||||
@@ -34,17 +42,20 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<tr>
|
||||
<tr in:fade>
|
||||
<td>{id}</td>
|
||||
<td>{ubicacion}</td>
|
||||
<td>{canthabitaciones}</td>
|
||||
<td>{letra}</td>
|
||||
<td>{piso}</td>
|
||||
<td>{tipo}</td>
|
||||
<td class="text-end">
|
||||
<button class="btn btn-outline-secondary">Modificar</button>
|
||||
<button class="btn btn-outline-secondary" onclick={() => setmod()}>Modificar</button>
|
||||
<button class="btn btn-outline-danger" onclick={()=> BajaPropiedad()}>Baja</button>
|
||||
</td>
|
||||
</tr>
|
||||
{#if modal}
|
||||
<ModalEstatico payload={modalpayload}/>
|
||||
{/if}
|
||||
{#if modificar}
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user