@extends('front.layouts.public-clean') @section('title', 'Panel Cliente | Mariachis.co') @section('meta_description', 'Gestiona tu perfil, seguridad, privacidad, favoritos, vistos recientes y solicitudes.') @section('page_id', 'client-panel') @section('auth_header_link') Cerrar sesión @endsection @section('content') @php $statusMap = [ 'new' => ['label' => 'Nueva', 'color' => 'status-new'], 'in_progress' => ['label' => 'En curso', 'color' => 'status-in-progress'], 'responded' => ['label' => 'Respondida', 'color' => 'status-responded'], 'closed' => ['label' => 'Cerrada', 'color' => 'status-closed'], ]; $reviewStatusMap = [ 'pending' => ['label' => 'Pendiente', 'color' => 'status-pending'], 'approved' => ['label' => 'Aprobada', 'color' => 'status-approved'], 'rejected' => ['label' => 'Rechazada', 'color' => 'status-rejected'], 'reported' => ['label' => 'Reportada', 'color' => 'status-reported'], 'hidden' => ['label' => 'Oculta', 'color' => 'status-hidden'], ]; $verificationMap = [ 'basic' => 'Opinion basica', 'manual_validated' => 'Validada manualmente', 'evidence_attached' => 'Con foto/prueba', ]; @endphp
@if(session('status'))
{{ session('status') }}
@endif @if($errors->any())
{{ $errors->first() }}
@endif

Mi cuenta

Hola, {{ $user->display_name }}

Solicitudes: {{ $summaryConversationsCount }} · No leídos: {{ $summaryUnreadCount }} · Favoritos: {{ $summaryFavoritesCount }} · Vistos: {{ $summaryRecentViewsCount }}

@csrf
@if($activeSection === 'solicitudes')

Solicitudes de presupuesto / mensajería

Historial de conversaciones con mariachis y estado de cada solicitud.

@if($conversations->isEmpty())

No hay conversaciones para este filtro.

@else
@foreach($conversations as $conversation) @php $profile = $conversation->mariachiListing ?: $conversation->mariachiProfile?->resolveDefaultListing() ?: $conversation->mariachiProfile; $profileName = $profile?->title ?: $profile?->business_name ?: $profile?->user?->display_name; $statusMeta = $statusMap[$conversation->status] ?? ['label' => $conversation->status, 'color' => 'status-closed']; $review = $conversation->review; $canCreateReview = ! $review && (int) $conversation->mariachi_messages_count > 0; $awaitingMariachiReply = (int) $conversation->mariachi_messages_count === 0; @endphp

{{ $profileName }}

@if($conversation->unread_for_client_count > 0) {{ $conversation->unread_for_client_count }} no leídos @endif {{ $statusMeta['label'] }}

{{ $conversation->event_city ?: 'Sin ciudad' }} · {{ $conversation->event_date?->format('Y-m-d') ?: 'Sin fecha' }} · Último: {{ optional($conversation->last_message_at)->format('Y-m-d H:i') ?: 'N/A' }}

@foreach($conversation->messages as $message) @php $mine = $message->sender_user_id === auth()->id(); @endphp

{{ $message->sender?->display_name ?: 'Usuario' }}

{{ $message->message }}

{{ $message->created_at->format('Y-m-d H:i') }}

@endforeach @if($awaitingMariachiReply)

Sistema

Solicitud enviada. En espera de respuesta del mariachi.

@endif
@csrf
@if($review) @php $reviewMeta = $reviewStatusMap[$review->moderation_status] ?? ['label' => $review->moderation_status, 'color' => 'status-hidden']; $verificationLabel = $verificationMap[$review->verification_status] ?? $review->verification_status; @endphp

Tu opinion para {{ $profileName }}

{{ $reviewMeta['label'] }} {{ $verificationLabel }}

{{ str_repeat('★', $review->rating) }}{{ str_repeat('☆', 5 - $review->rating) }}

@if($review->title)

{{ $review->title }}

@endif

{{ $review->comment }}

@if($review->photos->isNotEmpty())

{{ $review->photos->count() }} foto(s) adjuntas.

@endif @if($review->rejection_reason)

Motivo de moderacion: {{ $review->rejection_reason }}

@endif
@elseif($canCreateReview)
@csrf

Dejar opinion

@else

La opcion para opinar se habilita cuando el mariachi responda esta conversacion.

@endif
@endforeach
@endif
@endif @if($activeSection === 'favoritos')

Lista de deseos / favoritos

@if($favorites->isEmpty())

Aún no guardas mariachis como favoritos.

@else
@foreach($favorites as $profile) @php $photo = $profile->photos->firstWhere('is_featured', true) ?? $profile->photos->first(); @endphp @endforeach
@endif
@endif @if($activeSection === 'vistos') @endif @if($activeSection === 'perfil')

Perfil / información personal

@csrf @method('PATCH')
@endif @if($activeSection === 'seguridad')

Inicio de sesión y seguridad

@csrf @method('PATCH')
@endif @if($activeSection === 'privacidad')

Uso compartido de datos / privacidad

@csrf @method('PATCH')
@csrf @method('DELETE')
@endif
@endsection