diff --git a/app/Models/User.php b/app/Models/User.php
index 1f57f91907..73a30b229b 100644
--- a/app/Models/User.php
+++ b/app/Models/User.php
@@ -285,7 +285,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
*/
public function assets()
{
- return $this->morphMany(\App\Models\Asset::class, 'assigned', 'assigned_type', 'assigned_to')->withTrashed();
+ return $this->morphMany(\App\Models\Asset::class, 'assigned', 'assigned_type', 'assigned_to')->withTrashed()->orderBy('id');
}
/**
@@ -313,7 +313,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
public function accessories()
{
return $this->belongsToMany(\App\Models\Accessory::class, 'accessories_users', 'assigned_to', 'accessory_id')
- ->withPivot('id', 'created_at', 'note')->withTrashed();
+ ->withPivot('id', 'created_at', 'note')->withTrashed()->orderBy('accessory_id');
}
/**
diff --git a/resources/views/notifications/markdown/user-inventory.blade.php b/resources/views/notifications/markdown/user-inventory.blade.php
index d597338549..c7dfba9a30 100644
--- a/resources/views/notifications/markdown/user-inventory.blade.php
+++ b/resources/views/notifications/markdown/user-inventory.blade.php
@@ -9,9 +9,18 @@
## {{ $assets->count() }} {{ trans('general.assets') }}
-{{ trans('mail.name') }} | {{ trans('mail.asset_tag') }} | {{ trans('admin/hardware/table.serial') }} |
+ {{ trans('mail.name') }} | {{ trans('mail.asset_tag') }} | {{ trans('admin/hardware/table.serial') }} | |
@foreach($assets as $asset)
-{{ $asset->present()->name }} | {{ $asset->asset_tag }} | {{ $asset->serial }} |
+
+ {{ $asset->present()->name }} |
+ {{ $asset->asset_tag }} |
+ {{ $asset->serial }} |
+ @if (($snipeSettings->show_images_in_email =='1') && $asset->getImageUrl())
+
+
+ |
+ @endif
+
@endforeach
@endif
@@ -20,9 +29,16 @@
## {{ $accessories->count() }} {{ trans('general.accessories') }}
-{{ trans('mail.name') }} |
+ {{ trans('mail.name') }} | |
@foreach($accessories as $accessory)
-{{ $accessory->name }} |
+
+ {{ $accessory->name }} |
+ @if (($snipeSettings->show_images_in_email =='1') && $accessory->getImageUrl())
+
+
+ |
+ @endif
+
@endforeach
@endif
@@ -33,7 +49,9 @@
|
@foreach($licenses as $license)
-{{ $license->name }} |
+
+ {{ $license->name }} |
+
@endforeach
@endif