-
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 #1978 from prefeiturasp/release/8.10.0
Release/8.10.0
- Loading branch information
Showing
49 changed files
with
1,714 additions
and
771 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,69 @@ | ||
import React from "react"; | ||
import {Button} from "react-bootstrap"; | ||
import { openModal, closeModal } from "../../../store/reducers/componentes/Globais/Modal/actions"; | ||
import IconeConfirmacao from "../../../assets/img/icone-modal-confirmacao.svg" | ||
import IconeClose from "../../../assets/img/icone-close.svg" | ||
import "./modal-bootstrap.scss" | ||
import "./custom-modal.scss" | ||
|
||
export function CustomModalConfirm({ | ||
dispatch, | ||
title, | ||
message, | ||
dataQa, | ||
cancelText = "Cancelar", | ||
onCancel, | ||
confirmText = "Confirmar", | ||
onConfirm, | ||
}) { | ||
|
||
function handleClose() { | ||
if (onCancel) { | ||
onCancel(); | ||
} | ||
|
||
dispatch(closeModal()); | ||
} | ||
|
||
function handleConfirm() { | ||
if (onConfirm) { | ||
onConfirm(); | ||
} | ||
handleClose(); | ||
} | ||
|
||
return dispatch( | ||
openModal({ | ||
children: ( | ||
<div className="row text-center d-flex align-items-center justify-content-center" style={{padding: '10% 15%'}}> | ||
<div className="w-100 d-flex justify-content-end"> | ||
<button onClick={handleClose} className="btn p-0"> | ||
<img src={IconeClose} alt="IconeClose" className="img-fluid"/> | ||
</button> | ||
</div> | ||
<img src={IconeConfirmacao} alt="IconeConfirmacao" className="img-fluid mb-3"/> | ||
<h4 className="custom-modal-title">{title}</h4> | ||
<p className="custom-modal-message">{message}</p> | ||
<div className="col-12 mt-3 d-flex justify-content-center"> | ||
<Button | ||
onClick={handleClose} | ||
className="btn-outline-success" | ||
data-qa={dataQa ? `${dataQa}-btn-${cancelText}` : ""} | ||
> | ||
{cancelText} | ||
</Button> | ||
{onConfirm ? ( | ||
<Button | ||
onClick={handleConfirm} | ||
className="btn btn-success ml-2" | ||
data-qa={dataQa ? `${dataQa}-btn-${confirmText}` : ""} | ||
> | ||
{confirmText} | ||
</Button> | ||
) : null} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React from "react"; | ||
import { useDispatch, useSelector } from "react-redux"; | ||
import {Modal} from "react-bootstrap"; | ||
import { closeModal as close } from "../../../store/reducers/componentes/Globais/Modal/actions"; | ||
|
||
|
||
function ModalDialog() { | ||
const dispatch = useDispatch(); | ||
const {open, options} = useSelector(state => state.Modal) | ||
|
||
function handleClose() { | ||
dispatch(close()); | ||
} | ||
return ( | ||
<Modal | ||
centered | ||
show={open} | ||
onHide={handleClose} | ||
> | ||
{options.children} | ||
</Modal> | ||
); | ||
} | ||
|
||
export default ModalDialog; |
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,62 @@ | ||
import React from "react"; | ||
import {Modal} from "react-bootstrap"; | ||
import { openModal, closeModal } from "../../../store/reducers/componentes/Globais/Modal/actions"; | ||
import "./modal-bootstrap.scss" | ||
|
||
export function ModalConfirm({ | ||
dispatch, | ||
title, | ||
message, | ||
dataQa, | ||
cancelText = "Cancelar", | ||
onCancel, | ||
confirmText = "Confirmar", | ||
onConfirm, | ||
}) { | ||
|
||
|
||
function handleClose() { | ||
if (onCancel) { | ||
onCancel(); | ||
} | ||
|
||
dispatch(closeModal()); | ||
} | ||
|
||
function handleConfirm() { | ||
if (onConfirm) { | ||
onConfirm(); | ||
} | ||
handleClose(); | ||
} | ||
|
||
|
||
return dispatch( | ||
openModal({ | ||
children: ( | ||
<> | ||
<Modal.Header> | ||
<Modal.Title>{title}</Modal.Title> | ||
</Modal.Header> | ||
<Modal.Body> | ||
{message} | ||
</Modal.Body> | ||
<Modal.Footer> | ||
<button data-qa={dataQa ? `${dataQa}-btn-${cancelText}` : ""} | ||
onClick={handleClose} | ||
className="btn btn-outline-success"> | ||
{cancelText} | ||
</button> | ||
{onConfirm ? ( | ||
<button data-qa={dataQa ? `${dataQa}-btn-${confirmText}` : ""} | ||
onClick={handleConfirm} | ||
className="btn btn btn-success mt-2"> | ||
{confirmText} | ||
</button> | ||
) : null} | ||
</Modal.Footer> | ||
</> | ||
), | ||
}) | ||
); | ||
} |
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,47 @@ | ||
import React from "react"; | ||
import {Button, Modal} from "react-bootstrap"; | ||
import { openModal, closeModal } from "../../../store/reducers/componentes/Globais/Modal/actions"; | ||
import "./modal-bootstrap.scss" | ||
|
||
export function ModalInfo({ | ||
dispatch, | ||
title, | ||
message, | ||
dataQa, | ||
cancelText = "Fechar", | ||
onCancel, | ||
}) { | ||
|
||
|
||
function handleClose() { | ||
if (onCancel) { | ||
onCancel(); | ||
} | ||
|
||
dispatch(closeModal()); | ||
} | ||
|
||
return dispatch( | ||
openModal({ | ||
children: ( | ||
<> | ||
<Modal.Header> | ||
<Modal.Title>{title}</Modal.Title> | ||
</Modal.Header> | ||
<Modal.Body> | ||
{message} | ||
</Modal.Body> | ||
<Modal.Footer> | ||
<Button | ||
data-qa={dataQa ? `${dataQa}-btn-${cancelText}` : ""} | ||
onClick={handleClose} | ||
className="btn btn-outline-success" | ||
> | ||
{cancelText} | ||
</Button> | ||
</Modal.Footer> | ||
</> | ||
), | ||
}) | ||
); | ||
} |
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,10 @@ | ||
@import 'src/assets/css/variaveis.scss'; | ||
|
||
.custom-modal-title{ | ||
font-weight: 700; | ||
color: $corFonte; | ||
} | ||
.custom-modal-message{ | ||
font-size: 18px; | ||
color: $corFonte; | ||
} |
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,18 @@ | ||
@import "../../../assets/css/variaveis"; | ||
|
||
.btn-success { | ||
background-color: $corBtnSuccess; | ||
border-color: $corBtnSuccess; | ||
} | ||
|
||
.btn-outline-success { | ||
border-color: $corBtnSuccess; | ||
color: $corBtnSuccess; | ||
background-color: transparent; | ||
} | ||
|
||
.btn-outline-success:hover, .btn-success:hover { | ||
color: #fff; | ||
background-color: $corBtnSuccess; | ||
border-color: $corBtnSuccess; | ||
} |
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,38 @@ | ||
import React from "react"; | ||
import { Modal } from 'antd'; | ||
import "./modal-antdesign.scss" | ||
import IconeAvisoVermelho from "../../../assets/img/icone-modal-aviso-vermelho.svg" | ||
|
||
|
||
export const ModalAntDesignAviso = (propriedades) => { | ||
return( | ||
<div className="modal-ant-design"> | ||
<Modal | ||
open={propriedades.handleShow} | ||
onCancel={propriedades.handleCancel} | ||
cancelText={propriedades.cancelText} | ||
wrapClassName={'modal-ant-design'} | ||
okButtonProps={{ style: { display: 'none' } }} | ||
> | ||
<div className="row"> | ||
<div className="col-md-auto col-lg-12"> | ||
<div className="text-center"> | ||
<img src={IconeAvisoVermelho} alt="" className="img-fluid"/> | ||
</div> | ||
</div> | ||
|
||
<div className="col-md-auto col-lg-12 mt-3"> | ||
<div className="text-center"> | ||
<p className="title-modal-antdesign-aviso">{propriedades.titulo}</p> | ||
</div> | ||
<div className="text-center mt-2"> | ||
<p className="text-modal-antdesign-aviso">{propriedades.bodyText}</p> | ||
</div> | ||
</div> | ||
</div> | ||
</Modal> | ||
</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
Oops, something went wrong.