diff --git a/src/app/landing/landing_body.tsx b/src/app/landing/landing_body.tsx
index 37ce8ef..1f9f665 100644
--- a/src/app/landing/landing_body.tsx
+++ b/src/app/landing/landing_body.tsx
@@ -6,33 +6,55 @@ import IconCircle from "./IconCircle";
import Button from "@/components/button";
import { useRouter } from "next/navigation";
import Link from "next/link";
+import { getUserFromToken } from "@/components/Hook";
+import { useEffect, useState } from "react";
+
+
export default function LandingBody() {
+ const [saludo, setSaludo] = useState("");
+
+
+ useEffect(() => {
+ const user = getUserFromToken();
+ const origen = user?.tipo;
+
+
+ if (origen === "LOAD") {
+ setSaludo("Bienvenido al módulo de carga de datos");
+ } else if (origen === "RED") {
+ setSaludo("Bienvenido usuario de red");
+ } else if (origen === "AT") {
+ setSaludo("Bienvenido usuario de AT");
+ } else if (origen === "CORREO") {
+ setSaludo("Bienvenido usuario de correo");
+ } else if (origen === " SOLICITA") {
+ setSaludo("Bienvenido usuario de prestamos PC Puma");
+ }
+
+ }, [])
+
+
const router = useRouter();
return (
+
+
+ {
+ saludo && {saludo}
+ }
+
+
+
Servicios PC PUMA y CEDETEC
-
-
-
- Conoce PCPUMA
-
-
-
-
-
);
}
diff --git a/src/app/page.tsx b/src/app/page.tsx
index 094d281..0a14d39 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -40,10 +40,10 @@ const Home = () => {
const items: HeaderItem[] = user
? [
{ label: "Inicio", page: "landing" },
- { label: "Consulta", page: "consulta" },
{ label: isCarga, page: "carga" as PageKey },
+
...(user.tipo === "LOAD"
- ? [{ label: "Carga individual", page: "carga individual" as PageKey }]
+ ? [{ label: "Carga individual", page: "carga individual" as PageKey }, { label: "Consulta", page: "consulta" as PageKey }]
: []),
{ label: "Cerrar sesión", onClick: handleLogout },
]
@@ -60,7 +60,7 @@ const Home = () => {
{page === "landing" &&
}
{page === "login" &&
}
- {page === "consulta" &&
}
+ {page === "consulta" && user?.tipo === "LOAD" &&
}
{page === "carga" &&
}
{page === "carga individual" && user?.tipo === "LOAD" && (
diff --git a/src/app/visualizacion/page.tsx b/src/app/visualizacion/page.tsx
index ca2a098..22c742c 100644
--- a/src/app/visualizacion/page.tsx
+++ b/src/app/visualizacion/page.tsx
@@ -3,6 +3,7 @@
import React, { useState } from "react";
import Input from "@/components/input";
import Button from "@/components/button";
+import Link from "next/link";
const apiUrl = process.env.NEXT_PUBLIC_API_URL;
@@ -80,7 +81,7 @@ export default function Consulta() {
{usuario && (
-
Bienvenido {usuario}, estos son tus servicios activos
+
Bienvenido {usuario}
)}
@@ -141,6 +142,18 @@ export default function Consulta() {
)}
+
+
+ Conoce PCPUMA
+
+
+
+
+
);
}
diff --git a/src/containers/LoginPage.tsx b/src/containers/LoginPage.tsx
index 5d57254..7401b3d 100644
--- a/src/containers/LoginPage.tsx
+++ b/src/containers/LoginPage.tsx
@@ -41,7 +41,7 @@ export default function Page() {
// Redirigir al usuario
} catch (err: any) {
const message =
- err.response?.data?.message || err.message || "Error al iniciar sesión";
+ "credenciales incorrectas, por favor verifica tu usuario y contraseña";
setError(message);
} finally {
setLoading(false);