add toast for succes and failed upload
This commit is contained in:
parent
10456d984e
commit
8f7008c910
6 changed files with 64 additions and 2 deletions
|
|
@ -75,9 +75,17 @@ const vueInstance = new Vue({
|
|||
});
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
dropzone.on('complete', (file, xhr, formData) => {
|
||||
dropzone.on('success', (file, xhr, formData) => {
|
||||
pdf_uploaded = true;
|
||||
document.getElementById('btn-group-download').style.display = 'flex';
|
||||
// eslint-disable-next-line no-undef
|
||||
bootstrap.Toast.getOrCreateInstance(document.getElementById('success-upload-toast')).show();
|
||||
});
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
dropzone.on('error', (file, xhr, formData) => {
|
||||
// eslint-disable-next-line no-undef
|
||||
bootstrap.Toast.getOrCreateInstance(document.getElementById('warn-upload-toast')).show();
|
||||
});
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -151,6 +151,14 @@ const vueInstance = new Vue({
|
|||
pdf_uploaded = true;
|
||||
document.getElementById('btn-group-download').style.display = 'flex';
|
||||
this.display_pages();
|
||||
// eslint-disable-next-line no-undef
|
||||
bootstrap.Toast.getOrCreateInstance(document.getElementById('success-upload-toast')).show();
|
||||
});
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
dropzone.on('error', (file, xhr, formData) => {
|
||||
// eslint-disable-next-line no-undef
|
||||
bootstrap.Toast.getOrCreateInstance(document.getElementById('warn-upload-toast')).show();
|
||||
});
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -75,9 +75,17 @@ const vueInstance = new Vue({
|
|||
});
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
dropzone.on('complete', (file, xhr, formData) => {
|
||||
dropzone.on('success', (file, xhr, formData) => {
|
||||
pdf_uploaded = true;
|
||||
document.getElementById('btn-group-download').style.display = 'flex';
|
||||
// eslint-disable-next-line no-undef
|
||||
bootstrap.Toast.getOrCreateInstance(document.getElementById('success-upload-toast')).show();
|
||||
});
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
dropzone.on('error', (file, xhr, formData) => {
|
||||
// eslint-disable-next-line no-undef
|
||||
bootstrap.Toast.getOrCreateInstance(document.getElementById('warn-upload-toast')).show();
|
||||
});
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue