Swap file_id for activeFileId
This commit is contained in:
parent
b4ed01243b
commit
cfca1514c0
2 changed files with 2 additions and 5 deletions
|
@ -30,8 +30,6 @@ class Importer extends Component
|
||||||
public $send_welcome;
|
public $send_welcome;
|
||||||
public $run_backup;
|
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
|
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)
|
// Make these variables public - we set the properties in the constructor so we can localize them (versus the old static arrays)
|
||||||
public $accessories_fields;
|
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->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->import_errors = null;
|
||||||
$this->statusText = null;
|
$this->statusText = null;
|
||||||
|
|
||||||
|
|
|
@ -340,10 +340,10 @@
|
||||||
// console.warn("Here is the mappings:")
|
// console.warn("Here is the mappings:")
|
||||||
// console.dir(mappings)
|
// console.dir(mappings)
|
||||||
// console.warn("Uh, active file id is, I guess: "+$wire.$get('activeFile.id'))
|
// 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({
|
$.post({
|
||||||
{{-- I want to do something like: route('api.imports.importFile', $activeFile->id) }} --}}
|
{{-- 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',
|
contentType: 'application/json',
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
'import-update': !!$wire.$get('update'),
|
'import-update': !!$wire.$get('update'),
|
||||||
|
|
Loading…
Add table
Reference in a new issue