This commit is contained in:
2025-09-03 12:27:48 -06:00
2 changed files with 26 additions and 11 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
"scripts": {
"dev": "next dev --turbopack",
"build": "next build",
"start": "next start",
"start": "source ~/.nvm/nvm.sh && nvm use 22.10.0 && npm install && next build && next start -p 3256",
"lint": "next lint"
},
"dependencies": {
+25 -10
View File
@@ -6,6 +6,7 @@ import CargaArchivo from "@/components/cargaArchivo";
import Button from "@/components/button";
import { useAuthRedirect } from "@/hooks/auth";
import { getUserFromToken } from "@/components/Hook";
import { useSession } from "@/hooks/use-session";
const apiUrl = process.env.NEXT_PUBLIC_API_URL;
@@ -21,6 +22,8 @@ export default function Dashboard() {
const loading = useAuthRedirect();
const [fuentes, setFuentes] = useState<Fuente[]>([]);
const [descargando, setDescargando] = useState(false);
const { data: user, } = useSession()
const fetchMovimientos = async () => {
const token = localStorage.getItem("token");
@@ -56,6 +59,9 @@ export default function Dashboard() {
fetchMovimientos();
}, []);
const handleDownload = async () => {
const token = localStorage.getItem("token");
if (!token) {
@@ -112,7 +118,8 @@ export default function Dashboard() {
return (
<main>
<div className="descarga-info p-4">
{user?.tipo !== "LOAD" ? <div className="descarga-info p-4">
<p className="descargar-text ">
<span className="fw-bold">Descargar:</span> obtiene todos los usuarios que se han
ingresado de las distintas fuentes o cargas.
@@ -132,17 +139,22 @@ export default function Dashboard() {
esa fuente.
</li>
</ol>
</div>
</div> : null}
<div className="flex gap-4 flex-wrap mb-6">
<h2 className="text-xl font-semibold mt-5 mb-5">Descarga de Datos</h2>
<h5 className="!text-[32px] text-gray-700 leading-tight mb-3">
{user?.tipo !== "LOAD" ? <h5 className="!text-[32px] text-gray-700 leading-tight mb-3">
Paso 1. Descarga el archivo.
</h5>
</h5> : null}
<Button
@@ -157,14 +169,17 @@ export default function Dashboard() {
<h2 className="text-xl font-semibold mb-4, mt-4">Fuentes</h2>
<h5 className="text-xs !text-gray-700 leading-tight mb-4">
{user?.tipo !== "LOAD" ? <><h5 className="text-xs !text-gray-700 leading-tight mb-4">
Paso 2. Alimenta la BD del servicio asigando a este perfil.
</h5>
</h5><h5 className="text-xs !text-gray-700 leading-tight mb-4">
Paso 3. Selecciona este botón al haber concluido el paso anterior.
</h5></> : null}
<h5 className="text-xs !text-gray-700 leading-tight mb-4">
Paso 3. Selecciona este botón al haber concluido el paso anterior.
</h5>
<div
style={{