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