@extends('layouts.app') @section('title', 'Biometric Devices') @section('content')
| Device | Category | Location | Company | IP Address | Status | Last Sync | Actions |
|---|---|---|---|---|---|---|---|
|
{{ $device->device_name }}
{{ $device->device_type }}
|
@php $categoryLabels = [ 'attendance' => 'Attendance', 'toolbox_training' => 'Toolbox & Training', 'both' => 'Both' ]; $category = $device->device_category ?? 'attendance'; $label = $categoryLabels[$category] ?? 'Unknown'; // Determine badge classes based on category $badgeClasses = match($category) { 'attendance' => 'px-2 py-1 text-xs rounded-full bg-blue-100 text-blue-800', 'toolbox_training' => 'px-2 py-1 text-xs rounded-full bg-purple-100 text-purple-800', 'both' => 'px-2 py-1 text-xs rounded-full bg-indigo-100 text-indigo-800', default => 'px-2 py-1 text-xs rounded-full bg-gray-100 text-gray-800' }; $icon = match($category) { 'attendance' => 'clock', 'toolbox_training' => 'chalkboard-teacher', 'both' => 'tasks', default => 'question-circle' }; @endphp {{ $label }} |
{{ $device->location_name }}
@if($device->location_address)
{{ Str::limit($device->location_address, 30) }}
@endif
|
{{ $device->company->name ?? 'N/A' }} | {{ $device->device_ip }}:{{ $device->port }} | @php $badgeClasses = match($device->status) { 'active' => 'px-2 py-1 text-xs rounded-full bg-green-100 text-green-800', 'inactive' => 'px-2 py-1 text-xs rounded-full bg-gray-100 text-gray-800', 'maintenance' => 'px-2 py-1 text-xs rounded-full bg-orange-100 text-orange-800', 'offline' => 'px-2 py-1 text-xs rounded-full bg-red-100 text-red-800', default => 'px-2 py-1 text-xs rounded-full bg-gray-100 text-gray-800' }; @endphp {{ ucfirst($device->status) }} | @if($device->last_sync_at) {{ $device->last_sync_at->diffForHumans() }} @else Never @endif | |
| No devices found. Add your first device | |||||||