|
|
@ -137,7 +137,8 @@ const initSocket = () => { |
|
|
|
'download.progress', |
|
|
|
'parse.start', |
|
|
|
'parse.end', |
|
|
|
'parse.error' |
|
|
|
'parse.error', |
|
|
|
'parse.data' |
|
|
|
]; |
|
|
|
for(let event of events) { |
|
|
|
socket.on(event, function(data) { |
|
|
@ -145,6 +146,14 @@ const initSocket = () => { |
|
|
|
toastr.error(data.message); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (event === 'parse.end' && data.generated) { |
|
|
|
const $form__result = $('#form__result'); |
|
|
|
$form__result.removeClass('d-none'); |
|
|
|
$form__result.find('a').attr('href', `/csv/${data.generated}`) |
|
|
|
$form__result.find('a').html(data.generated); |
|
|
|
} |
|
|
|
|
|
|
|
toastr.info(data.message); |
|
|
|
}); |
|
|
|
} |
|
|
|