@php // Keep original fallback text "Kitchen" if no section is selected yet $selectedSectionId = session('selected_section_id') ?? ($current_section_id ?? null); $sectionTitle = \App\Helpers\Helper::getReportSectionTitle($selectedSectionId); // Check if user can edit this section (Tenant Admin cannot edit master-copied sections) $isTenantAdmin = (auth()->user()->roles->first()->slug ?? '') === 'tenant-admin'; $section = $selectedSectionId ? \App\Models\Section::find($selectedSectionId) : null; $hasMasterSectionId = $section && !empty($section->master_section_id); $canEditSection = !($isTenantAdmin && $hasMasterSectionId); @endphp @php $sectionLogo = \App\Helpers\Helper::getReportSectionLogo($selectedSectionId); @endphp

Section Logo {{ $sectionTitle ?? 'Kitchen' }} @if($isTenantAdmin && $hasMasterSectionId) @endif

@push('page_script') @endpush