{{-- Language switcher --}}
@php
$currentLocale = app()->getLocale();
$flagSvgs = [
'en' => '',
'fr' => '',
'ar' => '',
'es' => '',
'hi' => '',
'bn' => '',
'tr' => '',
'de' => '',
'pt' => '',
];
$langLabels = [
'en' => 'English',
'fr' => 'Français',
'ar' => 'العربية',
'es' => 'Español',
'hi' => 'हिन्दी',
'bn' => 'বাংলা',
'tr' => 'Türkçe',
'de' => 'Deutsch',
'pt' => 'Português',
];
@endphp
{{-- Dark mode toggle --}}
@php
$__navPendingTenants = isset($pendingTenants) ? $pendingTenants : \App\Tenant::with('domains')->where('status', \App\Tenant::STATUS_PENDING)->orderByDesc('created_at')->get();
$__navPendingOffline = \App\Models\Central\PendingRegistration::where('gateway', 'offline')
->where('status', \App\Models\Central\PendingRegistration::STATUS_PROCESSING)
->with('plan')
->orderByDesc('created_at')
->get();
$__navPendingBilling = \App\Models\Central\TenantBillingPayment::whereIn('gateway', ['offline', 'manual'])
->where('status', \App\Models\Central\TenantBillingPayment::STATUS_PENDING)
->with(['tenant', 'plan'])
->orderByDesc('created_at')
->get();
$__navHasNotifications = $__navPendingTenants->count() > 0 || $__navPendingOffline->count() > 0 || $__navPendingBilling->count() > 0;
@endphp
@php $user = auth()->guard('central')->user(); @endphp
{{ __('landing.language') }}
@foreach($langLabels as $code => $label)
@endforeach
- {{ __('super.topbar.notifications') }} {{-- Pending offline payments --}} @foreach($__navPendingOffline as $reg)
-
Bank Transfer {{ $reg->company_name }}Offline payment proof awaiting verification{{ $reg->created_at->diffForHumans() }}
@endforeach
{{-- Pending billing offline payments (tenant upgrades/renewals) --}}
@foreach($__navPendingBilling as $billingPayment)
-
Bank Transfer {{ $billingPayment->tenant->company_name ?? $billingPayment->tenant_id }}Billing payment proof awaiting verification — {{ $billingPayment->plan->name ?? 'N/A' }} ({{ ucfirst($billingPayment->billing_cycle) }}){{ $billingPayment->created_at->diffForHumans() }}
@endforeach
{{-- Pending tenants --}}
@foreach($__navPendingTenants as $tenant)
-
{{ __('super.topbar.pending') }} {{ $tenant->company_name ?? $tenant->id }}{{ __('super.topbar.pending_tenant_msg') }}{{ $tenant->created_at->diffForHumans() }}
@endforeach
@if(!$__navHasNotifications)
-
{{ __('super.topbar.no_notifications') }}{{ __('super.topbar.all_caught_up') }}
@endif
@if($__navPendingOffline->count() || $__navPendingBilling->count())
- View {{ $__navPendingOffline->count() }} pending {{ Str::plural('registration', $__navPendingOffline->count()) }} @endif @if($__navPendingBilling->count())
- View {{ $__navPendingBilling->count() }} pending billing {{ Str::plural('payment', $__navPendingBilling->count()) }} @endif @endif @if($__navPendingTenants->count())
- @if(!$__navPendingOffline->count())
@endif - {{ __('super.topbar.view_all_pending') }} @endif
-
{{ $user->name ?? 'Super Admin' }}
{{ $user->email ?? '' }}
- {{ __('super.topbar.dashboard') }}
- {{ __('super.topbar.my_profile') }}
- {{ __('super.topbar.home') }}
{{ session('success') }}
@endif
@if(session('error'))
{{ session('error') }}
@endif
@if($errors->any())
{{ $errors->first() }}
@endif
@yield('content')