este es el trabajo de hoy
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
import VerLogs from "./paginas/VerLogs.svelte";
|
||||
import ControlPagos from "./paginas/ControlPagos.svelte";
|
||||
import ContratoAdmin from "./paginas/ContratoAdmin.svelte";
|
||||
import BuscarVentas from "./paginas/BuscarVentas.svelte";
|
||||
</script>
|
||||
|
||||
<Router>
|
||||
@@ -115,6 +116,10 @@
|
||||
<ProteRoute componente={ControlPagos}/>
|
||||
</Route>
|
||||
|
||||
<!-- Buscar Ventas -->
|
||||
<Route path="/accion/16">
|
||||
<ProteRoute componente={BuscarVentas}/>
|
||||
</Route>
|
||||
<!-- Pagina Ventas -->
|
||||
<Route path="/Ventas">
|
||||
<ProteRoute componente={Ventas}/>
|
||||
@@ -149,7 +154,7 @@
|
||||
<ProteRoute componente={ContratoInquilino}/>
|
||||
</Route>
|
||||
|
||||
<!--Contratos Inquilino-->
|
||||
<!--Contratos Admin-->
|
||||
<Route path="/admin/contratos">
|
||||
<ProteRoute componente={ContratoAdmin}/>
|
||||
</Route>
|
||||
|
||||
44
Front/src/Componentes/ModalPublicarPropiedadParaVenta.svelte
Normal file
44
Front/src/Componentes/ModalPublicarPropiedadParaVenta.svelte
Normal file
@@ -0,0 +1,44 @@
|
||||
<script lang="ts">
|
||||
|
||||
let {onClose, onConfirm}: {onClose:()=>void, onConfirm:()=>void} = $props();
|
||||
let monto:number = $state(0);
|
||||
|
||||
|
||||
function handleSubmit(e: Event) {
|
||||
e.preventDefault();
|
||||
onConfirm();onClose();
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="modal fade show" tabindex="-1" role="dialog" style="display: block; background-color: rgba(0, 0, 0, 0.5);">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Contrato</h5>
|
||||
<button type="button" class="btn-close" onclick={onClose} aria-label="Cerrar"></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form>
|
||||
<div class="form-floating mb-3">
|
||||
<input
|
||||
type="number"
|
||||
id="monto"
|
||||
class="form-control"
|
||||
bind:value={monto}
|
||||
placeholder="0"
|
||||
required
|
||||
/>
|
||||
<label for="monto">Monto</label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-primary" onclick={(e)=> handleSubmit(e)}>Publicar a la venta</button>
|
||||
|
||||
<button class="btn btn-secondary ms-auto" onclick={onClose}>Cerrar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -6,12 +6,14 @@
|
||||
let { id, ubicacion, tipo, letra, piso,canthabitaciones, servicios, btnbaja = "Baja", monto, iddivisa = 0 } = $props();
|
||||
|
||||
import { urlG } from "../stores/urlStore";
|
||||
import ModalPublicarPropiedadParaVenta from "./ModalPublicarPropiedadParaVenta.svelte";
|
||||
|
||||
let modal: boolean = $state(false);
|
||||
let modalpayload: string = $state("");
|
||||
|
||||
let modificar: boolean = $state(false);
|
||||
|
||||
let showPublicarVenta: boolean = $state(false);
|
||||
|
||||
function setmod(){
|
||||
modificar = !modificar;
|
||||
}
|
||||
@@ -35,6 +37,13 @@
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
function setventa() {
|
||||
showPublicarVenta = true;
|
||||
}
|
||||
async function sendMod() {
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<tr in:fade>
|
||||
@@ -53,9 +62,10 @@
|
||||
{/if}
|
||||
</td>
|
||||
<td>{monto}</td>
|
||||
<td class="text-end">
|
||||
<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 class="d-flex justify-content-between gap-2">
|
||||
<button class="btn btn-secondary btn-sm" onclick={()=> setmod()}>Modificar</button>
|
||||
<button class="btn btn-secondary btn-sm" onclick={()=> setventa()}>Publicar a venta</button>
|
||||
<button class="btn btn-danger btn-sm" onclick={() => BajaPropiedad()}>{btnbaja}</button>
|
||||
</td>
|
||||
</tr>
|
||||
{#if modal}
|
||||
@@ -68,3 +78,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{#if showPublicarVenta}
|
||||
<ModalPublicarPropiedadParaVenta onClose={()=>!!(showPublicarVenta = false)} onConfirm={sendMod}/>
|
||||
{/if}
|
||||
14
Front/src/paginas/BuscarVentas.svelte
Normal file
14
Front/src/paginas/BuscarVentas.svelte
Normal file
@@ -0,0 +1,14 @@
|
||||
<script lang="ts">
|
||||
import { text } from "@sveltejs/kit";
|
||||
import BarraHorizontalConTexto from "../Componentes/BarraHorizontalConTexto.svelte";
|
||||
import NavBarAutocompletable from "../Componentes/NavBarAutocompletable.svelte";
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<NavBarAutocompletable/>
|
||||
|
||||
<div class="container-fluid mt-2">
|
||||
<BarraHorizontalConTexto text="Venta Propiedades"/>
|
||||
|
||||
</div>
|
||||
6
Front/src/types.d.ts
vendored
6
Front/src/types.d.ts
vendored
@@ -187,4 +187,10 @@ export type UpdateCliente = {
|
||||
apellido:string,
|
||||
domicilio:string,
|
||||
celular:string,
|
||||
}
|
||||
|
||||
export type setVenta = {
|
||||
idpropiedad:number,
|
||||
monto:number,
|
||||
iddivisa:number,
|
||||
}
|
||||
Reference in New Issue
Block a user