3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-02-05 22:55:30 +00:00

Added expected_checkin to user’s View Assigned page

This commit is contained in:
snipe
2025-10-16 13:59:59 +01:00
parent 57b49fc31c
commit 78da89340c
2 changed files with 12 additions and 0 deletions

View File

@ -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

View File

@ -464,6 +464,9 @@
<th class="col-md-2" data-switchable="true" data-visible="false">
{{ trans('general.location') }}
</th>
<th class="col-md-2" data-switchable="true" data-visible="true">
{{ trans('admin/hardware/form.expected_checkin') }}
</th>
@can('self.view_purchase_cost')
<th class="col-md-6" data-footer-formatter="sumFormatter" data-fieldname="purchase_cost">
{{ trans('general.purchase_cost') }}
@ -530,6 +533,9 @@
<td>
{{ ($asset->location) ? $asset->location->name : '' }}
</td>
<td>
{{ ($asset->expected_checkin) ? $asset->expected_checkin_formatted_date : '' }}
</td>
@can('self.view_purchase_cost')
<td>
{!! Helper::formatCurrencyOutput($asset->purchase_cost) !!}