@extends('layouts/layoutMaster') @section('title', 'Mariachis - 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/select2/select2.scss', 'resources/assets/vendor/libs/@form-validation/form-validation.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/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', 'resources/assets/vendor/libs/cleave-zen/cleave-zen.js', ]) @endsection @section('page-script') @vite('resources/assets/js/admin-mariachis-index.js') @endsection @section('content') @php use App\Models\User; use Illuminate\Support\Str; use Illuminate\Support\Facades\Route; $planOptions = $mariachis ->map(fn ($mariachi) => $mariachi->mariachiProfile?->activeSubscription?->plan?->name ?: ($mariachi->mariachiProfile?->subscription_plan_code ? Str::headline($mariachi->mariachiProfile->subscription_plan_code) : 'Sin plan')) ->filter() ->unique() ->sort() ->values(); $verificationShare = $totalMariachis > 0 ? (int) round(($pendingVerificationMariachis / $totalMariachis) * 100) : 0; $activeShare = $totalMariachis > 0 ? (int) round(($activeMariachis / $totalMariachis) * 100) : 0; $subscribedShare = $totalMariachis > 0 ? (int) round(($subscribedMariachis / $totalMariachis) * 100) : 0; @endphp @if (session('status'))
{{ session('status') }}
@endif
Total mariachis

{{ number_format($totalMariachis) }}

Registros totales en plataforma
Plan activo

{{ number_format($subscribedMariachis) }}

({{ $subscribedShare }}%)

Con suscripcion vigente
Activos

{{ number_format($activeMariachis) }}

({{ $activeShare }}%)

Cuentas habilitadas
Verificacion pendiente

{{ number_format($pendingVerificationMariachis) }}

({{ $verificationShare }}%)

Con solicitud por revisar
@foreach ($mariachis as $mariachi) @php $profile = $mariachi->mariachiProfile; $subscription = $profile?->activeSubscription; $plan = $subscription?->plan; $planLabel = $plan?->name ?: ($profile?->subscription_plan_code ? Str::headline($profile->subscription_plan_code) : 'Sin plan'); $billingLabel = $plan ? '$'.number_format((int) $plan->price_cop, 0, ',', '.').' / '.($plan->billing_cycle ?: 'ciclo') : 'Sin facturacion'; $statusLabel = $mariachi->status === User::STATUS_ACTIVE ? 'Activo' : 'Inactivo'; $statusClass = $mariachi->status === User::STATUS_ACTIVE ? 'bg-label-success' : 'bg-label-secondary'; $avatarUrl = $profile?->logo_path ? asset('storage/'.$profile->logo_path) : asset('marketplace/img/1.webp'); $mainName = $profile?->business_name ?: $mariachi->display_name; $registeredAtLabel = $mariachi->created_at?->timezone(config('app.timezone'))->format('d/m/Y H:i'); $publicProfileUrl = \Illuminate\Support\Facades\Route::has('mariachi.provider.public.show') && filled($profile?->slug) ? route('mariachi.provider.public.show', ['handle' => $profile->slug]) : null; @endphp @endforeach
User Role Plan Billing Status Actions
Avatar {{ $mainName }}
{{ $mainName }} {{ $mariachi->email }} Alta {{ $registeredAtLabel ?: 'sin fecha' }}
Mariachi {{ $planLabel }} {{ $profile?->active_listings_count ?? 0 }} anuncio(s) activo(s) {{ $billingLabel }} {{ $profile?->city_name ?: 'Ciudad pendiente' }} {{ $statusLabel }}
@endsection