diff --git a/app/Http/Livewire/Importer.php b/app/Http/Livewire/Importer.php
index 784d3b2982..1026a188b3 100644
--- a/app/Http/Livewire/Importer.php
+++ b/app/Http/Livewire/Importer.php
@@ -3,6 +3,7 @@
namespace App\Http\Livewire;
use App\Models\CustomField;
+use Illuminate\Support\Facades\Auth;
use Livewire\Component;
use App\Models\Import;
@@ -16,6 +17,8 @@ class Importer extends Component
{
use AuthorizesRequests;
+ public bool $userIsSuperUser;
+
public $files;
public $progress; //upload progress - '-1' means don't show
@@ -250,6 +253,7 @@ class Importer extends Component
public function mount()
{
$this->authorize('import');
+ $this->userIsSuperUser = Auth::user()->isSuperUser();
$this->progress = -1; // '-1' means 'don't show the progressbar'
$this->progress_bar_class = 'progress-bar-warning';
\Log::debug("Hey, we are calling MOUNT (in the importer-file) !!!!!!!!"); //fcuk
diff --git a/resources/views/livewire/importer.blade.php b/resources/views/livewire/importer.blade.php
index fbe5802d28..22663bc503 100644
--- a/resources/views/livewire/importer.blade.php
+++ b/resources/views/livewire/importer.blade.php
@@ -156,6 +156,11 @@
'data-minimum-results-for-search' => '-1', // Remove this if the list gets long enough that we need to search
'data-livewire-component' => $_instance->id
]) }}
+ @if ($activeFile->import_type === 'asset' && $snipeSettings->auto_increment_assets == 0)
+
+ Generating auto-incrementing asset tags is @if ($userIsSuperUser)disabled @else disabled @endif so all rows need to have the "Asset Tag" column populated.
+
+ @endif
@@ -163,6 +168,11 @@
@@ -344,7 +354,7 @@
'import-update': !!@this.update,
'send-welcome': !!@this.send_welcome,
'import-type': @this.activeFile.import_type,
- 'run-backup': !!@this.run_backup,
+ 'A': !!@this.run_backup,
'column-mappings': mappings
}),
headers: {