@extends('admin.layouts.master') @section('title', $ticket->number) @section('page_title', 'تذكرة صيانة: ' . $ticket->number) @section('breadcrumbs') @endsection @section('content') @php $priorityMap = ['low'=>'secondary','medium'=>'info','high'=>'warning','urgent'=>'danger']; @endphp

{{ $ticket->number }} {{ $ticket->status }} {{ $ticket->type }} {{ $ticket->priority }}

@can('maintenance.edit') @if($ticket->status === 'open') @endif @if($ticket->status === 'assigned')
@csrf
@endif @if($ticket->status === 'in_progress') @endif @if($ticket->status === 'resolved') @endif @if(! in_array($ticket->status, ['closed', 'cancelled'])) {{ __('admin.edit') }}
@csrf
@endif @endcan
@if($ticket->product) @endif @if($ticket->invoice) @endif
العميل {{ $ticket->customer?->name_ar }}
المنتج{{ $ticket->product->sku }} {{ $ticket->product->name_ar }}
الفاتورة{{ $ticket->invoice->number }}
تاريخ البلاغ{{ $ticket->reported_at?->format('Y-m-d') }}
موعد الزيارة{{ $ticket->visit_at?->format('Y-m-d H:i') ?? '—' }}
المسؤول{{ $ticket->assignee?->name ?? '— غير مسند —' }}
@if($ticket->customer_rating) @endif
تاريخ الحل{{ $ticket->resolved_at?->format('Y-m-d H:i') ?? '—' }}
التكلفة{{ number_format((float) $ticket->cost, 2) }}
قابل للفوترة {!! $ticket->is_billable ? 'نعم' : 'لا' !!}
تقييم العميل {{ str_repeat('★', $ticket->customer_rating) }}{{ str_repeat('☆', 5 - $ticket->customer_rating) }}
أنشأها{{ $ticket->creator?->name ?? '—' }}
{{ $ticket->subject }}
{!! nl2br(e($ticket->description)) !!}
@if($ticket->resolution)
الحل
{!! nl2br(e($ticket->resolution)) !!}
@endif @if($ticket->customer_feedback)
ملاحظات العميل
{!! nl2br(e($ticket->customer_feedback)) !!}
@endif
@can('maintenance.edit') {{-- Assign modal --}} {{-- Resolve modal --}} {{-- Close modal --}} @endcan @endsection @push('scripts') @include('admin._partials.crud_scripts') @endpush