@extends('admin.layouts.app') @section('title', __('admin.menu_complaints')) @section('heading', __('admin.menu_complaints')) @section('content') @if (! empty($inbox))
@if (($inbox['mode'] ?? '') === 'scoped' && ! empty($inbox['slots'][0]['slot'])) {{ $inbox['slots'][0]['slot'] }} @else ★ @endif

{{ $inbox['title'] }}

{{ __('admin.lead_inbox_types_label') }}: @foreach ($inbox['lead_types'] as $type) {{ $type }} @endforeach

@if (($inbox['mode'] ?? '') === 'all')

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

@elseif (($inbox['mode'] ?? '') === 'none')

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

@else
@foreach ($inbox['slots'] as $slotInfo)
{{ $slotInfo['slot'] }}

{{ $slotInfo['label'] }}

@if ($slotInfo['is_catch_all']) {{ __('admin.lead_catch_all_badge') }} @endif @if ($slotInfo['phone']) {{ $slotInfo['phone'] }} @endif

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

@if (count($slotInfo['categories']) > 0)
@foreach ($slotInfo['categories'] as $catName) {{ $catName }} @endforeach
@else

@if ($slotInfo['is_catch_all']) {{ __('admin.lead_inbox_catch_all_categories') }} @else {{ __('admin.lead_inbox_no_categories') }} @endif

@endif
@endforeach

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

@endif
@endif
@forelse($complaints as $item) $item->read_at === null])> @empty @endforelse
#{{ __('admin.lead_type') }}{{ __('admin.subject') }}{{ __('admin.category') }}{{ __('admin.mobile') }}{{ __('admin.date') }}{{ __('admin.actions') }}
{{ $item->id }} @if ($item->leadType() === 'price_inquiry') {{ $item->leadTypeLabel() }} @elseif ($item->leadType() === 'files_documents') {{ $item->leadTypeLabel() }} @elseif ($item->leadType() === 'invites_reports') {{ $item->leadTypeLabel() }} @elseif ($item->leadType() === 'support') {{ $item->leadTypeLabel() }} @elseif ($item->leadType() === 'commission_membership') {{ $item->leadTypeLabel() }} @else {{ $item->leadTypeLabel() }} @endif @if ($item->read_at === null) @endif {{ $item->subject ?: '—' }} @if ($item->isCommissionMembershipLead() && $item->requestedCommissionCategory)
{{ $item->requestedCommissionCategory->localizedName() }}
@endif @if ($item->isConverted()) {{ __('admin.lead_converted_badge') }} @endif
{{ $item->category?->name_fa ?: '—' }} {{ $item->mobile ?: '—' }} @if ($item->convertedRepairOrder) @feature('repair_services') {{ __('admin.complaint_view_order') }} @endfeature @endif
{{ __('admin.empty') }}
{{ $complaints->links() }}
@endsection