-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1825 from prefeiturasp/release/8.5.0
Release/8.5.0
- Loading branch information
Showing
51 changed files
with
3,499 additions
and
22,671 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...tes/Globais/ExibeAcertosEmLancamentosEDocumentosPorConta/AcertoComprovanteSaldoDaConta.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React from "react"; | ||
|
||
export const AcertoComprovanteSaldoDaConta = ({extratosBancariosAjustes}) => { | ||
return ( | ||
<> | ||
{extratosBancariosAjustes && extratosBancariosAjustes.solicitar_envio_do_comprovante_do_saldo_da_conta ? ( | ||
<div className='row'> | ||
<div className='col-12'> | ||
<p className="text-saldo-reprogramado" id='p_enviar_arquivo_do_comprovante'><strong>Enviar arquivo de Comprovante do saldo da conta</strong></p> | ||
{extratosBancariosAjustes && extratosBancariosAjustes.observacao_solicitar_envio_do_comprovante_do_saldo_da_conta && extratosBancariosAjustes.observacao_solicitar_envio_do_comprovante_do_saldo_da_conta.trim() !== "" && | ||
<> | ||
<label id='lbl_enviar_arquivo_do_comprovant' htmlFor="texto-enviar-arquivo-do-comprovante"><strong>Observação</strong></label> | ||
<textarea | ||
rows="3" | ||
defaultValue={extratosBancariosAjustes.observacao_solicitar_envio_do_comprovante_do_saldo_da_conta} | ||
name="texto-enviar-arquivo-do-comprovante" | ||
className="form-control mb-3" | ||
disabled={true} | ||
id='texto_enviar_arquivo_do_comprovante' | ||
style={{backgroundColor: "#fff"}} | ||
/> | ||
</> | ||
} | ||
</div> | ||
</div> | ||
) : | ||
<></> | ||
} | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from "react"; | ||
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome"; | ||
import {faPlus} from "@fortawesome/free-solid-svg-icons"; | ||
export const AddUsuario = () => { | ||
return ( | ||
<button onClick={() => { | ||
console.log("Adicionar Usuário") | ||
} | ||
} type="button" className="btn btn-success mt-2"> | ||
<FontAwesomeIcon | ||
style={{fontSize: '15px', marginRight: "5", color: "#fff"}} | ||
icon={faPlus} | ||
/> | ||
Adicionar | ||
</button> | ||
) | ||
} |
14 changes: 14 additions & 0 deletions
14
src/componentes/Globais/GestaoDeUsuarios/BarraTopoLista.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React from "react"; | ||
import {AddUsuario} from "./AddUsuario"; | ||
export const BarraTopoLista = () => { | ||
return ( | ||
<> | ||
<div className="barra-topo-lista-usuarios d-flex bd-highlight align-items-center"> | ||
<div className="py-2 flex-grow-1 bd-highlight"><h2>Usuários com acesso</h2></div> | ||
<div className="p-2 bd-highlight"> | ||
<AddUsuario/> | ||
</div> | ||
</div> | ||
</> | ||
) | ||
} |
110 changes: 110 additions & 0 deletions
110
src/componentes/Globais/GestaoDeUsuarios/FormFiltros.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
import React, {useContext, useState} from "react"; | ||
import {GestaoDeUsuariosContext} from "./context/GestaoDeUsuariosProvider"; | ||
|
||
export const FormFiltros = ({grupos}) => { | ||
const {setFilter, initialFilter, visaoBase} = useContext(GestaoDeUsuariosContext); | ||
const [formFilter, setFormFilter] = useState(initialFilter); | ||
|
||
const handleChangeFormFilter = (name, value) => { | ||
setFormFilter({ | ||
...formFilter, | ||
[name]: value | ||
}); | ||
}; | ||
|
||
const handleSubmitFormFilter = async (event) => { | ||
event.preventDefault(); | ||
setFilter(formFilter); | ||
}; | ||
|
||
const clearFilter = () => { | ||
setFormFilter(initialFilter); | ||
setFilter(initialFilter); | ||
}; | ||
|
||
return ( | ||
<form onSubmit={handleSubmitFormFilter} method="post"> | ||
<div className="row mt-3"> | ||
<div className="col"> | ||
<label htmlFor="filtrar_por_termo">Filtrar por nome ou id de usuário</label> | ||
<input | ||
value={formFilter.search} | ||
onChange={(e) => handleChangeFormFilter(e.target.name, e.target.value)} | ||
name='search' | ||
type="text" | ||
className="form-control" | ||
placeholder="Escreva o nome ou id" | ||
/> | ||
</div> | ||
<div className="col"> | ||
<label htmlFor="filtrar_por_grupo">Filtrar por grupo</label> | ||
<select | ||
value={formFilter.grupo} | ||
onChange={(e) => handleChangeFormFilter(e.target.name, e.target.value)} | ||
name='grupo' | ||
id='filtrar_por_grupo' | ||
className='form-control' | ||
> | ||
<option key='' value="">Selecione um grupo</option> | ||
{grupos && grupos.length > 0 && grupos.map((grupo, index) => ( | ||
<option key={index} value={grupo.id}>{grupo.name}</option> | ||
))} | ||
</select> | ||
</div> | ||
<div className="col"> | ||
<label htmlFor="filtrar_por_grupo">Filtrar por tipo de usuário</label> | ||
<select | ||
value={formFilter.tipoUsuario} | ||
onChange={(e) => handleChangeFormFilter(e.target.name, e.target.value)} | ||
name='tipoUsuario' | ||
id='filtrar_tipo_de_usuario' | ||
className='form-control' | ||
> | ||
<option value="">Selecione um tipo</option> | ||
<option value="servidor">Servidor</option> | ||
<option value="nao-servidor">Não Servidor</option> | ||
</select> | ||
</div> | ||
</div> | ||
|
||
{(visaoBase === 'DRE' || visaoBase === 'SME') && | ||
<div className='row mt-3'> | ||
<div className="col"> | ||
<label htmlFor="filtrar_por_termo">Filtrar por unidade educacional</label> | ||
<input | ||
value={formFilter.nomeUnidade} | ||
onChange={(e) => handleChangeFormFilter(e.target.name, e.target.value)} | ||
name='nomeUnidade' | ||
type="text" | ||
className="form-control" | ||
placeholder="Escreva qualquer parte do nome da unidade" | ||
/> | ||
</div> | ||
</div> | ||
} | ||
|
||
{(visaoBase === 'DRE' || visaoBase === 'SME') && | ||
<div className='row mt-3'> | ||
<div className="form-check check-apenas-usuarios-da-unidade"> | ||
<input | ||
onChange={(e) => handleChangeFormFilter(e.target.name, e.target.checked)} | ||
checked={formFilter.apenasUsuariosDaUnidade} | ||
name={`apenasUsuariosDaUnidade`} | ||
id={`apenasUsuariosDaUnidade`} | ||
type="checkbox" | ||
className="form-check-input" | ||
/> | ||
<label className="form-check-label" htmlFor={`apenasUsuariosDaUnidade`}>Selecionar usuários da própria unidade.</label> | ||
</div> | ||
</div> | ||
} | ||
|
||
<div className={"barra-botoes-filtro d-flex justify-content-end mt-n2"}> | ||
<button onClick={() => clearFilter()} type="reset" | ||
className="btn btn btn-outline-success mt-2 mr-2">Limpar | ||
</button> | ||
<button type="submit" className="btn btn-success mt-2">Filtrar</button> | ||
</div> | ||
</form> | ||
); | ||
}; |
25 changes: 25 additions & 0 deletions
25
src/componentes/Globais/GestaoDeUsuarios/GestaoDeUsuariosMain.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React from "react"; | ||
import {useGruposAcesso} from "./hooks/useGruposAcesso"; | ||
import {GruposAcessoInfo} from "./GruposAcessoInfo"; | ||
import {ListaUsuarios} from "./ListaUsuarios"; | ||
import {useUsuarios} from "./hooks/useUsuarios"; | ||
import {BarraTopoLista} from "./BarraTopoLista"; | ||
import {FormFiltros} from "./FormFiltros"; | ||
import {Paginacao} from "./Paginacao"; | ||
|
||
export const GestaoDeUsuariosMain = () => { | ||
const { data: grupos } = useGruposAcesso(); | ||
const { data: usuarios, isLoading } = useUsuarios(); | ||
return ( | ||
<> | ||
<p>Faça a gestão dos seus usuários e determine seus perfis atrelando-os aos grupos de acesso.</p> | ||
<GruposAcessoInfo grupos={grupos}/> | ||
<BarraTopoLista/> | ||
<FormFiltros grupos={grupos}/> | ||
<ListaUsuarios usuarios={usuarios?.results} isLoading={isLoading}/> | ||
{! isLoading && | ||
<Paginacao/> | ||
} | ||
</> | ||
) | ||
} |
Oops, something went wrong.