{{-- Machines Tab Content (Partial) --}} {{-- 此檔案被 index.blade.php 的 @include 和 AJAX 模式共用 --}} {{-- Toolbar 區:搜尋框 + 按鈕 (同列) --}}
{{-- 搜尋輸入框 --}}
@if(auth()->user()->isSystemAdmin())
@endif
{{-- 搜尋按鈕 --}} {{-- 重置按鈕 --}}
{{-- ── 桌面表格 (xl+) ── --}} {{-- ── Mobile / Tablet Card Grid (< xl) ── --}}
@forelse($machines as $machine) @php $status = $machine->calculated_status; @endphp
{{-- Card Header --}}
@if(isset($machine->image_urls[0])) @else @endif

{{ $machine->name }}

{{ $machine->serial_no }}

{{ $machine->company->name ?? __('System') }}
{{-- Info Grid --}}

{{ __('Machine Model') }}

{{ $machine->machineModel->name ?? '--' }}

{{ __('Card Reader') }}

{{ $machine->card_reader_seconds ?? 0 }}s / No.{{ $machine->card_reader_no ?? '--' }}

{{ __('Key No') }}

{{ $machine->key_no ?? '--' }}

{{-- Action Buttons --}}
@if(auth()->user()->isSystemAdmin()) @endif
@empty
@endforelse
{{ $machines->appends(['tab' => 'machines', 'search' => request('search'), 'company_id' => request('company_id')])->links('vendor.pagination.luxury') }}