From 5de5cfa6531714f747808f81f62679f5d05abc2b Mon Sep 17 00:00:00 2001 From: ConanGH-S Date: Tue, 7 Nov 2023 15:39:40 -0500 Subject: [PATCH] fix: now reports doesnt show to practical teachers --- .../Student-monitoring/StudentMonitoring.jsx | 133 ++++++++++-------- 1 file changed, 74 insertions(+), 59 deletions(-) diff --git a/client/src/components/Student-monitoring/StudentMonitoring.jsx b/client/src/components/Student-monitoring/StudentMonitoring.jsx index f7a08556..51df1333 100644 --- a/client/src/components/Student-monitoring/StudentMonitoring.jsx +++ b/client/src/components/Student-monitoring/StudentMonitoring.jsx @@ -13,6 +13,7 @@ import { GetUserByName, detailInfoStudents, generateExcelStudents, generateExcel import { AiOutlineFileAdd } from 'react-icons/ai' import { HiOutlineDocumentText } from 'react-icons/hi' import { getUserID } from '../../import/getIDActualUser' +import { keysRoles } from '../../import/staticData' export const StudentMonitoring = () => { const [apprentices, setApprentices] = useState([]) @@ -78,6 +79,18 @@ export const StudentMonitoring = () => { } } + /** + * Identificador del rol del usuario almacenado en el almacenamiento local. + * + * @constant + * @name idRol + * @type {number} + * + * @example + * const idRolUsuario = idRol; + */ + const idRol = Number(localStorage.getItem('idRol')) + /** * @function * @name getApprentices @@ -461,65 +474,67 @@ export const StudentMonitoring = () => {
-
- -
    -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
-
- )} - - - -
+ {(idRol === Number(keysRoles[0]) || idRol === Number(keysRoles[1])) && ( +
+ + +
+ )} + + + + + )}
{searchedApprentices.length > 0 && !error ? (