A free open source IT asset/license management system
Swap file_id for activeFileId
Marcus Moorecfca1514c00e
diff --git a/app/Livewire/Importer.php b/app/Livewire/Importer.phpindex 49884dc6dd..f3a461d313 100644--- a/app/Livewire/Importer.php+++ b/app/Livewire/Importer.php@@ -30,8 +30,6 @@ class Importer extends Componentpublic $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;diff --git a/resources/views/livewire/importer.blade.php b/resources/views/livewire/importer.blade.phpindex ecc2c25836..081f7d3880 100644--- a/resources/views/livewire/importer.blade.php+++ b/resources/views/livewire/importer.blade.php@@ -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 FILEcontentType: 'application/json',data: JSON.stringify({'import-update': !!$wire.$get('update'),