mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 10:24:31 -04:00
Working on import
This commit is contained in:
parent
ab67faf362
commit
5791e2bc9f
@ -37,7 +37,7 @@ class ImportController extends BaseController
|
||||
$destinationPath = storage_path() . '/import';
|
||||
$extension = $file->getClientOriginalExtension();
|
||||
|
||||
if (! in_array($extension, ['csv', 'xls', 'json'])) {
|
||||
if (! in_array($extension, ['csv', 'xls', 'xlsx', 'json'])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -72,7 +72,7 @@ class ImportController extends BaseController
|
||||
'include_settings' => $includeSettings,
|
||||
];
|
||||
$this->dispatch(new ImportData(Auth::user(), IMPORT_JSON, $settings));
|
||||
$message = 'started...';
|
||||
$message = trans('texts.import_started');
|
||||
}
|
||||
} else {
|
||||
if (config('queue.default') === 'sync') {
|
||||
@ -84,7 +84,7 @@ class ImportController extends BaseController
|
||||
'source' => $source,
|
||||
];
|
||||
$this->dispatch(new ImportData(Auth::user(), false, $settings));
|
||||
$message = 'started...';
|
||||
$message = trans('texts.import_started');
|
||||
}
|
||||
}
|
||||
return redirect('/settings/' . ACCOUNT_IMPORT_EXPORT)->withWarning($message);
|
||||
@ -112,7 +112,7 @@ class ImportController extends BaseController
|
||||
'headers' => $headers,
|
||||
];
|
||||
$this->dispatch(new ImportData(Auth::user(), IMPORT_CSV, $settings));
|
||||
$message = 'started...';
|
||||
$message = trans('texts.import_started');
|
||||
}
|
||||
|
||||
return redirect('/settings/' . ACCOUNT_IMPORT_EXPORT)->withWarning($message);
|
||||
|
@ -229,7 +229,7 @@ class ImportService
|
||||
}
|
||||
}
|
||||
|
||||
unlink($fileName);
|
||||
@unlink($fileName);
|
||||
|
||||
return $this->results;
|
||||
}
|
||||
@ -321,7 +321,7 @@ class ImportService
|
||||
}
|
||||
}
|
||||
|
||||
unlink($fileName);
|
||||
@unlink($fileName);
|
||||
|
||||
return $results;
|
||||
}
|
||||
@ -726,7 +726,7 @@ class ImportService
|
||||
}
|
||||
}
|
||||
|
||||
unlink($fileName);
|
||||
@unlink(storage_path() . '/import/' . $fileName);
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
@ -2462,6 +2462,7 @@ $LANG = array(
|
||||
'bcc_email_help' => 'Privately include this address with client emails.',
|
||||
'import_complete' => 'Your import has successfully completed.',
|
||||
'confirm_account_to_import' => 'Please confirm your account to import data.',
|
||||
'import_started' => 'Your import has started, we\'ll send you an email once it completes.',
|
||||
|
||||
);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user