Skip to content

Commit

Permalink
Merge pull request #2461 from prefeiturasp/feature/124182-parametriza…
Browse files Browse the repository at this point in the history
…cao-tipos-de-documentos

Feature/124182 parametrizacao tipos de documentos
  • Loading branch information
jardimmatos authored Jan 10, 2025
2 parents f297a5d + 28cedb3 commit 6ea6189
Show file tree
Hide file tree
Showing 11 changed files with 714 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React from "react";
import {RetornaSeTemPermissaoEdicaoPainelParametrizacoes} from "../../../Parametrizacoes/RetornaSeTemPermissaoEdicaoPainelParametrizacoes"

export const BtnAdd = ({FontAwesomeIcon, faPlus, setShowModalForm, initialStateFormModal, setStateFormModal}) =>{
const TEM_PERMISSAO_EDICAO_PAINEL_PARAMETRIZACOES = RetornaSeTemPermissaoEdicaoPainelParametrizacoes()
return(
<div className="d-flex justify-content-end pb-4 mt-2">
<button onClick={()=>{
setStateFormModal(initialStateFormModal);
setShowModalForm(true);
}
} type="button" className="btn btn-success mt-2" disabled={!TEM_PERMISSAO_EDICAO_PAINEL_PARAMETRIZACOES}>
<FontAwesomeIcon
style={{fontSize: '15px', marginRight: "5", color:"#fff"}}
icon={faPlus}/>
Adicionar tipo de documento
</button>
</div>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import React from "react";

export const Filtros = ({stateFiltros, handleChangeFiltros, handleSubmitFiltros, limpaFiltros}) => {
return (
<>
<form>
<div className="form-row">
<div className="form-group col-md-12">
<label htmlFor="filtrar_por_nome">Filtrar por nome</label>
<input
value={stateFiltros.filtrar_por_nome}
onChange={(e) => handleChangeFiltros(e.target.name, e.target.value)}
name='filtrar_por_nome'
id="filtrar_por_nome"
type="text"
className="form-control"
placeholder='Escreva o nome do tipo'
/>
</div>
</div>
<div className="d-flex justify-content-end mt-n2">
<button onClick={() => limpaFiltros()} type="button" className="btn btn btn-outline-success mr-2">Limpar</button>
<button onClick={handleSubmitFiltros} type="button" className="btn btn-success">Filtrar</button>
</div>
</form>
</>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import {ModalBootstrap} from "../../../../Globais/ModalBootstrap";
import React from "react";

export const ModalConfirmDelete = (props) => {
return (
<ModalBootstrap
show={props.show}
onHide={props.handleClose}
titulo={props.titulo}
bodyText={props.texto}
primeiroBotaoOnclick={props.handleClose}
primeiroBotaoTexto={props.primeiroBotaoTexto}
primeiroBotaoCss={props.primeiroBotaoCss}
segundoBotaoOnclick={props.onDeleteTrue}
segundoBotaoCss={props.segundoBotaoCss}
segundoBotaoTexto={props.segundoBotaoTexto}
/>
)
};

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import {ModalBootstrap} from "../../../../Globais/ModalBootstrap";
import React from "react";

export const ModalInfoNaoPodeExcluir = (props) => {
return (
<ModalBootstrap
show={props.show}
onHide={props.handleClose}
titulo={props.titulo}
bodyText={props.texto}
primeiroBotaoOnclick={props.handleClose}
primeiroBotaoTexto={props.primeiroBotaoTexto}
primeiroBotaoCss={props.primeiroBotaoCss}
/>
)
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import {ModalBootstrap} from "../../../../Globais/ModalBootstrap";
import React from "react";

export const ModalInfoUpdateNaoPermitido = (props) => {
return (
<ModalBootstrap
show={props.show}
onHide={props.handleClose}
titulo={props.titulo}
bodyText={props.texto}
primeiroBotaoOnclick={props.handleClose}
primeiroBotaoTexto={props.primeiroBotaoTexto}
primeiroBotaoCss={props.primeiroBotaoCss}
/>
)
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React, {memo} from "react";
import { DataTable } from 'primereact/datatable';
import { Column } from 'primereact/column';

const Tabela = ({rowsPerPage, lista, acoesTemplate})=>{
return(
<DataTable
value={lista}
rows={rowsPerPage}
paginator={lista.length > rowsPerPage}
paginatorTemplate="PrevPageLink PageLinks NextPageLink"
>
<Column field="nome" header="Nome" />
<Column
field="acoes"
header="Ações"
body={acoesTemplate}
style={{width:'100px'}}
/>
</DataTable>
);
};
export default memo(Tabela)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import * as yup from "yup";

export const YupSignupSchemaTags = yup.object().shape({
nome: yup.string().required("Nome é obrigatório"),
});
Loading

0 comments on commit 6ea6189

Please sign in to comment.