Feat: commit antes de mostrar el codigo.
- Añadido alta propiedad - Arreglado alta inq/prop - Añadida pantalla de menu
This commit is contained in:
@@ -18,16 +18,24 @@
|
||||
let domicilio: string = $state("")
|
||||
let celular: string = $state("")
|
||||
|
||||
const token = sessionStorage.getItem("token");
|
||||
|
||||
async function submitForm(event: any) {
|
||||
event.preventDefault();
|
||||
try {
|
||||
let response = await fetch(url, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Auth' : String(token),
|
||||
'Content-Type' : 'application/json',
|
||||
},
|
||||
body: JSON.stringify({dni, nombre, apellido, domicilio, celular, email, contraseña})
|
||||
});
|
||||
if (response.ok){
|
||||
const errorData = await response.json();
|
||||
errorMessage = errorData.message;
|
||||
showAlert = true;
|
||||
}
|
||||
if (!response.ok) {
|
||||
const errorData = await response.json();
|
||||
errorMessage = errorData.message;
|
||||
|
||||
13
Front/src/Componentes/ModalEstatico.svelte
Normal file
13
Front/src/Componentes/ModalEstatico.svelte
Normal file
@@ -0,0 +1,13 @@
|
||||
<script lang="ts">
|
||||
import { Button, Modal } from '@sveltestrap/sveltestrap';
|
||||
|
||||
let {payload} = $props();
|
||||
let open = $state(true);
|
||||
const toggle = () => (open = !open);
|
||||
</script>
|
||||
|
||||
<div>
|
||||
<Modal body isOpen={open} {toggle}>
|
||||
{payload}
|
||||
</Modal>
|
||||
</div>
|
||||
Reference in New Issue
Block a user