fix: ao fechar preview do relatório, reabrir modal de confirmação
This commit is contained in:
@@ -1833,8 +1833,15 @@ function openPrintPreview(data, mode) {
|
|||||||
background: #444; color: #fff; border: none; border-radius: 6px;
|
background: #444; color: #fff; border: none; border-radius: 6px;
|
||||||
font-size: 15px; cursor: pointer;
|
font-size: 15px; cursor: pointer;
|
||||||
`;
|
`;
|
||||||
|
// Salva qual modal estava aberto antes do preview (para reabrir ao fechar)
|
||||||
|
const modalConfirmOpen = document.getElementById('modal-confirm')?.classList.contains('open');
|
||||||
|
|
||||||
btnFechar.onclick = () => {
|
btnFechar.onclick = () => {
|
||||||
document.body.removeChild(overlay);
|
document.body.removeChild(overlay);
|
||||||
|
// Se o modal de confirmação estava aberto antes, reabre ele
|
||||||
|
if (modalConfirmOpen) {
|
||||||
|
document.getElementById('modal-confirm').classList.add('open');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const btnImprimir = document.createElement('button');
|
const btnImprimir = document.createElement('button');
|
||||||
|
|||||||
Reference in New Issue
Block a user