import React, { useState, useEffect } from 'react'; import UpdateIcon from '@mui/icons-material/Update'; import { Typography, Pagination, Stack, // CircularProgress, Box } from '@mui/material' import { Row, Col } from 'react-bootstrap'; import { Candidato, Preview } from './Candidato' // const USER_LENGTH = 14 const USER_LENGTH = 120 function Divide(arregloOriginal){ const LONGITUD_PEDAZOS = 8; let arregloDeArreglos = []; for (let i = 0; i < arregloOriginal.length; i += LONGITUD_PEDAZOS) { let pedazo = arregloOriginal.slice(i, i + LONGITUD_PEDAZOS); arregloDeArreglos.push(pedazo); } return arregloDeArreglos } export default function Candidatos () { const [page, setPage] = useState(1); const [users, setUser] = useState([]); const changePage = ( _ , value) => { let page_numer = value; Divide(users) setPage(page_numer); }; useEffect(() => { setTimeout(() => { let list = [{ password : 'tester', puesto : "Piloto Repartidor", DPI : 0, // aplicacion : "27/12/2018 12:02 PM", aplicacion : new Date().toUTCString(), pendientes : "No" }] let a = 1; for( let _ of new Array(USER_LENGTH) ){ if(_) break let temp = { ...list[0], DPI : a * 1000, password : Math.random().toString(36).slice(5), aplicacion : new Date(10,12,a).toUTCString(), } a=a+1; list.push(temp) } let divided = Divide(list); setUser(divided) },3000) }, []) return (
HISTORIAL DE ACCESO DE CANDIDATOS
Últimos candidatos que han ingresado al sistema:
Contraseña
Puesto
No. Identificación
Fecha de aplicación
Pruebas Pendientes