algun avance tengo
This commit is contained in:
21
Front/src/Componentes/ModalCheckYContrato.svelte
Normal file
21
Front/src/Componentes/ModalCheckYContrato.svelte
Normal file
@@ -0,0 +1,21 @@
|
||||
<script lang="ts">
|
||||
import type { MensajeDto } from "../types";
|
||||
import { urlG } from "../stores/urlStore";
|
||||
|
||||
let {men, onCancel, onConfirm, putErrorModal}: {men: MensajeDto,
|
||||
onCancel:()=>void,
|
||||
onConfirm:()=>void,
|
||||
putErrorModal:(txt:string)=>void} = $props();
|
||||
|
||||
async function getGaranteData() {
|
||||
try {
|
||||
const responce = await fetch($urlG+"". {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Auth": String(sessionStorage.getItem("token")),
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -182,8 +182,16 @@
|
||||
|
||||
if (responce.ok){
|
||||
let data = await responce.json();
|
||||
|
||||
modaldata = data.message;
|
||||
if (mostrarleidos) {
|
||||
Leidos();
|
||||
} else {
|
||||
SinLeer();
|
||||
}
|
||||
return;
|
||||
}
|
||||
let dataaa = await responce.json();
|
||||
modaldata = dataaa.message;
|
||||
} catch {
|
||||
modaldata = "no se pudo comunicar con el Servidor";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user