diff --git a/src/assets/js/main.js b/src/assets/js/main.js index b2fb6ac..cc4a371 100644 --- a/src/assets/js/main.js +++ b/src/assets/js/main.js @@ -95,7 +95,7 @@ const initSubmitForm = () => { sendRequest($form.attr('action'), data) .then((response) => { - toastr.success(response.message); + // toastr.success(response.message); $submitBtn.prop('disabled', false); $spinner.addClass('d-none'); if ( response.generated ) { @@ -143,6 +143,16 @@ const initSocket = () => { return; } + if (eventName === 'parse.end') { + toastr.success(data.message, '', { + closeButton: true, + hideDuration: 0, + timeOut: 0, + extendedTimeOut: 0, + }); + return; + } + toastr.info(data.message); }); } diff --git a/src/subscribers/ioSubscriber.js b/src/subscribers/ioSubscriber.js index 1e91d8b..66104b0 100644 --- a/src/subscribers/ioSubscriber.js +++ b/src/subscribers/ioSubscriber.js @@ -32,7 +32,7 @@ const configure = (socket) => { // Create a new listener for the parse.end event emitter.on('parse.end', ({ filepath, columns, count, generated }) => { - socket.emit('parse.end', { event: 'parse.end', message: 'Traitement terminé', generated }); + socket.emit('parse.end', { event: 'parse.end', message: 'Traitement terminé:

Lien de téléchargement ' + generated + '', generated }); }); // Create a new listener for the parse.error event