@extends('layouts/layoutMaster') @section('title', 'Mariachi - Admin') @section('vendor-style') @vite([ 'resources/assets/vendor/libs/datatables-bs5/datatables.bootstrap5.scss', 'resources/assets/vendor/libs/datatables-responsive-bs5/responsive.bootstrap5.scss', 'resources/assets/vendor/libs/datatables-buttons-bs5/buttons.bootstrap5.scss', 'resources/assets/vendor/libs/animate-css/animate.scss', 'resources/assets/vendor/libs/sweetalert2/sweetalert2.scss', 'resources/assets/vendor/libs/select2/select2.scss', 'resources/assets/vendor/libs/@form-validation/form-validation.scss', ]) @endsection @section('page-style') @vite('resources/assets/vendor/scss/pages/page-user-view.scss') @endsection @section('vendor-script') @vite([ 'resources/assets/vendor/libs/moment/moment.js', 'resources/assets/vendor/libs/datatables-bs5/datatables-bootstrap5.js', 'resources/assets/vendor/libs/sweetalert2/sweetalert2.js', 'resources/assets/vendor/libs/cleave-zen/cleave-zen.js', 'resources/assets/vendor/libs/select2/select2.js', 'resources/assets/vendor/libs/@form-validation/popular.js', 'resources/assets/vendor/libs/@form-validation/bootstrap5.js', 'resources/assets/vendor/libs/@form-validation/auto-focus.js', ]) @endsection @section('page-script') @vite('resources/assets/js/admin-mariachi-view.js') @endsection @section('content') @php use App\Models\User; use Illuminate\Support\Facades\Route; use Illuminate\Support\Str; $avatarUrl = $profile->logo_path ? asset('storage/'.$profile->logo_path) : asset('marketplace/img/1.webp'); $displayName = $profile->business_name ?: $mariachi->display_name; $statusLabel = $mariachi->status === User::STATUS_ACTIVE ? 'Activo' : 'Inactivo'; $statusClass = $mariachi->status === User::STATUS_ACTIVE ? 'bg-label-success' : 'bg-label-secondary'; $verificationLabel = $profile->verification_status ? Str::headline($profile->verification_status) : 'Pendiente'; $verificationClass = $profile->verification_status === 'verified' ? 'bg-label-success' : 'bg-label-warning'; $plan = $profile->activeSubscription?->plan; $planLabel = $planSummary['name'] ?? ($plan?->name ?: ($profile->subscription_plan_code ? Str::headline($profile->subscription_plan_code) : 'Sin plan')); $planPrice = $plan ? '$'.number_format((int) $plan->price_cop, 0, ',', '.') : null; $planCycle = $plan?->billing_cycle ?: 'mes'; $planEntitlements = $planSummary['entitlements'] ?? []; $profileCompletion = max(0, min(100, (int) $profile->profile_completion)); $publicProfileUrl = \Illuminate\Support\Facades\Route::has('mariachi.provider.public.show') && filled($profile->slug) ? route('mariachi.provider.public.show', ['handle' => $profile->slug]) : null; $viewsTotal = (int) ($profile->stat?->total_views ?? 0); $quotesTotal = (int) ($profile->quote_conversations_count ?? 0); $reviewsTotal = (int) ($profile->reviews_count ?? 0); $activeListings = (int) ($profile->active_listings_count ?? 0); $openDraftLimit = $profile->openDraftLimit(); $publishedLimit = $profile->publishedListingLimit(); $openDraftsCount = $profile->listings()->openDrafts()->count(); $listingUsagePercent = $publishedLimit > 0 ? max(5, min(100, (int) round(($activeListings / $publishedLimit) * 100))) : 0; $publishedLimitLabel = $publishedLimit === 0 ? 'Ilimitados' : $publishedLimit.' en simultaneo'; $openDraftLimitLabel = $openDraftLimit === 0 ? 'Sin tope' : $openDraftLimit.' abiertos'; @endphp @if (session('status'))
{{ session('status') }}
@endif @if ($errors->any())
Hay errores de validacion.
@endif
Avatar mariachi
{{ number_format($activeListings) }}
Anuncios activos
{{ number_format($quotesTotal) }}
Solicitudes
Details
  • Username: {{ '@'.($profile->slug ?: 'mariachi-'.$mariachi->id) }}
  • Email: {{ $mariachi->email }}
  • Status: {{ $statusLabel }}
  • Plan: {{ $planLabel }}
  • Contacto: {{ $mariachi->phone ?: 'Pendiente' }}
  • WhatsApp: {{ $profile->whatsapp ?: 'Pendiente' }}
  • Ciudad: {{ $profile->city_name ?: 'Pendiente' }}
  • Pais: {{ $profile->country ?: 'Pendiente' }}
  • Verificacion: {{ $verificationLabel }}
Edit
@csrf @method('PATCH')
@if ($publicProfileUrl) @endif
{{ $planLabel }}
@if ($planPrice) $

{{ number_format((int) $plan->price_cop, 0, ',', '.') }}

{{ $planCycle }} @else
Sin cobro activo
@endif
  • Borradores: {{ $openDraftLimitLabel }}
  • Publicados: {{ $publishedLimitLabel }}
  • {{ (int) ($planEntitlements['max_cities_covered'] ?? $plan?->included_cities ?? 1) }} ciudad(es) incluidas
  • {{ (int) ($planEntitlements['max_photos_per_listing'] ?? $plan?->max_photos_per_listing ?? 0) }} fotos por anuncio
Perfil {{ $profileCompletion }}%
Activos: {{ $activeListings }} @if ($publishedLimit > 0) de {{ $publishedLimit }} @else · Publicacion sin tope @endif · Borradores abiertos: {{ $openDraftsCount }} @if ($planIssues !== [])
Plan fuera de cuota
    @foreach ($planIssues as $issue)
  • {{ $issue }}
  • @endforeach
@endif
Resumen de cuenta

Vista administrativa del perfil, desempeno y configuracion actual del mariachi.

{{ $verificationLabel }}
Vistas acumuladas

{{ number_format($viewsTotal) }}

Solicitudes

{{ number_format($quotesTotal) }}

Opiniones

{{ number_format($reviewsTotal) }}

Uso del plan

{{ $publishedLimit > 0 ? $activeListings.'/'.$publishedLimit : $activeListings }}

Descripcion del proveedor

{{ $profile->short_description ?: 'Este mariachi aun no ha completado una descripcion corta del proveedor.' }}

Responsable
{{ $profile->responsible_name ?: 'Pendiente' }}
{{ $mariachi->email }}
Ubicacion base
{{ $profile->city_name ?: 'Pendiente' }}
{{ $profile->country ?: 'Sin pais definido' }}
Canales y estado
  • Sitio web {{ $profile->website ?: 'No registrado' }}
  • Instagram {{ $profile->instagram ?: 'No registrado' }}
  • Facebook {{ $profile->facebook ?: 'No registrado' }}
  • WhatsApp {{ $profile->whatsapp ?: 'No registrado' }}
@endsection