arregldo tema faltaba cantidad de meses
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
<script lang="ts">
|
||||
let { onClose, onSubmit } : {
|
||||
onClose: () => void,
|
||||
onSubmit: (data: { opcionVenta: boolean; cantGarantes: number; mesesHastaAumento: number }) => void
|
||||
onSubmit: (data: { opcionVenta: boolean; cantGarantes: number; mesesHastaAumento: number, mesesDuracionContrato:number }) => void
|
||||
} = $props();
|
||||
|
||||
let opcionVenta: boolean = $state(false);
|
||||
let cantGarantes: number = $state(0);
|
||||
let mesesHastaAumento: number = $state(0);
|
||||
|
||||
let mesesDuracionContrato:number =$state(0);
|
||||
function handleSubmit(e:Event) {
|
||||
e.preventDefault();
|
||||
onSubmit({ opcionVenta, cantGarantes, mesesHastaAumento });
|
||||
onSubmit({ opcionVenta, cantGarantes, mesesHastaAumento, mesesDuracionContrato });
|
||||
onClose();
|
||||
}
|
||||
</script>
|
||||
@@ -39,6 +39,10 @@
|
||||
<label for="mesesHastaAumento">Meses Hasta Aumento</label>
|
||||
<input type="number" class="form-control" id="mesesHastaAumento" bind:value={mesesHastaAumento} min="0" required />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="mesesDuracionContrato">Meses Duracion Contrato</label>
|
||||
<input type="number" class="form-control" id="mesesDuracionContrato" bind:value={mesesDuracionContrato} min="0" required />
|
||||
</div>
|
||||
<div class="modal-footer d-flex justify-content-between">
|
||||
<button type="button" class="btn btn-secondary" onclick={onClose}>Cancelar</button>
|
||||
<button type="submit" class="btn btn-primary">Confirmar</button>
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from "svelte";
|
||||
import NavBarAutocompletable from "../Componentes/NavBarAutocompletable.svelte";
|
||||
import type { GaranteDto } from "../types";
|
||||
|
||||
let token = sessionStorage.getItem("token");
|
||||
|
||||
let canons = $state([]);
|
||||
let garantes: GaranteDto[] = $state([]);
|
||||
let prop = $state();
|
||||
|
||||
onMount(()=>{
|
||||
|
||||
});
|
||||
|
||||
async function obtenerDatosACargar() {
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<NavBarAutocompletable/>
|
||||
|
||||
|
||||
<div class="container-fluid mt-4">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="card">
|
||||
<div class="card-header text-center">Propiedad</div>
|
||||
<div class="card-body">
|
||||
<p><strong>Tipo:</strong> <span>---</span></p>
|
||||
<p><strong>Ubicación:</strong> <span>---</span></p>
|
||||
<p><strong>Propietario:</strong> <span>---</span></p>
|
||||
<p><strong>Habitaciones:</strong> <span>---</span></p>
|
||||
<p><strong>Piso:</strong> <span>---</span></p>
|
||||
<p><strong>Letra:</strong> <span>---</span></p>
|
||||
<p><strong>Estado:</strong> <span>---</span></p>
|
||||
<p><strong>Fecha Inicio:</strong> <span>---</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md">
|
||||
<div class="accordion" id="accordionExample">
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header" id="headingOne">
|
||||
<button
|
||||
class="accordion-button"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#collapseOne"
|
||||
aria-expanded="true"
|
||||
aria-controls="collapseOne"
|
||||
>
|
||||
Garantes
|
||||
</button>
|
||||
</h2>
|
||||
<div
|
||||
id="collapseOne"
|
||||
class="accordion-collapse collapse show"
|
||||
aria-labelledby="headingOne"
|
||||
data-bs-parent="#accordionExample"
|
||||
>
|
||||
<div class="accordion-body">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<p class="text-muted">[Información sobre garantes]</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header" id="headingTwo">
|
||||
<button
|
||||
class="accordion-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#collapseTwo"
|
||||
aria-expanded="false"
|
||||
aria-controls="collapseTwo"
|
||||
>
|
||||
Canons
|
||||
</button>
|
||||
</h2>
|
||||
<div
|
||||
id="collapseTwo"
|
||||
class="accordion-collapse collapse"
|
||||
aria-labelledby="headingTwo"
|
||||
data-bs-parent="#accordionExample"
|
||||
>
|
||||
<div class="accordion-body">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{#each canons as canon}
|
||||
<div class="col-6 mb-3">
|
||||
<div class="border p-2">
|
||||
<p><strong>Mes:</strong> {canon.mes}</p>
|
||||
<p><strong>Monto:</strong> {canon.monto}</p>
|
||||
<p><strong>Divisa:</strong> {canon.divisa}</p>
|
||||
<p><strong>Pago:</strong> {canon.pago ? "Sí" : "No"}</p>
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -69,7 +69,8 @@
|
||||
<p class="card-text">
|
||||
<strong>Fecha de inicio:</strong> {new Date(alquiler.fechainicio).toLocaleDateString()}<br />
|
||||
<strong>Inquilino:</strong> {alquiler.inquilino}<br />
|
||||
<strong>Propietario:</strong> {alquiler.propietario}
|
||||
<strong>Propietario:</strong> alquiler.propietario<br>
|
||||
<strong>Id Propiedad: </strong>{alquiler.id}
|
||||
</p>
|
||||
<div class="d-flex justify-content-center">
|
||||
<button class="btn btn-primary" onclick={()=>navigate("/inquilino/contratos?id="+alquiler.id)}>
|
||||
|
||||
@@ -69,7 +69,8 @@
|
||||
<p class="card-text">
|
||||
<strong>Fecha de inicio:</strong> {new Date(alquiler.fechainicio).toLocaleDateString()}<br />
|
||||
<strong>Inquilino:</strong> {alquiler.inquilino}<br />
|
||||
<strong>Propietario:</strong> {alquiler.propietario}
|
||||
<strong>Propietario:</strong> alquiler.propietario<br>
|
||||
<strong>Id Propiedad: </strong>{alquiler.id}
|
||||
</p>
|
||||
<div class="d-flex justify-content-center">
|
||||
<button class="btn btn-primary" onclick={()=>navigate("/propietario/contratos?id="+alquiler.id)}>
|
||||
|
||||
@@ -156,8 +156,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
async function handleEnviarmensaje2(data: {opcionVenta:boolean, cantGarantes:number, mesesHastaAumento:number}) {
|
||||
if (data.opcionVenta == null || data.cantGarantes <=0 || data.mesesHastaAumento<=0) {
|
||||
async function handleEnviarmensaje2(data: {opcionVenta:boolean, cantGarantes:number, mesesHastaAumento:number, mesesDuracionContrato:number}) {
|
||||
if (data.opcionVenta == null || data.cantGarantes <=0 || data.mesesHastaAumento<=0 || data.mesesDuracionContrato <=0) {
|
||||
modaldata = "Estan mal cargados los datos del form";
|
||||
return;
|
||||
}
|
||||
@@ -172,6 +172,7 @@
|
||||
fechaprimernotificacion: fecha,
|
||||
emailInquilino: Selmens.remitente,
|
||||
emailPropietario: Selmens.receptor,
|
||||
mesesDuracionContrato: data.mesesDuracionContrato
|
||||
};
|
||||
|
||||
let responce = await fetch($urlG+"/api/contratos/precontrato", {
|
||||
|
||||
Reference in New Issue
Block a user