react-ecosistema-unp 1.7.23 → 1.7.24-pre.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare function fetchHistorico(
|
|
1
|
+
declare function fetchHistorico(nuip: string, setIsLoading: React.Dispatch<React.SetStateAction<boolean>>): Promise<any>;
|
|
2
2
|
export { fetchHistorico };
|
|
@@ -1,13 +1,22 @@
|
|
|
1
|
-
async function
|
|
2
|
-
|
|
3
|
-
const
|
|
1
|
+
async function c(e, t) {
|
|
2
|
+
t(!0);
|
|
3
|
+
const o = "https://tu-api-intermedia.com/historico-ser", n = {
|
|
4
|
+
identificacion: e,
|
|
5
|
+
tipo: "nuip"
|
|
6
|
+
};
|
|
4
7
|
try {
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
const r = await fetch(o, {
|
|
9
|
+
method: "POST",
|
|
10
|
+
headers: {
|
|
11
|
+
"Content-Type": "application/json"
|
|
12
|
+
},
|
|
13
|
+
body: JSON.stringify(n)
|
|
14
|
+
}), i = await r.json();
|
|
15
|
+
return r.ok ? (t(!1), i) : (t(!1), []);
|
|
16
|
+
} catch (r) {
|
|
17
|
+
return console.error("Error fetching data:", r), t(!1), [];
|
|
9
18
|
}
|
|
10
19
|
}
|
|
11
20
|
export {
|
|
12
|
-
|
|
21
|
+
c as fetchHistorico
|
|
13
22
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t, Fragment as s, jsxs as a } from "react/jsx-runtime";
|
|
2
|
-
import { useState as l, useEffect as
|
|
2
|
+
import { useState as l, useEffect as x } from "react";
|
|
3
3
|
import '../../assets/EcoModalStyles.css';import '../../assets/Modal.css';import '../../assets/ContenedorVentana.css';import '../../assets/IconoTooltip.css';import '../../assets/ItemsModal.css';import '../../assets/Paginador.css';import '../../assets/ContenidoModal.css';import '../../assets/Encabezado.css';import '../../assets/SeccionTarjetaLectura.css';import '../../assets/Logo.css';import '../../assets/TarjetaLectura.css';import '../../assets/ContenedorTarjeta.css';import '../../assets/Bootstrap.css';import '../../assets/Tarjeta.css';import '../../assets/UnpHistorico.css';/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
@@ -8,9 +8,9 @@ import "../../cards/tarjeta/seccion-tarjeta/SeccionTarjeta.js";
|
|
|
8
8
|
/* empty css */
|
|
9
9
|
/* empty css */
|
|
10
10
|
/* empty css */
|
|
11
|
-
import { TarjetaInfo as
|
|
12
|
-
import { F as
|
|
13
|
-
import { fetchHistorico as
|
|
11
|
+
import { TarjetaInfo as N } from "../../cards/tarjeta-info/TarjetaInfo.js";
|
|
12
|
+
import { F as b } from "../../index-D3WseyJh.js";
|
|
13
|
+
import { fetchHistorico as u } from "./FetchHistorico.js";
|
|
14
14
|
/* empty css */
|
|
15
15
|
import "../../ui/subtitulo/Subtitulo.js";
|
|
16
16
|
/* empty css */
|
|
@@ -22,24 +22,24 @@ import "react-router-dom";
|
|
|
22
22
|
/* empty css */
|
|
23
23
|
import "../../index-BrykDZgK.js";
|
|
24
24
|
/* empty css */
|
|
25
|
-
import { Animacion as
|
|
26
|
-
import { T as
|
|
27
|
-
const
|
|
28
|
-
const [c,
|
|
25
|
+
import { Animacion as f } from "../../ui/animacion/Animacion.js";
|
|
26
|
+
import { T as v } from "../../Table-C5ydZooy.js";
|
|
27
|
+
const J = ({ nuip: r }) => {
|
|
28
|
+
const [c, h] = l({
|
|
29
29
|
sintesisHechos1: !1,
|
|
30
30
|
sintesisHehcos2: !1
|
|
31
|
-
}), [d,
|
|
32
|
-
|
|
31
|
+
}), [d, m] = l([]), [o, p] = l(!1), n = (e) => {
|
|
32
|
+
h((i) => ({
|
|
33
33
|
...i,
|
|
34
34
|
[e]: !i[e]
|
|
35
35
|
}));
|
|
36
36
|
};
|
|
37
|
-
return
|
|
37
|
+
return x(() => {
|
|
38
38
|
(async () => {
|
|
39
|
-
const i = await
|
|
40
|
-
|
|
39
|
+
const i = await u(r, p);
|
|
40
|
+
m(i);
|
|
41
41
|
})();
|
|
42
|
-
}, [r]), /* @__PURE__ */ t(s, { children: d && d.length > 0 && !o ? /* @__PURE__ */ t(s, { children: d.sort((e, i) => e.ordenTrabajo < i.ordenTrabajo ? 1 : -1).map((e, i) => /* @__PURE__ */ t(
|
|
42
|
+
}, [r]), /* @__PURE__ */ t(s, { children: d && d.length > 0 && !o ? /* @__PURE__ */ t(s, { children: d.sort((e, i) => e.ordenTrabajo < i.ordenTrabajo ? 1 : -1).map((e, i) => /* @__PURE__ */ t(N, { icon: b, label: `OT ${e.ordenTrabajo} • ${e.tipoEstudio}`, children: /* @__PURE__ */ t(v, { striped: !0, bordered: !0, children: /* @__PURE__ */ a("tbody", { children: [
|
|
43
43
|
/* @__PURE__ */ a("tr", { children: [
|
|
44
44
|
/* @__PURE__ */ t("td", { className: "text-start", children: /* @__PURE__ */ t("b", { children: "Evaluado" }) }),
|
|
45
45
|
/* @__PURE__ */ t("td", { className: "text-start", children: e.nombreCompleto && e.nombreCompleto })
|
|
@@ -151,12 +151,12 @@ const K = ({ endpoint: h, nuip: r }) => {
|
|
|
151
151
|
/* @__PURE__ */ t("td", { className: "text-start", children: /* @__PURE__ */ t("b", { children: "Tipo de anulación" }) }),
|
|
152
152
|
/* @__PURE__ */ t("td", { className: "text-start", children: e.tipoAnulacion && e.tipoAnulacion })
|
|
153
153
|
] })
|
|
154
|
-
] }) }) }, i)) }) : o ? /* @__PURE__ */ t(
|
|
154
|
+
] }) }) }, i)) }) : o ? /* @__PURE__ */ t(f, { type: "loading_parrot", width: 200 }) : /* @__PURE__ */ a(s, { children: [
|
|
155
155
|
"No hay información disponible para la identificación ",
|
|
156
156
|
r,
|
|
157
157
|
"."
|
|
158
158
|
] }) });
|
|
159
159
|
};
|
|
160
160
|
export {
|
|
161
|
-
|
|
161
|
+
J as UnpHistorico
|
|
162
162
|
};
|