From 57714ff36c263e3e7e85f6166b08d42fb554f6d6 Mon Sep 17 00:00:00 2001 From: IO <320154041@pcpuma.acatlan.unam.mx> Date: Thu, 19 Feb 2026 18:59:21 -0600 Subject: [PATCH] modified impresions to role = 5 --- app/(private)/Impresiones/page.tsx | 155 ++++++++---------- app/(private)/Inscritos/Inscripciones.tsx | 6 +- app/(private)/Inscritos/inscripciones.css | 14 ++ .../Global/SearchUser/SearchUserWithDate.tsx | 9 +- app/Components/layout/Header/Header.tsx | 12 +- 5 files changed, 101 insertions(+), 95 deletions(-) create mode 100644 app/(private)/Inscritos/inscripciones.css diff --git a/app/(private)/Impresiones/page.tsx b/app/(private)/Impresiones/page.tsx index 41bf6ee..63fab57 100644 --- a/app/(private)/Impresiones/page.tsx +++ b/app/(private)/Impresiones/page.tsx @@ -6,6 +6,7 @@ import Impressions from "@/app/Components/Impressions/impressions"; import ShowError from "@/app/Components/Global/ShowError"; import { GetStudent } from "@/app/lib/getStudent"; +import { cookies } from "next/headers"; import "@/app/globals.css"; @@ -19,6 +20,10 @@ export default async function Page(props: { const key = params?.key && params.key; const numAcount = params?.numAcount ? params.numAcount : null; + const cookieStore = await cookies(); + const role = cookieStore.get("role")?.value || ""; + const roleNumber = parseInt(role); + let student: any = null; let errorMessage = ""; @@ -32,6 +37,69 @@ export default async function Page(props: { } } + let options: any[] = []; + + if (student) { + options = [ + { + key: "Recibo", + label: "Recibo", + content: , + }, + { + key: "B/N", + label: "Impresiones B/N", + content: ( + + ), + }, + { + key: "color", + label: "Impresiones color", + content: ( + + ), + }, + { + key: "Plotter", + label: "Plotter", + content: ( + + ), + }, + { + key: "Escaner", + label: "Escaner", + content: ( + + ), + }, + ]; + } + + const optionsToUse = + roleNumber === 5 + ? options.filter( + (option) => option.key === "Recibo" || option.key === "B/N" + ) + : options; + return (
{errorMessage && } @@ -47,92 +115,13 @@ export default async function Page(props: { Carrera={student.carrera.carrera} Credito={student.credito} /> -
+
+ , - }, - { - key: "B/N", - label: "Impresiones B/N", - content: ( - - ), - }, - { - key: "color", - label: "Impresiones color", - content: ( - - ), - }, - { - key: "Plotter", - label: "Plotter", - content: ( - - ), - }, - { - key: "Escaner", - label: "Escaner", - content: ( - - ), - }, - ]} + options={optionsToUse} /> + )}
diff --git a/app/(private)/Inscritos/Inscripciones.tsx b/app/(private)/Inscritos/Inscripciones.tsx index fad4c79..1c759dc 100644 --- a/app/(private)/Inscritos/Inscripciones.tsx +++ b/app/(private)/Inscritos/Inscripciones.tsx @@ -3,6 +3,8 @@ import { envConfig } from "@/app/lib/config"; import { useEffect, useState } from "react"; import axios from "axios"; +import "./inscripciones.css" + interface Periodo { id_periodo: number; semestre: string; @@ -114,7 +116,7 @@ export default function Inscripciones() { -
+
@@ -131,7 +133,7 @@ export default function Inscripciones() { {tablaData.map((row, index) => ( - + diff --git a/app/(private)/Inscritos/inscripciones.css b/app/(private)/Inscritos/inscripciones.css new file mode 100644 index 0000000..ca61b3d --- /dev/null +++ b/app/(private)/Inscritos/inscripciones.css @@ -0,0 +1,14 @@ +.containerTable{ + overflow: auto; + scrollbar-width: none; + background-color:rgba(84, 84, 84, 0.2) ; + backdrop-filter: blur(20px); + -webkit-backdrop-filter: blur(20px); + border-radius: 5px; +} + +.textLeft{ + padding-left: 20px; + text-align: start; + font-weight: bold; +} \ No newline at end of file diff --git a/app/Components/Global/SearchUser/SearchUserWithDate.tsx b/app/Components/Global/SearchUser/SearchUserWithDate.tsx index d77c03c..e7a356a 100644 --- a/app/Components/Global/SearchUser/SearchUserWithDate.tsx +++ b/app/Components/Global/SearchUser/SearchUserWithDate.tsx @@ -60,16 +60,17 @@ function SearchUserWithDate(props: urlProp) {
+ setDate(e.target.value)} /> -
- + + ); } diff --git a/app/Components/layout/Header/Header.tsx b/app/Components/layout/Header/Header.tsx index e8a5b86..40b3aa5 100644 --- a/app/Components/layout/Header/Header.tsx +++ b/app/Components/layout/Header/Header.tsx @@ -2,8 +2,8 @@ import Image from "next/image"; import Link from "next/link"; import BarNavigation from "../BarNavigation/BarNavigation"; import header from "./Header.module.css"; -import { cookies } from "next/headers"; import BarNavigationServicio from "../BarNavigation/BarNavigationServicio"; +import { cookies } from "next/headers"; export default async function Header() { const cookieStore = await cookies(); @@ -29,11 +29,11 @@ export default async function Header() {
- {role === "ADMINIS.TRADOR" && } - {role === "SUPER ADMINISTRADOR (quita sanciones)" && } - {role === "ADMINISTRADOR" && } - {role === "ATENCION A USUARIO" && } - {role === "SERVICIO SOCIAL" && } + {role === "1" && } + {role === "4" && } + + {role === "2" && } + {role === "3" && }
);
{row.carrera}{row.carrera} {row.genero ?? "-"} {row.WINDOWS} {row.MACINTOSH}