@php $isTenant = tenant_check(); $tenantId = tenant_id(); $tenantSubdomain = tenant_subdomain(); if ($isTenant) { $systemSettings = tenant_settings_by_group('system'); } // Always get global pusher settings (for both admin and tenant) $pusherSettings = get_settings_by_group('pusher'); $themeSettings = get_batch_settings([ 'system.active_language', 'system.default_country_code', 'theme.seo_meta_title', 'theme.seo_meta_description', 'theme.favicon', ]); $countryCode = $themeSettings['system.default_country_code']; $locale = Auth::check() ? Session::get('locale', config('app.locale')) : ($isTenant ? $systemSettings['active_language'] : $themeSettings['system.active_language'] ?? config('app.locale')); $metaTitle = !empty($themeSettings['theme.seo_meta_title']) ? $themeSettings['theme.seo_meta_title'] : t('app_name'); $metaDescription = $themeSettings['theme.seo_meta_description'] ?? t('app_description'); $favicon = $themeSettings['theme.favicon'] ? Storage::url($themeSettings['theme.favicon']) : null; // Create dateTimeSettings array with tenant-aware settings $dateTimeSettings = [ 'timezone' => $isTenant ? ($systemSettings['timezone'] ?? config('app.timezone')) : ($themeSettings['system.timezone'] ?? config('app.timezone')), 'dateFormat' => $isTenant ? ($systemSettings['date_format'] ?? 'd-m-Y') : ($themeSettings['system.date_format'] ?? 'd-m-Y'), 'timeFormat' => $isTenant ? ($systemSettings['time_format'] ?? 'H:i') : ($themeSettings['system.time_format'] ?? 'H:i'), 'is24Hour' => $isTenant ? (($systemSettings['time_format'] ?? 'H:i') === 'H:i') : (($themeSettings['system.time_format'] ?? 'H:i') === 'H:i'), ]; $pageTitle = isset($title) ? " - $title" : ''; @endphp {{ $metaTitle . $pageTitle }} @livewireStyles @include(request()->routeIs('tenant.*') ? 'components.tenant-head-section' : 'components.admin-head-section') @vite(['resources/css/app.css', request()->routeIs('tenant.*') ? 'resources/css/tenant-app.css' : 'resources/css/admin-app.css']) @vite(\Nwidart\Modules\Module::getAssets()) @php do_action('app_module_headers'); @endphp {{-- JS leaflet --}} @stack('styles')
@if (request()->routeIs('tenant.*')) @else @endif
{{-- Header --}} @if (request()->routeIs('tenant.*')) @else @endif
@if (request()->routeIs('tenant.chat'))
{{ $slot }}
@else
{{ $slot }}
@endif
@livewireScripts @vite(['resources/js/app.js', request()->routeIs('tenant.*') ? 'resources/js/tenant-app.js' : 'resources/js/admin-app.js']) @php do_action('app_module_footers'); @endphp @stack('scripts')