@php $showCallexchangeWebphone = Auth::check(); $showNewLeadPopup = Auth::check() && in_array(Auth::user()->access_level ?? '', ['Admin', 'Office Manager'], true) && app(\App\Services\LeadAccessService::class)->canViewLeads(Auth::user()); @endphp @yield('title', config('app.name')) @yield('page-css') {{-- Must load after each page's vendor/custom CSS so theme compatibility wins. --}} @if($showCallexchangeWebphone) @endif @if($showNewLeadPopup) @endif @livewireStyles
@include('crm.layouts.header') @include('crm.layouts.sidebar')
@yield('main-content')
@include('crm.layouts.footer')
@if($showCallexchangeWebphone) @include('crm.partials.callexchange-webphone') @endif @if($showNewLeadPopup) @include('crm.partials.new-lead-notification') @endif @if($showCallexchangeWebphone) @endif @include('crm.partials.chat-notification') @yield('page-js') @if(session('status')) @endif @if(session('success')) @endif @if(session('error')) @endif @if(session('auto_dialer_message')) @endif @yield('bottom-js') @livewireScripts @if(app(\App\Services\LeadAccessService::class)->canViewClients(Auth::user()) && in_array(Auth::user()->access_level ?? '', ['Admin', 'Office Manager'])) @endif @if($showNewLeadPopup) @endif @if(app(\App\Services\LeadAccessService::class)->canViewClients(Auth::user()) && in_array(Auth::user()->access_level ?? '', ['Admin', 'Office Manager', 'Desk Manager', 'Agent'])) @endif