Skip to content

A free open source IT asset/license management system

Fixed a few more `display_name` instances

snipe28abeab31dcc
diff --git a/app/Console/Commands/Purge.php b/app/Console/Commands/Purge.php
index 351bacf715..4db7bac147 100644
--- a/app/Console/Commands/Purge.php
+++ b/app/Console/Commands/Purge.php
@@ -65,7 +65,7 @@ class Purge extends Command
$maintenances = 0;
foreach ($assets as $asset) {
- $this->info('- Asset "'.$asset->present()->name().'" deleted.');
+ $this->info('- Asset "'.$asset->display_name.'" deleted.');
$asset_assoc += $asset->assetlog()->count();
$asset->assetlog()->forceDelete();
$maintenances += $asset->maintenances()->count();
diff --git a/app/Http/Transformers/ComponentsTransformer.php b/app/Http/Transformers/ComponentsTransformer.php
index 969a137f5c..f7f8c337bf 100644
--- a/app/Http/Transformers/ComponentsTransformer.php
+++ b/app/Http/Transformers/ComponentsTransformer.php
@@ -76,7 +76,7 @@ class ComponentsTransformer
$array[] = [
'assigned_pivot_id' => $asset->pivot->id,
'id' => (int) $asset->id,
- 'name' => e($asset->model->present()->name).' '.e($asset->present()->name),
+ 'name' => e($asset->model->display_name).' '.e($asset->display_name),
'qty' => $asset->pivot->assigned_qty,
'note' => $asset->pivot->note,
'type' => 'asset',
diff --git a/app/Http/Transformers/ProfileTransformer.php b/app/Http/Transformers/ProfileTransformer.php
index a0c07e699f..bdc748dc24 100644
--- a/app/Http/Transformers/ProfileTransformer.php
+++ b/app/Http/Transformers/ProfileTransformer.php
@@ -4,7 +4,6 @@ namespace App\Http\Transformers;
use App\Helpers\Helper;
use App\Models\Actionlog;
-use App\Models\Asset;
use Illuminate\Database\Eloquent\Collection;
class ProfileTransformer
diff --git a/app/Notifications/AuditNotification.php b/app/Notifications/AuditNotification.php
index d33f656ef3..3acce861b4 100644
--- a/app/Notifications/AuditNotification.php
+++ b/app/Notifications/AuditNotification.php
@@ -93,7 +93,7 @@ use NotificationChannels\MicrosoftTeams\MicrosoftTeamsMessage;
}
$message = class_basename(get_class($params['item'])) . ' Audited By '.$admin_user->display_name;
$details = [
- trans('mail.asset') => htmlspecialchars_decode($item->present()->name),
+ trans('mail.asset') => htmlspecialchars_decode($item->display_name),
trans('mail.notes') => $note ?: '',
trans('general.location') => $location ?: '',
];
diff --git a/app/Notifications/CheckinAccessoryNotification.php b/app/Notifications/CheckinAccessoryNotification.php
index b1ce3be29e..45c6fa617d 100644
--- a/app/Notifications/CheckinAccessoryNotification.php
+++ b/app/Notifications/CheckinAccessoryNotification.php
@@ -90,7 +90,7 @@ class CheckinAccessoryNotification extends Notification
->from($botname)
->to($channel)
->attachment(function ($attachment) use ($item, $note, $admin, $fields) {
- $attachment->title(htmlspecialchars_decode($item->present()->name), $item->present()->viewUrl())
+ $attachment->title(htmlspecialchars_decode($item->display_name), $item->present()->viewUrl())
->fields($fields)
->content($note);
});
@@ -107,7 +107,7 @@ class CheckinAccessoryNotification extends Notification
->addStartGroupToSection('activityTitle')
->title(trans('Accessory_Checkin_Notification'))
->addStartGroupToSection('activityText')
- ->fact(htmlspecialchars_decode($item->present()->name), '', 'activityTitle')
+ ->fact(htmlspecialchars_decode($item->display_name), '', 'activityTitle')
->fact(trans('mail.checked_into'), $item->location->name ? $item->location->name : '')
->fact(trans('mail.Accessory_Checkin_Notification')." by ", $admin->display_name)
->fact(trans('admin/consumables/general.remaining'), $item->numRemaining())
@@ -116,7 +116,7 @@ class CheckinAccessoryNotification extends Notification
$message = trans('mail.Accessory_Checkin_Notification');
$details = [
- trans('mail.accessory_name') => htmlspecialchars_decode($item->present()->name),
+ trans('mail.accessory_name') => htmlspecialchars_decode($item->display_name),
trans('mail.checked_into') => $item->location->name ? $item->location->name : '',
trans('mail.Accessory_Checkin_Notification'). ' by' => $admin->display_name,
trans('admin/consumables/general.remaining')=> $item->numRemaining(),
@@ -135,7 +135,7 @@ class CheckinAccessoryNotification extends Notification
Card::create()
->header(
'<strong>'.trans('mail.Accessory_Checkin_Notification').'</strong>' ?: '',
- htmlspecialchars_decode($item->present()->name) ?: '',
+ htmlspecialchars_decode($item->display_name) ?: '',
)
->section(
Section::create(
diff --git a/app/Notifications/CheckinAssetNotification.php b/app/Notifications/CheckinAssetNotification.php
index 2ff65134a9..066c9a14d1 100644
--- a/app/Notifications/CheckinAssetNotification.php
+++ b/app/Notifications/CheckinAssetNotification.php
@@ -97,7 +97,7 @@ class CheckinAssetNotification extends Notification
->from($botname)
->to($channel)
->attachment(function ($attachment) use ($item, $note, $admin, $fields) {
- $attachment->title(htmlspecialchars_decode($item->present()->name), $item->present()->viewUrl())
+ $attachment->title(htmlspecialchars_decode($item->display_name), $item->present()->viewUrl())
->fields($fields)
->content($note);
});
@@ -114,7 +114,7 @@ class CheckinAssetNotification extends Notification
->type('success')
->title(trans('mail.Asset_Checkin_Notification'))
->addStartGroupToSection('activityText')
- ->fact(htmlspecialchars_decode($item->present()->name), '', 'activityText')
+ ->fact(htmlspecialchars_decode($item->display_name), '', 'activityText')
->fact(trans('mail.checked_into'), ($item->location) ? $item->location->name : '')
->fact(trans('mail.Asset_Checkin_Notification') . " by ", $admin->display_name)
->fact(trans('admin/hardware/form.status'), $item->assetstatus?->name)
@@ -124,7 +124,7 @@ class CheckinAssetNotification extends Notification
$message = trans('mail.Asset_Checkin_Notification');
$details = [
- trans('mail.asset') => htmlspecialchars_decode($item->present()->name),
+ trans('mail.asset') => htmlspecialchars_decode($item->display_name),
trans('mail.checked_into') => ($item->location) ? $item->location->name : '',
trans('mail.Asset_Checkin_Notification')." by " => $admin->display_name,
trans('admin/hardware/form.status') => $item->assetstatus?->name,
@@ -145,7 +145,7 @@ class CheckinAssetNotification extends Notification
Card::create()
->header(
'<strong>'.trans('mail.Asset_Checkin_Notification').'</strong>' ?: '',
- htmlspecialchars_decode($item->present()->name) ?: '',
+ htmlspecialchars_decode($item->display_name) ?: '',
)
->section(
Section::create(
diff --git a/app/Notifications/CheckinComponentNotification.php b/app/Notifications/CheckinComponentNotification.php
index 1532d507c7..b302ee8979 100644
--- a/app/Notifications/CheckinComponentNotification.php
+++ b/app/Notifications/CheckinComponentNotification.php
@@ -100,7 +100,7 @@ class CheckinComponentNotification extends Notification
->from($botname)
->to($channel)
->attachment(function ($attachment) use ($item, $note, $admin, $fields) {
- $attachment->title(htmlspecialchars_decode($item->present()->name), $item->present()->viewUrl())
+ $attachment->title(htmlspecialchars_decode($item->display_name), $item->present()->viewUrl())
->fields($fields)
->content($note);
});
@@ -118,7 +118,7 @@ class CheckinComponentNotification extends Notification
->addStartGroupToSection('activityTitle')
->title(trans('mail.Component_checkin_notification'))
->addStartGroupToSection('activityText')
- ->fact(htmlspecialchars_decode($item->present()->name), '', 'header')
+ ->fact(htmlspecialchars_decode($item->display_name), '', 'header')
->fact(trans('mail.Component_checkin_notification')." by ", $admin->display_name ?: 'CLI tool')
->fact(trans('mail.checkedin_from'), $target->display_name)
->fact(trans('admin/consumables/general.remaining'), $item->numRemaining())
@@ -147,7 +147,7 @@ class CheckinComponentNotification extends Notification
Card::create()
->header(
'<strong>'.trans('mail.Component_checkin_notification').'</strong>' ?: '',
- htmlspecialchars_decode($item->present()->name) ?: '',
+ htmlspecialchars_decode($item->display_name) ?: '',
)
->section(
Section::create(
diff --git a/app/Notifications/CheckinLicenseSeatNotification.php b/app/Notifications/CheckinLicenseSeatNotification.php
index f0110db8ba..60eec737d6 100644
--- a/app/Notifications/CheckinLicenseSeatNotification.php
+++ b/app/Notifications/CheckinLicenseSeatNotification.php
@@ -101,7 +101,7 @@ class CheckinLicenseSeatNotification extends Notification
->from($botname)
->to($channel)
->attachment(function ($attachment) use ($item, $note, $admin, $fields) {
- $attachment->title(htmlspecialchars_decode($item->present()->name), $item->present()->viewUrl())
+ $attachment->title(htmlspecialchars_decode($item->display_name), $item->present()->viewUrl())
->fields($fields)
->content($note);
});
@@ -119,7 +119,7 @@ class CheckinLicenseSeatNotification extends Notification
->addStartGroupToSection('activityTitle')
->title(trans('mail.License_Checkin_Notification'))
->addStartGroupToSection('activityText')
- ->fact(htmlspecialchars_decode($item->present()->name), '', 'header')
+ ->fact(htmlspecialchars_decode($item->display_name), '', 'header')
->fact(trans('mail.License_Checkin_Notification')." by ", $admin->display_name ?: 'CLI tool')
->fact(trans('mail.checkedin_from'), $target->display_name)
->fact(trans('admin/consumables/general.remaining'), $item->availCount()->count())
@@ -129,7 +129,7 @@ class CheckinLicenseSeatNotification extends Notification
$message = trans('mail.License_Checkin_Notification');
$details = [
trans('mail.checkedin_from')=> $target->display_name,
- trans('mail.license_for') => htmlspecialchars_decode($item->present()->name),
+ trans('mail.license_for') => htmlspecialchars_decode($item->display_name),
trans('mail.License_Checkin_Notification')." by " => $admin->display_name ?: 'CLI tool',
trans('admin/consumables/general.remaining') => $item->availCount()->count(),
trans('mail.notes') => $note ?: '',
@@ -149,7 +149,7 @@ class CheckinLicenseSeatNotification extends Notification
Card::create()
->header(
'<strong>'.trans('mail.License_Checkin_Notification').'</strong>' ?: '',
- htmlspecialchars_decode($item->present()->name) ?: '',
+ htmlspecialchars_decode($item->display_name) ?: '',
)
->section(
Section::create(
diff --git a/app/Notifications/CheckoutAccessoryNotification.php b/app/Notifications/CheckoutAccessoryNotification.php
index 22dc78b2b3..f1a9551318 100644
--- a/app/Notifications/CheckoutAccessoryNotification.php
+++ b/app/Notifications/CheckoutAccessoryNotification.php
@@ -117,7 +117,7 @@ class CheckoutAccessoryNotification extends Notification
->from($botname)
->to($channel)
->attachment(function ($attachment) use ($item, $note, $admin, $fields) {
- $attachment->title(htmlspecialchars_decode($this->checkout_qty.' x '.$item->present()->name), $item->present()->viewUrl())
+ $attachment->title(htmlspecialchars_decode($this->checkout_qty.' x '.$item->display_name), $item->present()->viewUrl())
->fields($fields)
->content($note);
});
@@ -136,8 +136,8 @@ class CheckoutAccessoryNotification extends Notification
->addStartGroupToSection('activityTitle')
->title(trans('mail.Accessory_Checkout_Notification'))
->addStartGroupToSection('activityText')
- ->fact(htmlspecialchars_decode($item->present()->name), '', 'activityTitle')
- ->fact(trans('mail.assigned_to'), $target->present()->name)
+ ->fact(htmlspecialchars_decode($item->display_name), '', 'activityTitle')
+ ->fact(trans('mail.assigned_to'), $target->display_name)
->fact(trans('general.qty'), $this->checkout_qty)
->fact(trans('mail.checkedout_from'), $item->location->name ? $item->location->name : '')
->fact(trans('mail.Accessory_Checkout_Notification') . " by ", $admin->display_name)
@@ -148,7 +148,7 @@ class CheckoutAccessoryNotification extends Notification
$message = trans('mail.Accessory_Checkout_Notification');
$details = [
trans('mail.assigned_to') => $target->present()->name,
- trans('mail.accessory_name') => htmlspecialchars_decode($item->present()->name),
+ trans('mail.accessory_name') => htmlspecialchars_decode($item->display_name),
trans('general.qty') => $this->checkout_qty,
trans('mail.checkedout_from') => $item->location->name ? $item->location->name : '',
trans('mail.Accessory_Checkout_Notification'). ' by' => $admin->display_name,
@@ -169,7 +169,7 @@ class CheckoutAccessoryNotification extends Notification
Card::create()
->header(
'<strong>'.trans('mail.Accessory_Checkout_Notification').'</strong>' ?: '',
- htmlspecialchars_decode($item->present()->name) ?: '',
+ htmlspecialchars_decode($item->display_name) ?: '',
)
->section(
Section::create(
diff --git a/app/Notifications/CheckoutAssetNotification.php b/app/Notifications/CheckoutAssetNotification.php
index 70ab74c60e..28caaff31b 100644
--- a/app/Notifications/CheckoutAssetNotification.php
+++ b/app/Notifications/CheckoutAssetNotification.php
@@ -114,7 +114,7 @@ class CheckoutAssetNotification extends Notification
->from($botname)
->to($channel)
->attachment(function ($attachment) use ($item, $note, $admin, $fields) {
- $attachment->title(htmlspecialchars_decode($item->present()->name), $item->present()->viewUrl())
+ $attachment->title(htmlspecialchars_decode($item->display_name), $item->present()->viewUrl())
->fields($fields)
->content($note);
});
@@ -133,8 +133,8 @@ class CheckoutAssetNotification extends Notification
->type('success')
->title(trans('mail.Asset_Checkout_Notification'))
->addStartGroupToSection('activityText')
- ->fact(trans('mail.assigned_to'), $target->present()->name)
- ->fact(htmlspecialchars_decode($item->present()->name), '', 'activityText')
+ ->fact(trans('mail.assigned_to'), $target->display_name)
+ ->fact(htmlspecialchars_decode($item->display_name), '', 'activityText')
->fact(trans('mail.Asset_Checkout_Notification') . " by ", $admin->display_name)
->fact(trans('mail.notes'), $note ?: '');
}
@@ -142,7 +142,7 @@ class CheckoutAssetNotification extends Notification
$message = trans('mail.Asset_Checkout_Notification');
$details = [
trans('mail.assigned_to') => $target->present()->name,
- trans('mail.asset') => htmlspecialchars_decode($item->present()->name),
+ trans('mail.asset') => htmlspecialchars_decode($item->display_name),
trans('mail.Asset_Checkout_Notification'). ' by' => $admin->display_name,
trans('mail.notes') => $note ?: '',
];
@@ -160,7 +160,7 @@ public function toGoogleChat()
Card::create()
->header(
'<strong>'.trans('mail.Asset_Checkout_Notification').'</strong>' ?: '',
- htmlspecialchars_decode($item->present()->name) ?: '',
+ htmlspecialchars_decode($item->display_name) ?: '',
)
->section(
Section::create(
diff --git a/app/Notifications/CheckoutComponentNotification.php b/app/Notifications/CheckoutComponentNotification.php
index 11f77e9d47..86ab20fcb4 100644
--- a/app/Notifications/CheckoutComponentNotification.php
+++ b/app/Notifications/CheckoutComponentNotification.php
@@ -97,7 +97,7 @@ class CheckoutComponentNotification extends Notification
->from($botname)
->to($channel)
->attachment(function ($attachment) use ($item, $note, $admin, $fields) {
- $attachment->title(htmlspecialchars_decode($item->present()->name), $item->present()->viewUrl())
+ $attachment->title(htmlspecialchars_decode($item->display_name), $item->present()->viewUrl())
->fields($fields)
->content($note);
});
@@ -116,7 +116,7 @@ class CheckoutComponentNotification extends Notification
->addStartGroupToSection('activityTitle')
->title(trans('mail.Component_checkout_notification'))
->addStartGroupToSection('activityText')
- ->fact(htmlspecialchars_decode($item->present()->name), '', 'activityTitle')
+ ->fact(htmlspecialchars_decode($item->display_name), '', 'activityTitle')
->fact(trans('mail.Component_checkout_notification')." by ", $admin->display_name)
->fact(trans('mail.assigned_to'), $target->display_name)
->fact(trans('admin/consumables/general.remaining'), $item->numRemaining())
@@ -126,7 +126,7 @@ class CheckoutComponentNotification extends Notification
$message = trans('mail.Component_checkout_notification');
$details = [
trans('mail.assigned_to') => $target->display_name,
- trans('mail.item') => htmlspecialchars_decode($item->present()->name),
+ trans('mail.item') => htmlspecialchars_decode($item->display_name),
trans('mail.Component_checkout_notification').' by' => $admin->display_name,
trans('admin/consumables/general.remaining') => $item->numRemaining(),
trans('mail.notes') => $note ?: '',
@@ -146,7 +146,7 @@ class CheckoutComponentNotification extends Notification
Card::create()
->header(
'<strong>'.trans('mail.Component_checkout_notification').'</strong>' ?: '',
- htmlspecialchars_decode($item->present()->name) ?: '',
+ htmlspecialchars_decode($item->display_name) ?: '',
)
->section(
Section::create(
diff --git a/app/Notifications/CheckoutConsumableNotification.php b/app/Notifications/CheckoutConsumableNotification.php
index 0274bbeecf..96568c4bd6 100644
--- a/app/Notifications/CheckoutConsumableNotification.php
+++ b/app/Notifications/CheckoutConsumableNotification.php
@@ -97,7 +97,7 @@ class CheckoutConsumableNotification extends Notification
->from($botname)
->to($channel)
->attachment(function ($attachment) use ($item, $note, $admin, $fields) {
- $attachment->title(htmlspecialchars_decode($item->present()->name), $item->present()->viewUrl())
+ $attachment->title(htmlspecialchars_decode($item->display_name), $item->present()->viewUrl())
->fields($fields)
->content($note);
});
@@ -116,7 +116,7 @@ class CheckoutConsumableNotification extends Notification
->addStartGroupToSection('activityTitle')
->title(trans('mail.Consumable_checkout_notification'))
->addStartGroupToSection('activityText')
- ->fact(htmlspecialchars_decode($item->present()->name), '', 'activityTitle')
+ ->fact(htmlspecialchars_decode($item->display_name), '', 'activityTitle')
->fact(trans('mail.Consumable_checkout_notification')." by ", $admin->display_name)
->fact(trans('mail.assigned_to'), $target->display_name)
->fact(trans('admin/consumables/general.remaining'), $item->numRemaining())
@@ -126,7 +126,7 @@ class CheckoutConsumableNotification extends Notification
$message = trans('mail.Consumable_checkout_notification');
$details = [
trans('mail.assigned_to') => $target->display_name,
- trans('mail.item') => htmlspecialchars_decode($item->present()->name),
+ trans('mail.item') => htmlspecialchars_decode($item->display_name),
trans('mail.Consumable_checkout_notification').' by' => $admin->display_name,
trans('admin/consumables/general.remaining') => $item->numRemaining(),
trans('mail.notes') => $note ?: '',
@@ -146,7 +146,7 @@ class CheckoutConsumableNotification extends Notification
Card::create()
->header(
'<strong>'.trans('mail.Consumable_checkout_notification').'</strong>' ?: '',
- htmlspecialchars_decode($item->present()->name) ?: '',
+ htmlspecialchars_decode($item->display_name) ?: '',
)
->section(
Section::create(
diff --git a/app/Notifications/CheckoutLicenseSeatNotification.php b/app/Notifications/CheckoutLicenseSeatNotification.php
index 4fc2ab7def..43de9f698b 100644
--- a/app/Notifications/CheckoutLicenseSeatNotification.php
+++ b/app/Notifications/CheckoutLicenseSeatNotification.php
@@ -95,7 +95,7 @@ class CheckoutLicenseSeatNotification extends Notification
->from($botname)
->to($channel)
->attachment(function ($attachment) use ($item, $note, $admin, $fields) {
- $attachment->title(htmlspecialchars_decode($item->present()->name), $item->present()->viewUrl())
+ $attachment->title(htmlspecialchars_decode($item->display_name), $item->present()->viewUrl())
->fields($fields)
->content($note);
});
@@ -114,7 +114,7 @@ class CheckoutLicenseSeatNotification extends Notification
->addStartGroupToSection('activityTitle')
->title(trans('mail.License_Checkout_Notification'))
->addStartGroupToSection('activityText')
- ->fact(htmlspecialchars_decode($item->present()->name), '', 'activityTitle')
+ ->fact(htmlspecialchars_decode($item->display_name), '', 'activityTitle')
->fact(trans('mail.License_Checkout_Notification')." by ", $admin->display_name)
->fact(trans('mail.assigned_to'), $target->display_name)
->fact(trans('admin/consumables/general.remaining'), $item->availCount()->count())
@@ -124,7 +124,7 @@ class CheckoutLicenseSeatNotification extends Notification
$message = trans('mail.License_Checkout_Notification');
$details = [
trans('mail.assigned_to') => $target->display_name,
- trans('mail.license_for') => htmlspecialchars_decode($item->present()->name),
+ trans('mail.license_for') => htmlspecialchars_decode($item->display_name),
trans('mail.License_Checkout_Notification').' by' => $admin->display_name,
trans('admin/consumables/general.remaining') => $item->availCount()->count(),
trans('mail.notes') => $note ?: '',
@@ -143,7 +143,7 @@ class CheckoutLicenseSeatNotification extends Notification
Card::create()
->header(
'<strong>'.trans('mail.License_Checkout_Notification').'</strong>' ?: '',
- htmlspecialchars_decode($item->present()->name) ?: '',
+ htmlspecialchars_decode($item->display_name) ?: '',
)
->section(
Section::create(
diff --git a/app/Notifications/RequestAssetCancelation.php b/app/Notifications/RequestAssetCancelation.php
index 0211b17e4e..d6e5f44fd9 100644
--- a/app/Notifications/RequestAssetCancelation.php
+++ b/app/Notifications/RequestAssetCancelation.php
@@ -91,7 +91,7 @@ class RequestAssetCancelation extends Notification
->from($botname)
->to($channel)
->attachment(function ($attachment) use ($item, $note, $fields) {
- $attachment->title(htmlspecialchars_decode($item->present()->name), $item->present()->viewUrl())
+ $attachment->title(htmlspecialchars_decode($item->display_name), $item->present()->viewUrl())
->fields($fields)
->content($note);
});
diff --git a/app/Notifications/RequestAssetNotification.php b/app/Notifications/RequestAssetNotification.php
index e3c99c56f6..85f5aef50c 100644
--- a/app/Notifications/RequestAssetNotification.php
+++ b/app/Notifications/RequestAssetNotification.php
@@ -86,7 +86,7 @@ class RequestAssetNotification extends Notification
->from($botname)
->to($channel)
->attachment(function ($attachment) use ($item, $note, $fields) {
- $attachment->title(htmlspecialchars_decode($item->present()->name), $item->present()->viewUrl())
+ $attachment->title(htmlspecialchars_decode($item->display_name), $item->present()->viewUrl())
->fields($fields)
->content($note);
});
diff --git a/resources/views/account/accept/create.blade.php b/resources/views/account/accept/create.blade.php
index 54a4371f1f..61528ef728 100644
--- a/resources/views/account/accept/create.blade.php
+++ b/resources/views/account/accept/create.blade.php
@@ -2,7 +2,7 @@
{{-- Page title --}}
@section('title')
- {{trans('general.accept', ['asset' => $acceptance->checkoutable->present()->name()])}}
+ {{trans('general.accept', ['asset' => $acceptance->checkoutable->display_name])}}
@parent
@stop
@@ -38,7 +38,7 @@
<div class="panel box box-default">
<div class="box-header with-border">
<h2 class="box-title">
- {{$acceptance->checkoutable->present()->name()}}
+ {{ $acceptance->checkoutable->display_name }}
{{ (($acceptance->checkoutable) && ($acceptance->checkoutable->serial)) ? ' - '.trans('general.serial_number').': '.$acceptance->checkoutable->serial : '' }}
</h2>
</div>
diff --git a/resources/views/hardware/bulk-delete.blade.php b/resources/views/hardware/bulk-delete.blade.php
index 96c931ae2b..0db67bd9eb 100644
--- a/resources/views/hardware/bulk-delete.blade.php
+++ b/resources/views/hardware/bulk-delete.blade.php
@@ -40,7 +40,7 @@
<tr>
<td><input type="checkbox" name="ids[]" value="{{ $asset->id }}" checked="checked"></td>
<td>{{ $asset->id }}</td>
- <td>{{ $asset->present()->name() }}</td>
+ <td>{{ $asset->display_name }}</td>
<td>
@if ($asset->location)
{{ $asset->location->present()->name() }}
diff --git a/resources/views/hardware/bulk-restore.blade.php b/resources/views/hardware/bulk-restore.blade.php
index a998642685..4294cbddde 100644
--- a/resources/views/hardware/bulk-restore.blade.php
+++ b/resources/views/hardware/bulk-restore.blade.php
@@ -39,7 +39,7 @@
<tr>
<td><input type="checkbox" name="ids[]" value="{{ $asset->id }}" checked="checked"></td>
<td>{{ $asset->id }}</td>
- <td>{{ $asset->present()->name() }}</td>
+ <td>{{ $asset->display_name }}</td>
<td>
@if ($asset->location)
{{ $asset->location->name }}
diff --git a/resources/views/notifications/markdown/report-expected-checkins.blade.php b/resources/views/notifications/markdown/report-expected-checkins.blade.php
index be50e07a98..9e5259e12e 100644
--- a/resources/views/notifications/markdown/report-expected-checkins.blade.php
+++ b/resources/views/notifications/markdown/report-expected-checkins.blade.php
@@ -13,7 +13,7 @@ $checkin = Helper::getFormattedDateObject($asset->expected_checkin, 'date');
$assignedToName = $asset->assignedTo ? $asset->assignedTo->present()->fullName : trans('general.unknown_user');
$assignedToRoute = $asset->assignedTo ? route($asset->targetShowRoute().'.show', [$asset->assignedTo->id]) : '';
@endphp
-| [{{ $asset->present()->name }}]({{ route('hardware.show', $asset) }}) | @if ($asset->assignedTo) [{{ $assignedToName }}]({{ $assignedToRoute }}) @else {{ $assignedToName }} @endif | {{ $checkin['formatted'] }}
+| [{{ $asset->display_name }}]({{ route('hardware.show', $asset) }}) | @if ($asset->assignedTo) [{{ $assignedToName }}]({{ $assignedToRoute }}) @else {{ $assignedToName }} @endif | {{ $checkin['formatted'] }}
@endforeach
@endcomponent
diff --git a/resources/views/notifications/markdown/report-expiring-assets.blade.php b/resources/views/notifications/markdown/report-expiring-assets.blade.php
index f6391aa64e..4c7ac47f1f 100644
--- a/resources/views/notifications/markdown/report-expiring-assets.blade.php
+++ b/resources/views/notifications/markdown/report-expiring-assets.blade.php
@@ -10,7 +10,7 @@ $expires = Helper::getFormattedDateObject($asset->present()->warranty_expires, '
$diff = round(abs(strtotime($asset->present()->warranty_expires) - strtotime(date('Y-m-d')))/86400);
$icon = ($diff <= ($threshold / 2)) ? '🚨' : (($diff <= $threshold) ? '⚠️' : ' ');
@endphp
- <tr><td>{{ $icon }} </td><td> <a href="{{ route('hardware.show', $asset->id) }}">{{ $asset->present()->name }}</a><br><small>{{trans('mail.serial').': '.$asset->serial}}</small></td><td> {{ $diff }} {{ trans('mail.Days') }} </td><td> {{ !is_null($expires) ? $expires['formatted'] : '' }} </td><td> {{ ($asset->supplier ? e($asset->supplier->name) : '') }} </td><td> {{ ($asset->assignedTo ? e($asset->assignedTo->present()->display_name) : '') }} </td></tr>
+ <tr><td>{{ $icon }} </td><td> <a href="{{ route('hardware.show', $asset->id) }}">{{ $asset->display_name }}</a><br><small>{{trans('mail.serial').': '.$asset->serial}}</small></td><td> {{ $diff }} {{ trans('mail.Days') }} </td><td> {{ !is_null($expires) ? $expires['formatted'] : '' }} </td><td> {{ ($asset->supplier ? e($asset->supplier->name) : '') }} </td><td> {{ ($asset->assignedTo ? e($asset->assignedTo->present()->display_name) : '') }} </td></tr>
@endforeach
</table>
@endcomponent
diff --git a/resources/views/notifications/markdown/upcoming-audits.blade.php b/resources/views/notifications/markdown/upcoming-audits.blade.php
index 35a30721b9..c0c2ab2a73 100644
--- a/resources/views/notifications/markdown/upcoming-audits.blade.php
+++ b/resources/views/notifications/markdown/upcoming-audits.blade.php
@@ -27,12 +27,12 @@ $icon = ($diff <= 7) ? '🚨' : (($diff <= 14) ? '⚠️' : ' ');
<tr>
<td style="vertical-align: top">{{ $icon }}</td>
- <td style="vertical-align: top"><a href="{{ route('hardware.show', $asset->id) }}">{{ $asset->present()->name }}</a></td>
+ <td style="vertical-align: top"><a href="{{ route('hardware.show', $asset->id) }}">{{ $asset->display_name }}</a></td>
<td style="vertical-align: top">{{ $last_audit_date }}</td>
<td style="vertical-align: top">{{ $next_audit_date }}</td>
<td style="vertical-align: top">{{ $diff }}</td>
<td style="vertical-align: top">{{ ($asset->supplier ? e($asset->supplier->name) : '') }}</td>
- <td style="vertical-align: top">{{ ($asset->assignedTo ? $asset->assignedTo->present()->name() : '') }}</td>
+ <td style="vertical-align: top">{{ ($asset->assignedTo ? $asset->display_name : '') }}</td>
<td style="vertical-align: top">{!! nl2br(e($asset->notes)) !!}</td>
</tr>
diff --git a/resources/views/notifications/markdown/user-inventory.blade.php b/resources/views/notifications/markdown/user-inventory.blade.php
index 6c062b4a0a..207bc4c789 100644
--- a/resources/views/notifications/markdown/user-inventory.blade.php
+++ b/resources/views/notifications/markdown/user-inventory.blade.php
@@ -14,7 +14,7 @@
@foreach($assets as $asset)
<tr>
- <td>{{ $asset->present()->name }}</td>
+ <td>{{ $asset->display_name }}</td>
<td> {{ $asset->asset_tag }} </td>
<td> {{ $asset->serial }} </td>
<td> {{ $asset->model->category->name }}</td>