@lang('asset::app.assetInfo') #{{ $asset->id }}
@if ($asset->status == 'available') {{ trans('asset::app.lend') }} @endif @if ($asset->status == 'lent') {{ trans('asset::app.return') }} @endif {{ trans('app.edit') }}
@php $class = ['non-functional' => 'danger', 'lent' => 'warning', 'available' => 'success']; @endphp

{{ ucfirst($asset->name) }}




{{ $asset->serial_number }}

@if($asset->description)
{{ ucfirst($asset->description) }}
@endif
@lang('asset::app.history')
@forelse($asset->history as $history)
@lang('asset::app.lentTo')
user {{ ucwords($history->user->name) }}
{{ ($history->user->designation_name) ? ucwords($history->user->designation_name) : ' ' }}
@lang('asset::app.dateGiven')
{{ ucwords($history->date_given->setTimezone($global->timezone)->format('d F Y H:i A')) }} ({{ $history->date_given->setTimezone($global->timezone)->diffForHumans(\Carbon\Carbon::now()->setTimezone($global->timezone)) }})
@lang('asset::app.returnDate')
{{ !is_null($history->return_date) ? ucwords($history->return_date->setTimezone($global->timezone)->format('d F Y H:i A')). ' ('.$history->return_date->setTimezone($global->timezone)->diffForHumans(\Carbon\Carbon::now()->setTimezone($global->timezone)) .')' : '-' }}
@lang('asset::app.dateOfReturn')
{{ !is_null($history->date_of_return) ? ucwords($history->date_of_return->setTimezone($global->timezone)->format('d F Y H:i A')). ' ('.$history->date_of_return->setTimezone($global->timezone)->diffForHumans(\Carbon\Carbon::now()->setTimezone($global->timezone)) .')' : '-' }}
@lang('asset::app.returnedBy')
@if($history->returner) returner {{ ucwords($history->returner->name) }}
{{ ($history->returner->designation_name) ? ucwords($history->returner->designation_name) : ' ' }} @else - @endif
@lang('asset::app.notes')
{{ is_null($history->notes) ? '-' : $history->notes }}



@empty
@lang('asset::app.noLendingHistoryFound')
@if ($asset->status == 'available') {{ trans('asset::app.lend') }} @endif @if ($asset->status == 'lent') {{ trans('asset::app.return') }} @endif
@endforelse
{{--Ajax Modal--}} {{--Ajax Modal Ends--}}