-
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 #2461 from prefeiturasp/feature/124182-parametriza…
…cao-tipos-de-documentos Feature/124182 parametrizacao tipos de documentos
- Loading branch information
Showing
11 changed files
with
714 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
src/componentes/sme/Parametrizacoes/Despesas/TiposDocumento/BtnAdd.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,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> | ||
); | ||
}; |
28 changes: 28 additions & 0 deletions
28
src/componentes/sme/Parametrizacoes/Despesas/TiposDocumento/Filtros.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,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> | ||
</> | ||
); | ||
}; |
19 changes: 19 additions & 0 deletions
19
src/componentes/sme/Parametrizacoes/Despesas/TiposDocumento/ModalConfirmDelete.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,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} | ||
/> | ||
) | ||
}; |
252 changes: 252 additions & 0 deletions
252
src/componentes/sme/Parametrizacoes/Despesas/TiposDocumento/ModalForm.js
Large diffs are not rendered by default.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
src/componentes/sme/Parametrizacoes/Despesas/TiposDocumento/ModalInfoNaoPodeExcluir.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,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} | ||
/> | ||
) | ||
}; |
16 changes: 16 additions & 0 deletions
16
src/componentes/sme/Parametrizacoes/Despesas/TiposDocumento/ModalInfoUpdateNaoPermitido.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,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} | ||
/> | ||
) | ||
}; |
23 changes: 23 additions & 0 deletions
23
src/componentes/sme/Parametrizacoes/Despesas/TiposDocumento/Tabela.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,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) |
5 changes: 5 additions & 0 deletions
5
src/componentes/sme/Parametrizacoes/Despesas/TiposDocumento/YupSignupSchemaTags.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,5 @@ | ||
import * as yup from "yup"; | ||
|
||
export const YupSignupSchemaTags = yup.object().shape({ | ||
nome: yup.string().required("Nome é obrigatório"), | ||
}); |
Oops, something went wrong.