@extends('layouts.app') @section('title', 'تفاصيل الجهاز') @section('content')

{{ $device->name }}

تعديل
معلومات الجهاز
{{ $device->name }}
{{ $device->device_type ?? 'غير محدد' }}
@if($device->serial_number) {{ $device->serial_number }} @else - @endif
@php $statusBadge = match($device->status) { 'active' => 'bg-success', 'inactive' => 'bg-secondary', 'under_maintenance' => 'bg-warning', 'out_of_service' => 'bg-danger', default => 'bg-secondary' }; $statusText = match($device->status) { 'active' => 'نشط', 'inactive' => 'غير نشط', 'under_maintenance' => 'تحت الصيانة', 'out_of_service' => 'خارج الخدمة', default => $device->status }; @endphp {{ $statusText }}
{{ $device->received_date ? $device->received_date->format('Y-m-d') : '-' }}
{{ $device->code }}
@if($device->notes)
{{ $device->notes }}
@endif
سجلات الصيانة ({{ $device->maintenanceRecords->count() }})
إضافة صيانة
@if($device->maintenanceRecords->count() > 0)
@foreach($device->maintenanceRecords->take(5) as $record) @endforeach
التاريخ النوع القائم بالصيانة الصيانة القادمة
{{ $record->maintenance_date->format('Y-m-d') }} {{ $record->maintenance_type }} {{ $record->performed_by ?? '-' }} @if($record->next_maintenance_date) {{ $record->next_maintenance_date->format('Y-m-d') }} @else - @endif
@else

لا توجد سجلات صيانة

@endif
إحصائيات

{{ $device->maintenanceRecords->count() }}

سجل صيانة
الموقع
@if($device->organization) {{ $device->organization->name }} @else - @endif
@if($device->department) {{ $device->department->name }} @else - @endif
@if($device->unit) {{ $device->unit->name }} @else - @endif
@endsection