@extends('layouts.app') @section('title', 'Device Details') @section('content')
Back to Devices

{{ $biometricDevice->device_name }}

Edit
@csrf @method('DELETE')

Device Information

Device Name
{{ $biometricDevice->device_name }}
Serial Number
{{ $biometricDevice->device_serial_number }}
Device Type
{{ $biometricDevice->device_type }}
Device Category
@php $categoryLabels = [ 'attendance' => 'Employee Attendance', 'toolbox_training' => 'Toolbox Talk & Training', 'both' => 'Both (Attendance & Training)' ]; $category = $biometricDevice->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 }} @if($biometricDevice->device_purpose)

{{ $biometricDevice->device_purpose }}

@endif
Status
@php $badgeClasses = match($biometricDevice->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($biometricDevice->status) }}
Company
{{ $biometricDevice->company->name ?? 'N/A' }}
Location
{{ $biometricDevice->location_name }}

Network Configuration

IP Address
{{ $biometricDevice->device_ip }}
Port
{{ $biometricDevice->port }}
Connection Type
{{ strtoupper($biometricDevice->connection_type) }}
Last Connected
@if($biometricDevice->last_connected_at) {{ $biometricDevice->last_connected_at->diffForHumans() }} @else Never @endif

Work Hours Configuration

Start Time
@if($biometricDevice->work_start_time) {{ \Carbon\Carbon::parse($biometricDevice->work_start_time)->format('H:i') }} @else N/A @endif
End Time
@if($biometricDevice->work_end_time) {{ \Carbon\Carbon::parse($biometricDevice->work_end_time)->format('H:i') }} @else N/A @endif
Grace Period
{{ $biometricDevice->grace_period_minutes }} minutes

Today's Attendance

Total {{ $stats['total_today'] }}
Present {{ $stats['present_today'] }}
Late {{ $stats['late_today'] }}
Absent {{ $stats['absent_today'] }}

Actions

@csrf
@csrf
Manage Enrollment View Attendance
@endsection