Merge pull request #13787 from inietov/fixes/errorexception_undefined_array_key

Fixed ErrorException: Undefined array key in importer blade [sc-23864]
This commit is contained in:
snipe 2023-10-25 07:47:48 +01:00 committed by GitHub
commit 8c93e79397
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -30,5 +30,6 @@ return [
'consumables' => 'Consumables are anything purchased that will be used up over time. For example, printer ink or copier paper.',
'depreciations' => 'You can set up asset depreciations to depreciate assets based on straight-line depreciation.',
'empty_file' => 'The importer detects that this file is empty.'
];

View file

@ -235,9 +235,16 @@
])
}}
</div>
@if ($activeFile->first_row)
<div class="col-md-5">
<p class="form-control-static">{{ str_limit($activeFile->first_row[$index], 50, '...') }}</p>
</div>
@else
@php
$statusText = trans('help.empty_file');
$statusType = 'info';
@endphp
@endif
</div><!-- /div row -->
@endforeach
@else