Novo caminho no botao de back #6764
This commit is contained in:
parent
358a50c70b
commit
e1318a3d4e
@ -1125,6 +1125,7 @@ const PDFViewerApplication = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.pdfSaveCfazDialog?.setMessageContent('Arquivo enviado com sucesso.');
|
this.pdfSaveCfazDialog?.setMessageContent('Arquivo enviado com sucesso.');
|
||||||
|
window.pdfWasSaved = true;
|
||||||
} catch (reason) {
|
} catch (reason) {
|
||||||
// When the PDF document isn't ready, or the PDF file is still
|
// When the PDF document isn't ready, or the PDF file is still
|
||||||
// downloading, simply fallback to a "regular" download.
|
// downloading, simply fallback to a "regular" download.
|
||||||
@ -1208,7 +1209,14 @@ const PDFViewerApplication = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
backButton() {
|
backButton() {
|
||||||
|
backButton.disabled = true;
|
||||||
|
const requestId = document.getElementById('request_id')?.value;
|
||||||
|
if (window.pdfWasSaved) {
|
||||||
|
return window.location.href = `/requests/${requestId}`
|
||||||
|
} else {
|
||||||
window.history.back();
|
window.history.back();
|
||||||
|
backButton.disabled = false;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Report the error; used for errors affecting loading and/or parsing of
|
* Report the error; used for errors affecting loading and/or parsing of
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user