@section('title') {{ trans('general.import') }} @parent @stop
{{-- Livewire requires a 'master'
, above --}}
{{-- alert --}} @if($message != '')
@if($message_type == 'success') @endif {{-- title --}} {{ $message }}
@endif @if($import_errors)
{{ trans('general.warning', ['warning'=> trans('general.errors_importing')]) }}
@php \Log::debug("import errors are: ".print_r($import_errors,true)); @endphp @foreach($import_errors AS $key => $actual_import_errors) @php \Log::debug("Key is: $key"); @endphp @foreach($actual_import_errors AS $table => $error_bag) @php \Log::debug("Table is: $table"); @endphp @foreach($error_bag as $field => $error_list) @php \Log::debug("Field is: $field"); @endphp @endforeach @endforeach @endforeach
{{ trans('general.item') }} {{ trans('general.error') }}
{{ $activeFile->file_path ?? "Unknown File" }} {{ $field }}: {{ implode(", ",$error_list) }}
@endif
@if($progress != -1)
{{-- so someof these values are in importer.vue! --}}
{{ $progress_message }}
@endif
@if (!config('app.lock_passwords')) {{ trans('button.select_file') }} @endif
@foreach($files as $currentFile) @if( $currentFile && $activeFile && ($currentFile->id == $activeFile->id)) @endif @endforeach
{{ trans('general.file_name') }} {{ trans('general.created_at') }} {{ trans('general.filesize') }} {{ trans('general.actions') }}
{{ $currentFile->file_path }} {{ Helper::getFormattedDateObject($currentFile->created_at, 'datetime', false) }} {{ Helper::formatFilesizeUnits($currentFile->filesize) }}
{{ Form::select('activeFile.import_type', $importTypes, $activeFile->import_type, [ 'id' => 'import_type', 'class' => 'livewire-select2', 'style' => 'min-width: 350px', 'data-placeholder' => trans('general.select_var', ['thing' => trans('general.import_type')]), 'placeholder' => '', //needed so that the form-helper will put an empty option first '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)

{{ trans('general.auto_incrementing_asset_tags_disabled_so_tags_required') }}

@endif
@if ($activeFile->import_type === 'asset' && $snipeSettings->auto_increment_assets == 1 && $update)

{{ trans('general.auto_incrementing_asset_tags_enabled_so_now_assets_will_be_created') }}

@endif
@if($statusText)
{!! $statusText !!}
@endif @if ($activeFile->import_type)

Map {{ ucwords($activeFile->import_type) }} Import Fields


{{ trans('general.csv_header_field') }}
{{ trans('general.import_field') }}
{{ trans('general.sample_value') }}
@if($activeFile->header_row) @foreach($activeFile->header_row as $index => $header)
{{ Form::select('field_map.'.$index, $columnOptions[$activeFile->import_type], @$field_map[$index], [ 'class' => 'mappings livewire-select2', 'placeholder' => trans('general.importer.do_not_import'), 'style' => 'min-width: 100%', 'data-livewire-component' => $_instance->id ],[ '-' => ['disabled' => true] // this makes the "-----" line unclickable ]) }}

{{ str_limit($activeFile->first_row[$index], 50, '...') }}

@endforeach @else {{ trans('general.no_headers') }} @endif @if($statusText)
{!! $statusText !!}
@endif @else @endif {{-- end of if ... activeFile->import_type --}}

{{ trans('general.importing') }}

{!! trans('general.importing_help') !!}

@push('js') @endpush