avanzando
This commit is contained in:
@@ -0,0 +1,21 @@
|
|||||||
|
<!--
|
||||||
|
category: Design
|
||||||
|
tags: [pencil, change, update]
|
||||||
|
version: "1.0"
|
||||||
|
unicode: "ea98"
|
||||||
|
-->
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="2"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
>
|
||||||
|
<path d="M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1" />
|
||||||
|
<path d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z" />
|
||||||
|
<path d="M16 5l3 3" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 481 B |
@@ -0,0 +1,19 @@
|
|||||||
|
<!--
|
||||||
|
tags: [password, login, authentication, secure]
|
||||||
|
version: "1.0"
|
||||||
|
unicode: "eac7"
|
||||||
|
-->
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="2"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
>
|
||||||
|
<path d="M16.555 3.843l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.643 2.643a2.877 2.877 0 0 1 -4.069 0l-.301 -.301l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.877 2.877 0 0 1 0 -4.069l2.643 -2.643a2.877 2.877 0 0 1 4.069 0z" />
|
||||||
|
<path d="M15 9h.01" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 679 B |
@@ -0,0 +1,51 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
let {
|
||||||
|
close,
|
||||||
|
submit,
|
||||||
|
}: { close: () => void; submit: (e: Event, pass: string) => void } =
|
||||||
|
$props();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="modal fade show d-block"
|
||||||
|
tabindex="-1"
|
||||||
|
style="background-color: rgba(0,0,0,0.5);"
|
||||||
|
>
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title">Restablecer Contraseña</h5>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="btn-close"
|
||||||
|
aria-label="Close"
|
||||||
|
onclick={close}
|
||||||
|
></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form onsubmit={submit}>
|
||||||
|
<!--
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="nombre" class="form-label">Nombre</label>
|
||||||
|
<input type="text" id="nombre" class="form-control" bind:value={cli.nombre} required />
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="apellido" class="form-label">Apellido</label>
|
||||||
|
<input type="text" id="apellido" class="form-control" bind:value={cli.apellido} required />
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="domicilio" class="form-label">Domicilio</label>
|
||||||
|
<input type="text" id="domicilio" class="form-control" bind:value={cli.domicilio} required />
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="celular" class="form-label">Celular</label>
|
||||||
|
<input type="tel" id="celular" class="form-control" bind:value={cli.celular} required />
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-primary" onclick={(e)=>handleConfirm(e)}>Guardar</button>
|
||||||
|
-->
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
import { fade, fly } from "svelte/transition";
|
import { fade, fly } from "svelte/transition";
|
||||||
import ModalModificarPropietarios from "../Componentes/ModalModificarPropietarios.svelte";
|
import ModalModificarPropietarios from "../Componentes/ModalModificarPropietarios.svelte";
|
||||||
import { CardLink } from "@sveltestrap/sveltestrap";
|
import { CardLink } from "@sveltestrap/sveltestrap";
|
||||||
|
import ModalRestablecerContra from "../Componentes/ModalRestablecerContra.svelte";
|
||||||
|
|
||||||
let Clientes: Cliente[] = $state([]);
|
let Clientes: Cliente[] = $state([]);
|
||||||
let Grupos: any[] = $state([]);
|
let Grupos: any[] = $state([]);
|
||||||
@@ -241,6 +242,35 @@
|
|||||||
modaldata = "Falla la conexion al servidor";
|
modaldata = "Falla la conexion al servidor";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let restablecercontracli: Cliente | null = $state(null);
|
||||||
|
let showmodalrestablecercontra: boolean = $state(false);
|
||||||
|
async function handleRestablecerContraseña(e: Event, pass: string) {
|
||||||
|
e.preventDefault();
|
||||||
|
try {
|
||||||
|
const req = await fetch($urlG + "", {
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
Auth: token || "",
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
body: JSON.stringify({
|
||||||
|
Dni: restablecercontracli?.dni,
|
||||||
|
Pass: pass,
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
//WIP
|
||||||
|
if (req.ok) {
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
modaldata = "Falla la conexion al servidor";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function triggermodalcontra(cli: Cliente) {
|
||||||
|
restablecercontracli = cli;
|
||||||
|
showmodalrestablecercontra = true;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<NavBarAutocompletable />
|
<NavBarAutocompletable />
|
||||||
@@ -257,6 +287,13 @@
|
|||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
{#if showmodalrestablecercontra}
|
||||||
|
<ModalRestablecerContra
|
||||||
|
close={() => (showmodalrestablecercontra = false)}
|
||||||
|
submit={handleRestablecerContraseña}
|
||||||
|
/>
|
||||||
|
{/if}
|
||||||
|
|
||||||
<div class="content-fluid align-items-start">
|
<div class="content-fluid align-items-start">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col ms-2">
|
<div class="col ms-2">
|
||||||
@@ -301,7 +338,15 @@
|
|||||||
onclick={(e) =>
|
onclick={(e) =>
|
||||||
abrirModalModificarCliente(e, cli)}
|
abrirModalModificarCliente(e, cli)}
|
||||||
>
|
>
|
||||||
Modificar
|
<img src="/edit.svg" alt="Editar" />
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="btn btn-info"
|
||||||
|
onclick={() => triggermodalcontra(cli)}
|
||||||
|
><img
|
||||||
|
src="/key.svg"
|
||||||
|
alt="RestablecerContraseña"
|
||||||
|
/>
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user