Update user-inventory.blade.php to display asset locations in 'Inventory report' email

Extra column with asset location name added to the table. Location information may be helpful if user has assets in multiple locations.
This commit is contained in:
swift2512 2024-09-11 14:51:58 +03:00 committed by GitHub
parent 7e14f8c6d6
commit 6a2b462dce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -9,13 +9,14 @@
## {{ $assets->count() }} {{ trans('general.assets') }}
<table width="100%">
<tr><th align="left">{{ trans('mail.name') }} </th><th align="left">{{ trans('mail.asset_tag') }}</th><th align="left">{{ trans('admin/hardware/table.serial') }}</th> <th></th> </tr>
<tr><th align="left">{{ trans('mail.name') }} </th><th align="left">{{ trans('mail.asset_tag') }}</th><th align="left">{{ trans('admin/hardware/table.serial') }}</th><th align="left">{{ trans('admin/hardware/table.location') }}</th> <th></th> </tr>
@foreach($assets as $asset)
<tr>
<td>{{ $asset->present()->name }}</td>
<td> {{ $asset->asset_tag }} </td>
<td> {{ $asset->serial }} </td>
@if (($snipeSettings->show_images_in_email =='1') && $asset->getImageUrl())
<td> {{ $asset->location->name }} </td>
@if (($snipeSettings->show_images_in_email =='1') && $asset->getImageUrl())
<td>
<img src="{{ asset($asset->getImageUrl()) }}" alt="Asset" style="max-width: 64px;">
</td>