@extends('central.super.layout') @section('title', __('super.dashboard.title')) @push('styles') @endpush @php $statusLabels = ['active' => __('super.status.active'), 'trial' => __('super.status.trial'), 'cancelled' => __('super.status.cancelled'), 'suspended' => __('super.status.suspended')]; $statusColors = ['active' => '#10b981', 'trial' => '#3b82f6', 'cancelled' => '#ef4444', 'suspended' => '#f59e0b']; $subscriptionChartLabels = []; $subscriptionChartSeries = []; $subscriptionChartColors = []; foreach ($statusLabels as $key => $label) { $count = $subscriptionStatusCounts[$key] ?? 0; if ($count > 0 || $key === 'active' || $key === 'trial') { $subscriptionChartLabels[] = $label; $subscriptionChartSeries[] = (int) $count; $subscriptionChartColors[] = $statusColors[$key]; } } if (empty($subscriptionChartSeries)) { $subscriptionChartLabels = [__('central.NoData')]; $subscriptionChartSeries = [1]; $subscriptionChartColors = ['#e2e8f0']; } $tenantsChartCategories = array_keys($tenantsByMonth); $tenantsChartData = array_values($tenantsByMonth); $plansChartCategories = array_keys($subscriptionsByPlan); $plansChartData = array_values($subscriptionsByPlan); $hour = now()->hour; $greeting = $hour < 12 ? __('super.dashboard.good_morning') : ($hour < 18 ? __('super.dashboard.good_afternoon') : __('super.dashboard.good_evening')); $adminUser = auth()->guard('central')->user(); $envDbHost = config('database.connections.central.host', '127.0.0.1'); $envDbPort = config('database.connections.central.port', '3306'); $envDbUser = config('database.connections.central.username', ''); $envDbPass = config('database.connections.central.password', ''); @endphp @section('content') {{-- Dashboard Header --}}
{{ __('super.dashboard.welcome') }}
| {{ __('central.TenantName') }} | {{ __('central.Subdomain') }} | {{ __('central.Email') }} | {{ __('central.RegistrationDate') }} | {{ __('central.Actions') }} |
|---|---|---|---|---|
| {{ $pt->company_name ?? $pt->id }} |
{{ $pt->domains->first()->domain ?? '—' }}
|
{{ $pt->admin_email ?? '—' }} | {{ $pt->created_at->format('M d, Y H:i') }} | |
{{ __('central.DatabaseConfigFor', ['name' => $pt->company_name ?? $pt->id]) }} |
||||