@extends('admin.layouts.app') @section('title', __('admin.menu_complaints').' #'.$complaint->id) @section('heading', __('admin.menu_complaints')) @section('content') @php $order = $complaint->convertedRepairOrder; $ticket = $order ? \App\Support\RepairTicketPresenter::fromRepairOrder($order, admin: true) : \App\Support\RepairTicketPresenter::fromComplaint($complaint, admin: true); @endphp
{{ __('admin.back') }} @if ($order) @feature('repair_services') {{ __('admin.complaint_view_order') }} @endfeature @elseif ($complaint->isRepairLead()) @feature('repair_services') @can(\App\Models\Permission::COMPLAINTS_CONVERT)
@csrf
@endcan @endfeature @endif @if (! $complaint->isConverted()) @can(\App\Models\Permission::COMPLAINTS_DELETE) @endcan @endif
@feature('commissions') @if ($complaint->isCommissionMembershipLead())

{{ __('admin.lead_type') }}

{{ __('admin.lead_type_commission_membership') }}

{{ __('admin.commission_requested') }}

{{ $complaint->requestedCommissionCategory?->localizedName() ?: '—' }}

{{ __('admin.name') }}

{{ $membershipUser?->name ?: ($complaint->name ?: '—') }}

{{ __('admin.mobile') }}

{{ $membershipUser?->mobile ?: ($complaint->mobile ?: '—') }}

@if ($complaint->membership_status)

{{ __('admin.commission_membership_status') }}: {{ __('admin.commission_membership_status_'.$complaint->membership_status) }} @if ($complaint->membership_decided_at) · @endif @if ($complaint->membershipDecidedByUser) · {{ $complaint->membershipDecidedByUser->name }} @endif

@endif @error('membership')
{{ $message }}
@enderror
@csrf
@csrf

{{ __('admin.commission_current_memberships') }}

@if ($currentMemberships->isEmpty())

{{ __('admin.commission_members_empty') }}

@else
    @foreach ($currentMemberships as $membership)
  • ✓ {{ $membership->localizedName() }}
    @csrf @method('DELETE')
  • @endforeach
@endif @if ($membershipUser && $currentMemberships->count() < \App\Services\CommissionMembershipService::MAX_MEMBERSHIPS)
@csrf
@elseif ($membershipUser && $currentMemberships->count() >= \App\Services\CommissionMembershipService::MAX_MEMBERSHIPS)

{{ __('site.commission_membership_limit') }}

@endif
@endif @endfeature @include('admin.partials.assistant-transcript', ['complaint' => $complaint]) @php($attachment = $complaint->resolvedAttachment()) @if ($attachment)

{{ __('admin.lead_attachment') }}

@if ($attachment['is_video']) @else @endif
@endif
@endsection