{{ __('Manage Assets') }}

{{-- View Laptops / Desktops --}} {{-- Search / Filter / Add --}}
{{-- Search input with auto-submit --}}
{{-- Status Filter Dropdown --}}
{{-- Upload Invoice button --}} {{ __('Upload Invoice') }} {{-- Add Asset button inline with form --}} {{ __('Add New Asset') }}
{{-- Progress bar (shown during import) --}} {{-- Status message (shown after import completes) --}} {{-- Legacy status message (for non-import operations) --}} @if (session('status') && !request()->has('progressId'))

{{ session('status') }}

@endif
@php($columns = [ ['key' => 'assetID', 'label' => 'Asset ID'], ]) @foreach ($columns as $c) @endforeach @forelse ($assets as $asset) @php($currentAssignment = $asset->currentAssignment()) @empty @endforelse
@php($isActive = ($sort ?? null) === $c['key']) {{ __($c['label']) }} @if ($isActive) {{ ($dir ?? 'asc') === 'asc' ? '▲' : '▼' }} @else ▲▼ @endif {{ __('Serial Number') }} {{ __('Model') }} {{ __('Current User') }} {{ __('Status') }} {{ __('Action') }}
{{ $asset->assetID }} {{ $asset->serialNum ?? '-' }} {{ $asset->model ?? '-' }} @if($currentAssignment) {{ $currentAssignment->userFullName ?? ($currentAssignment->user->fullName ?? 'User Deleted') }} @else With IT @endif {{ $asset->status ?? 'Available' }}
{{ __('View') }} {{-- Check-Out Icon Button --}} @if($asset->status !== 'Checked Out') @else @endif {{-- Check-In Icon Button --}} @if($asset->status === 'Checked Out' && $currentAssignment)
@csrf @method('PATCH')
@else @endif
No assets found.
{{-- Pagination --}}
{{ $assets->links() }}