{{ $ticket->ticket_number }} @if($ticket->status == 'open') @lang('lang_v1.open') @elseif($ticket->status == 'delayed') @lang('lang_v1.delayed') @else @lang('lang_v1.closed') @endif @if(!empty($ticket->tat_due_at)) (@lang('lang_v1.tat_due_by'): {{ @format_datetime($ticket->tat_due_at) }}) @endif

@if(!empty($ticket->supplier_contact) || !empty($ticket->manufacturer)) @endif @if(!empty($ticket->purchase_order)) @endif @if($ticket->status == 'closed') @if(!empty($ticket->closure_note)) @endif @endif
@lang('business.business') {{ $ticket->business->name ?? '' }}
@lang('sale.product') {{ $ticket->purchase_line->product->name ?? '' }} @if(!empty($ticket->purchase_line->variations->name) && $ticket->purchase_line->variations->name != 'DUMMY') ({{ $ticket->purchase_line->variations->name }}) @endif
@lang('lang_v1.claim_against') {{ $ticket->manufacturer->name ?? ($ticket->supplier_contact->supplier_business_name ?: ($ticket->supplier_contact->name ?? '--')) }} @if(!empty($ticket->supplier_contact) && (int)$ticket->supplier_contact->is_manufacturer === 1) @lang('lang_v1.manufacturer') @endif @if(!empty($ticket->supplier_contact->email))
{{ $ticket->supplier_contact->email }} @endif
@lang('purchase.location') {{ $ticket->location->name ?? '' }}
@lang('purchase.grn_no') {{ $ticket->transaction->ref_no ?? '' }}
@lang('lang_v1.purchase_order') {{ $ticket->purchase_order->ref_no }} ({{ ucfirst($ticket->purchase_order->status) }})
@lang('lang_v1.ticket_type') {{ \Modules\SupportTicket\Entities\SupportTicket::ticketTypeLabels()[$ticket->ticket_type] ?? $ticket->ticket_type }}
@lang('purchase.quantity_damaged') {{ @format_quantity($ticket->quantity_damaged) }}
@lang('purchase.quantity_lost') {{ @format_quantity($ticket->quantity_lost) }}
@lang('purchase.damage_loss_reason') {{ !empty($ticket->damage_loss_reason) ? __('lang_v1.'.$ticket->damage_loss_reason) : '--' }}
@lang('purchase.damage_loss_note') {{ $ticket->damage_loss_note ?? '--' }}
@lang('lang_v1.ticket_raised_by') {{ $ticket->raised_by_user->user_full_name ?? '' }} ({{ @format_datetime($ticket->created_at) }})
@lang('lang_v1.closure_reason') {{ $ticket->closure_reason->label ?? '' }}
@lang('lang_v1.closure_note') {{ $ticket->closure_note }}
@lang('lang_v1.closed') {{ $ticket->closed_by_user->user_full_name ?? '' }} ({{ @format_datetime($ticket->closed_at) }})
@lang('lang_v1.resolution_time') {{ $ticket->resolution_time }}
@if($can_manage)
{!! Form::open(['url' => action([\Modules\Superadmin\Http\Controllers\SupportTicketOversightController::class, 'close'], [$ticket->id]), 'method' => 'post', 'id' => 'sa_support_ticket_close_form']) !!}

@lang('lang_v1.close_ticket')

{!! Form::label('closure_reason_id', __('lang_v1.closure_reason') . ':') !!}

{!! Form::label('closure_note', __('lang_v1.closure_note') . ':') !!} {!! Form::textarea('closure_note', null, ['class' => 'form-control', 'rows' => 2]) !!}
{!! Form::close() !!} @endif
@lang('lang_v1.activities'):
@includeIf('activity_log.activities')