Skip to content

Commit

Permalink
Arrumando simulado e telas.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigoborgesmachado committed Apr 3, 2024
1 parent ee2ea3e commit 9280b1d
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 90 deletions.
178 changes: 90 additions & 88 deletions src/pages/HistoricoSimulado/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,97 +97,99 @@ function HistoricoSimulado(){
}

return (
<div className='containerpage'>
<h2>
Histórico de Simulados
</h2>
<br/>
<div className='dadosResumidos'>
{
localStorage.getItem(Config.ADMIN) === '1' ?
<div className='formUsuario'>
<div className='selectUsuario'>
<p>Usuário:</p>
<Select closeMenuOnSelect={false} components={animatedComponents} options={usuarios} onChange={handleUsuarios} style={{width: '100%'}}/>
<div className='containerpage global-fullW'>
<div className='dados global-infoPanel'>
<h2>
Histórico de Simulados
</h2>
<br/>
<div className='dadosResumidos'>
{
localStorage.getItem(Config.ADMIN) === '1' ?
<div className='formUsuario'>
<div className='selectUsuario'>
<p>Usuário:</p>
<Select closeMenuOnSelect={false} components={animatedComponents} options={usuarios} onChange={handleUsuarios} style={{width: '100%'}}/>
</div>
</div>
</div>
:
<></>
}
{
usuarioFiltro ?
<h3>
Simulados feitos por: {usuarioFiltro}
</h3>
:
<></>
}

<Table>
<thead>
<tr>
<th>
<h3>
Prova
</h3>
</th>
<th>
<h3>
Quantidade Questões
</h3>
</th>
<th>
<h3>
Nº acertos
</h3>
</th>
<th>
<h3>
Tempo
</h3>
</th>
<th>
</th>
</tr>
</thead>
<tbody>
:
<></>
}
{
lista?.map((item, index) => {
return(
<tr key={index}>
<td>
<h4>
{
item.prova.nomeProva
}
</h4>
</td>
<td>
<h4>
{item.quantidadeQuestoes}
</h4>
</td>
<td>
<h4>
{item.quantidadeCertas}
</h4>
</td>
<td>
<h4>
{Math.round(item.tempo/60)} minutos
</h4>
</td>
<td>
<h4>
<button onClick={() => abreResultado(item.codigo)} className='global-button'>Visualizar</button>
</h4>
</td>
</tr>
)
})
usuarioFiltro ?
<h3>
Simulados feitos por: {usuarioFiltro}
</h3>
:
<></>
}
</tbody>
</Table>

<Table>
<thead>
<tr>
<th>
<h3>
Prova
</h3>
</th>
<th>
<h3>
Quantidade Questões
</h3>
</th>
<th>
<h3>
Nº acertos
</h3>
</th>
<th>
<h3>
Tempo
</h3>
</th>
<th>
</th>
</tr>
</thead>
<tbody>
{
lista?.map((item, index) => {
return(
<tr key={index}>
<td>
<h4>
{
item.prova.nomeProva
}
</h4>
</td>
<td>
<h4>
{item.quantidadeQuestoes}
</h4>
</td>
<td>
<h4>
{item.quantidadeCertas}
</h4>
</td>
<td>
<h4>
{Math.round(item.tempo/60)} minutos
</h4>
</td>
<td>
<h4>
<button onClick={() => abreResultado(item.codigo)} className='global-button'>Visualizar</button>
</h4>
</td>
</tr>
)
})
}
</tbody>
</Table>
</div>
</div>
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion src/pages/HistoricoUsuario/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function HistoricoUsuario() {
}

return (
<div className='containerpage'>
<div className='containerpage global-fullW'>
<div className='dados global-infoPanel'>
<h2>
Histórico de questões
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ListagemProvas/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function ListagemProvas() {
}

function abrirSimulado(codigo) {
navigate('/questoes/simulado&' + codigo, { replace: true });
navigate('/questoes/simulado&' + codigo + '?codigoProva=' + codigo + '&page=1', { replace: true });
}

function filtrar() {
Expand Down

0 comments on commit 9280b1d

Please sign in to comment.