From 78da89340c36394b7e2d85fde7e39e79df067d60 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 16 Oct 2025 13:59:59 +0100 Subject: [PATCH] =?UTF-8?q?Added=20expected=5Fcheckin=20to=20user=E2=80=99?= =?UTF-8?q?s=20View=20Assigned=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/Asset.php | 6 ++++++ resources/views/account/view-assets.blade.php | 6 ++++++ 2 files changed, 12 insertions(+) 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) !!}