@php
$maintenanceWindows = collect();
if (auth()->check()) {
$portalCustomer = \App\Models\Customer::query()->where('user_id', auth()->id())->first()
?? \App\Models\Customer::query()->where('email', auth()->user()->email)->first();
if ($portalCustomer) {
$maintenanceWindows = \App\Models\MaintenanceWindow::bannerFor($portalCustomer);
}
}
@endphp
@if (auth()->check() && ! ($portalCustomer ?? null))
{{-- No customer behind this login (e.g. an operator account): say so, or
every customer action on these pages looks like a dead button. --}}
{{ __('dashboard.no_customer_title') }}{{ __('dashboard.no_customer_hint') }}
{{-- The console link is gone: a portal account is never an operator (R21). --}}
@endif
{{-- Impersonation is a MODE, not a notice: it stays visible
rather than hiding in a dropdown, because acting as someone
else without noticing is how mistakes happen. --}}
@if (session('impersonator_id'))