@extends('layouts.app') @php $locale = app()->getLocale(); $isRtl = $locale === 'ar'; $currency = \App\Models\Setting::currencyLabel($locale); @endphp @section('title', ($isRtl ? 'تفاصيل المعدة' : 'Equipment Details') . ' - ' . $equipment->name) @section('content')

{{ $isRtl ? 'تفاصيل المعدة' : 'Equipment Details' }}

{{ $equipment->name }}

{{ $isRtl ? 'تعديل' : 'Edit' }}
@csrf @method('DELETE')
@if($equipment->photo) @else
@endif
{{ $equipment->category }} {{ strtoupper($equipment->status) }} @if($equipment->is_warranty_valid) {{ $isRtl ? 'ضمان ساري' : 'Warranty' }} @endif

{{ $equipment->name }}

{{ $equipment->brand ?? '—' }} {{ $equipment->model ? '• ' . $equipment->model : '' }}

@if($equipment->serial_number)

{{ $equipment->serial_number }}

@endif
@if($equipment->description)

{{ $isRtl ? 'الوصف' : 'Description' }}

{{ $equipment->description }}

@endif

{{ $isRtl ? 'الموقع' : 'Location' }}

{{ $equipment->location ?? '—' }}

{{ $isRtl ? 'تاريخ الشراء' : 'Purchase Date' }}

{{ $equipment->purchase_date?->format('Y-m-d') ?? '—' }}

{{ $isRtl ? 'سعر الشراء' : 'Purchase Price' }}

{{ $equipment->purchase_price !== null ? number_format((float)$equipment->purchase_price, 2) . ' ' . $currency : '—' }}

{{ $isRtl ? 'انتهاء الضمان' : 'Warranty Expiry' }}

{{ $equipment->warranty_expiry?->format('Y-m-d') ?? '—' }}

{{ $isRtl ? 'آخر صيانة' : 'Last Maintenance' }}

{{ $equipment->last_maintenance?->format('Y-m-d') ?? '—' }}

{{ $isRtl ? 'الصيانة القادمة' : 'Next Maintenance' }}

{{ $equipment->next_maintenance?->format('Y-m-d') ?? '—' }}

@if($equipment->notes)

{{ $isRtl ? 'ملاحظات' : 'Notes' }}

{{ $equipment->notes }}

@endif

{{ $isRtl ? 'الصيانة' : 'Maintenance' }}

@if($equipment->status === 'active')
@csrf
@endif @if($equipment->status === 'maintenance')
{{ $isRtl ? 'المعدة حالياً في حالة صيانة. يمكنك إنهاء الصيانة وتحديد الموعد القادم.' : 'This equipment is currently under maintenance. You can complete it and set next date.' }}
@csrf
@endif @if(!in_array($equipment->status, ['active', 'maintenance']))
{{ $isRtl ? 'حالة المعدة الحالية لا تسمح بإجراءات صيانة مباشرة من هنا.' : 'Current status does not allow maintenance actions here.' }}
@endif
@endsection