@php $title = $ticket ? $ticket->ticket_title : ''; @endphp
Department : {{ $ticket->department?->name ?? 'Not assigned' }}
@if ($ticket) Assigned User : {{ $ticket->assignedUser?->name ?? 'Not assigned' }} @endif
@if ($loggedUser && $ticket && !$ticket->assigned_user_id && $ticket->ticket_status_id != 4)
@if ($loggedUser->user_type_id == 1) @endif
{{-- Show Assign to Me button --}} @if ($assignOption === 'me') @endif {{-- Show User Dropdown and Assign button --}} @if ($assignOption === 'user' && $loggedUser->user_type_id == 1)
@endif
@elseif($loggedUser && $loggedUser->user_type_id == 1 && $ticket->ticket_status_id != 4) @endif @if ($loggedUser && $loggedUser->user_type_id == 1 && $ticket && $ticket->ticket_status_id != 4)
{{-- --}}
@if ($changeDepartment === 'change' && $loggedUser->user_type_id == 1)
@endif
@endif

@if ($ticket)
@if ($ticket->lead)
Client Name : {{ $ticket->lead->full_name }}
Contact Number : {{ $ticket->lead->contact_number }}
Priority :
@endif @if ($ticket->ticket_category_id != 3)
Category : {{ $ticket->category->title }}
@endif
{{ $ticket->ticket_category_id == 3 ? 'Delivery Type ' : 'Sub Category' }} : {{ $ticket->subCategory->title }}
{{ $ticket->ticket_category_id == 3 ? 'Payment Methods ' : 'Tags' }} :
@foreach ($ticket->tags as $tag) {{ $tag }} @endforeach
{{ $ticket->ticket_category_id == 3 ? 'Orderd At ' : 'Report at' }} : {{ $ticket->created_at->diffForHumans() }} {{ $ticket->created_at }}
@if ($ticket->ticket_category_id == 3 && !$ticket->crm)
Order Ref : {{ $ticket->order_ref }}
@endif
@if ($ticket->description)
{{ $ticket->ticket_category_id != 3 ? 'Description ' : 'Special Instruction' }} : {{ $ticket->description }}
@endif @if ($ticket->ticket_category_id == 3 && $ticket->crm)
Item
Barcode
Unit Price
Qty
Total

@foreach ($ticket->items as $index => $item)
@if ($item->parent_item_id) @endif {{ $item->item->descr }}
{{ $item->item->barcode }}
{{ number_format($item->unit_price, 2) }}
{{ $item->qty }}
{{ number_format($item->unit_price * $item->qty, 2) }}
@endforeach
Sub Total
{{ number_format($ticket->items->sum('line_total'), 2) }}
@endif @endif
@if ($ticket && $ticket->activities)
    @foreach ($ticket->activities as $activity)
  1. @if ($activity->user) @if (Laravel\Jetstream\Jetstream::managesProfilePhotos()) @else @endif

    {{ $activity->comment }}

  2. @endif @endforeach
@endif
@if ($ticket && $loggedUser->id == $ticket->assigned_user_id) @if ($ticket->ticket_status_id != 4) @endif
@if ($ticket->ticket_status_id == 1) @endif
@endif