mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-11 15:16:27 +00:00
First start for CSV file import.
This commit is contained in:
21
public/js/ff/import/status_v2.js
vendored
21
public/js/ff/import/status_v2.js
vendored
@@ -63,6 +63,9 @@ function reportJobJSONDone(data) {
|
||||
// redirect user to configuration for this job.
|
||||
window.location.replace(jobConfigurationUri);
|
||||
break;
|
||||
case 'error':
|
||||
reportJobError();
|
||||
break;
|
||||
case 'provider_finished':
|
||||
// call routine to store stuff:
|
||||
sendJobPOSTStore();
|
||||
@@ -226,6 +229,24 @@ function reportJobPOSTFailure(xhr, status, error) {
|
||||
// show error box.
|
||||
}
|
||||
|
||||
/**
|
||||
* Show error to user.
|
||||
*/
|
||||
function reportJobError() {
|
||||
console.log('In reportJobError()');
|
||||
// cancel checking again for job status:
|
||||
clearTimeout(timeOutId);
|
||||
|
||||
// hide status boxes:
|
||||
$('.statusbox').hide();
|
||||
|
||||
// show fatal error box:
|
||||
$('.fatal_error').show();
|
||||
|
||||
$('.fatal_error_txt').text('Job reports error. Please start again. Apologies.');
|
||||
// show error box.
|
||||
}
|
||||
|
||||
function reportJobPOSTDone(data) {
|
||||
console.log('In function reportJobPOSTDone() with status "' + data.status + '"');
|
||||
if (data.status === 'NOK') {
|
||||
|
Reference in New Issue
Block a user