mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 22:07:29 -08:00
Swap file_id for activeFileId
This commit is contained in:
parent
b4ed01243b
commit
cfca1514c0
|
@ -30,8 +30,6 @@ class Importer extends Component
|
|||
public $send_welcome;
|
||||
public $run_backup;
|
||||
public $field_map; // we need a separate variable for the field-mapping, because the keys in the normal array are too complicated for Livewire to understand
|
||||
// @todo: remove the need for this by using $activeFileId
|
||||
public $file_id; // TODO: I can't figure out *why* we need this, but it really seems like we do. I can't seem to pull the id from the activeFile for some reason?
|
||||
|
||||
// Make these variables public - we set the properties in the constructor so we can localize them (versus the old static arrays)
|
||||
public $accessories_fields;
|
||||
|
@ -515,7 +513,6 @@ class Importer extends Component
|
|||
$this->field_map[] = null; // re-inject the 'nulls' if a file was imported with some 'Do Not Import' settings
|
||||
}
|
||||
}
|
||||
$this->file_id = $id;
|
||||
$this->import_errors = null;
|
||||
$this->statusText = null;
|
||||
|
||||
|
|
|
@ -340,10 +340,10 @@
|
|||
// console.warn("Here is the mappings:")
|
||||
// console.dir(mappings)
|
||||
// console.warn("Uh, active file id is, I guess: "+$wire.$get('activeFile.id'))
|
||||
var this_file = $wire.$get('file_id'); // okay, I actually don't know what I'm doing here.
|
||||
var file_id = $wire.$get('activeFileId');
|
||||
$.post({
|
||||
{{-- I want to do something like: route('api.imports.importFile', $activeFile->id) }} --}}
|
||||
url: "api/v1/imports/process/"+this_file, // maybe? Good a guess as any..FIXME. HARDCODED DUMB FILE
|
||||
url: "api/v1/imports/process/"+file_id, // maybe? Good a guess as any..FIXME. HARDCODED DUMB FILE
|
||||
contentType: 'application/json',
|
||||
data: JSON.stringify({
|
||||
'import-update': !!$wire.$get('update'),
|
||||
|
|
Loading…
Reference in a new issue