diff --git a/app/Models/Asset.php b/app/Models/Asset.php index cba63987b5..e11c46197b 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -399,6 +399,12 @@ class Asset extends Depreciable } + protected function expectedCheckinFormattedDate(): Attribute + { + return Attribute:: make( + get: fn(mixed $value, array $attributes) => array_key_exists('expected_checkin', $attributes) ? Helper::getFormattedDateObject($attributes['expected_checkin'], 'date', false) : null, + ); + } /** * Establishes the asset -> company relationship diff --git a/resources/views/account/view-assets.blade.php b/resources/views/account/view-assets.blade.php index 7125bd0665..8e2336d4d8 100755 --- a/resources/views/account/view-assets.blade.php +++ b/resources/views/account/view-assets.blade.php @@ -464,6 +464,9 @@ {{ trans('general.location') }} + + {{ trans('admin/hardware/form.expected_checkin') }} + @can('self.view_purchase_cost') {{ trans('general.purchase_cost') }} @@ -530,6 +533,9 @@ {{ ($asset->location) ? $asset->location->name : '' }} + + {{ ($asset->expected_checkin) ? $asset->expected_checkin_formatted_date : '' }} + @can('self.view_purchase_cost') {!! Helper::formatCurrencyOutput($asset->purchase_cost) !!}