falta mirar en la base de datos si guardo el tipo de moneda
This commit is contained in:
@@ -43,7 +43,13 @@
|
||||
<strong>Piso:</strong> {prop.piso || "N/A"}<br>
|
||||
<strong>Letra:</strong> {prop.letra || "N/A"}<br>
|
||||
<strong>Servicios:</strong> {prop.servicios || "Sin servicios especificados"}<br>
|
||||
<strong>Monto:</strong> ${prop.monto}<br>
|
||||
<strong>Monto:</strong>
|
||||
{#if prop.iddivisa == 0}
|
||||
AR$
|
||||
{:else}
|
||||
US$
|
||||
{/if}
|
||||
{prop.monto}<br>
|
||||
<strong>Estado:</strong> {prop.estado}<br>
|
||||
</p>
|
||||
{#if prop.estado == "Disponible"}
|
||||
|
||||
@@ -68,7 +68,13 @@
|
||||
<strong>Piso:</strong> {prop.piso || "N/A"}<br>
|
||||
<strong>Letra:</strong> {prop.letra || "N/A"}<br>
|
||||
<strong>Servicios:</strong> {prop.servicios || "Sin servicios especificados"}<br>
|
||||
<strong>Monto:</strong> ${prop.monto}<br>
|
||||
<strong>Monto:</strong>
|
||||
{#if prop.iddivisa == 0}
|
||||
AR$
|
||||
{:else}
|
||||
US$
|
||||
{/if}
|
||||
{prop.monto}<br>
|
||||
</p>
|
||||
<button class="btn btn-primary" onclick={Consultar}>Alquilar</button>
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import ModalEstatico from "./ModalEstatico.svelte";
|
||||
import ModificarPropiedadForm from "./modificarPropiedadForm.svelte";
|
||||
|
||||
let { id, ubicacion, tipo, letra, piso,canthabitaciones, servicios, btnbaja = "Baja", monto } = $props();
|
||||
let { id, ubicacion, tipo, letra, piso,canthabitaciones, servicios, btnbaja = "Baja", monto, iddivisa = 0 } = $props();
|
||||
|
||||
import { urlG } from "../stores/urlStore";
|
||||
|
||||
@@ -45,10 +45,17 @@
|
||||
<td>{piso}</td>
|
||||
<td>{tipo}</td>
|
||||
<td>{servicios}</td>
|
||||
<td>
|
||||
{#if iddivisa == 0}
|
||||
AR$
|
||||
{:else}
|
||||
US$
|
||||
{/if}
|
||||
</td>
|
||||
<td>{monto}</td>
|
||||
<td class="text-end">
|
||||
<button class="btn btn-outline-secondary" onclick={()=> setmod()}>Modificar</button>
|
||||
<button class="btn btn-outline-danger" onclick={() => BajaPropiedad()}>{btnbaja}</button>
|
||||
<button class="btn btn-outline-secondary btn-sm" onclick={()=> setmod()}>Modificar</button>
|
||||
<button class="btn btn-outline-danger btn-sm" onclick={() => BajaPropiedad()}>{btnbaja}</button>
|
||||
</td>
|
||||
</tr>
|
||||
{#if modal}
|
||||
@@ -57,7 +64,7 @@
|
||||
{#if modificar}
|
||||
<tr transition:fade={{duration:100}}>
|
||||
<td colspan="8">
|
||||
<ModificarPropiedadForm {id} {ubicacion} {canthabitaciones} {letra} {piso} {tipo} {servicios} {monto}/>
|
||||
<ModificarPropiedadForm {id} {ubicacion} {canthabitaciones} {letra} {piso} {tipo} {servicios} {monto} {iddivisa}/>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { urlG } from "../stores/urlStore";
|
||||
import { onMount } from "svelte";
|
||||
|
||||
let { canthabitaciones, id, letra, piso, tipo, ubicacion, servicios, monto } = $props();
|
||||
let { canthabitaciones, id, letra, piso, tipo, ubicacion, servicios, monto, iddivisa} = $props();
|
||||
let serviciosSeleccionados: string[] = $state([]);
|
||||
const serviciosDisponibles = ["Gas", "Internet", "Telefono", "Luz"];
|
||||
|
||||
@@ -53,7 +53,8 @@
|
||||
ubicacion,
|
||||
email,
|
||||
servicios: serviciosSeleccionados,
|
||||
monto
|
||||
monto,
|
||||
iddivisa
|
||||
}),
|
||||
});
|
||||
if (response.ok) {
|
||||
@@ -151,6 +152,29 @@
|
||||
<label for="idtipopropiedad">Tipo de propiedad</label>
|
||||
</div>
|
||||
|
||||
<div class="form-floating mb-3">
|
||||
<h6 class="form-floating form-label">Moneda</h6>
|
||||
<div class="form-check">
|
||||
<input
|
||||
type="radio"
|
||||
class="form-check-input"
|
||||
bind:group={iddivisa}
|
||||
value={0}
|
||||
id="moneda-ar"
|
||||
/>
|
||||
<label class="form-check-label" for="moneda-ar">AR$</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input
|
||||
type="radio"
|
||||
class="form-check-input"
|
||||
bind:group={iddivisa}
|
||||
value={1}
|
||||
id="moneda-us"
|
||||
/>
|
||||
<label class="form-check-label" for="moneda-us">US$</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<h6 class="form-floating form-label">Servicios</h6>
|
||||
{#each serviciosDisponibles as servicio}
|
||||
|
||||
Reference in New Issue
Block a user