@vite(['resources/css/app.css', 'resources/js/app.js']) {{-- AZPET DS v3.0: base compilada no bundle app.css via Vite --}} @stack('page_styles') @php $authUser = auth()->user(); $brandLogo = asset('images/azpet-premium-logo.png'); $isSuperAdmin = $authUser?->role === \App\Models\User::ROLE_SUPER_ADMIN; $isClinicVet = $authUser?->role === \App\Models\User::ROLE_CLINICA_VETERINARIO; $isTutor = $authUser?->role === \App\Models\User::ROLE_TUTOR; $isOng = $authUser?->role === \App\Models\User::ROLE_ONG; $isLaboratorio = $authUser?->role === \App\Models\User::ROLE_LABORATORIO; $isTutorLike = $isTutor || $isOng; $productLabel = $isLaboratorio ? 'AZPET Hub' : ($isOng ? 'Adote.AZPET' : ($isTutor ? 'Health Memory' : 'Clinica Veterinario B2B')); $partnerLabel = $isLaboratorio ? 'LABORATORIO-PARCEIRO' : ($isOng ? 'ONG PARCEIRA' : 'CLINICA PARCEIRA'); $partnerIcon = $isLaboratorio ? 'ti-flask' : ($isOng ? 'ti-heart-handshake' : 'ti-building-hospital'); $partnerName = $authUser?->clinica?->nome_fantasia ?? $authUser?->laboratorio?->nome_fantasia ?? $authUser?->tutor?->nome ?? $authUser?->name ?? 'AZPET'; $userMedia = null; if ($isTutorLike && $authUser?->tutor?->photo_url) { $userMedia = $authUser->tutor->photo_url; } if ($isClinicVet && $authUser?->clinica?->logo_url) { $userMedia = $authUser->clinica->logo_url; } if ($isLaboratorio && $authUser?->laboratorio?->logo_url) { $userMedia = $authUser->laboratorio->logo_url; } $initials = collect(explode(' ', trim($authUser?->name ?? 'AZPET')))->filter()->take(2)->map(fn ($part) => mb_substr($part, 0, 1))->implode('') ?: 'AZ'; // Subnavegação horizontal da topbar — espelha o menu lateral usando SOMENTE rotas nomeadas reais. $topNav = []; $topNav[] = ['label' => 'Inicio', 'url' => route('web.dashboard'), 'active' => 'web.dashboard']; if ($isTutorLike) { $topNav[] = ['label' => $isOng ? 'Pets da ONG' : 'Meus pets', 'url' => route('web.pets.index'), 'active' => 'web.pets.*']; $topNav[] = ['label' => 'Health Memory', 'url' => route('web.premium-reports.index'), 'active' => 'web.premium-reports.*']; $topNav[] = ['label' => 'Relatorios', 'url' => route('web.exames.index'), 'active' => 'web.exames.*']; if ($isOng) { $topNav[] = ['label' => 'Transferencias', 'url' => route('web.ownership-transfers.index'), 'active' => ['web.ownership-transfers.*', 'web.pets.ownership-transfers.*']]; } } elseif ($isLaboratorio) { $topNav[] = ['label' => 'Envios', 'url' => route('web.laboratorio.portal'), 'active' => 'web.laboratorio.portal*']; } else { if ($isSuperAdmin || $isClinicVet) { $topNav[] = ['label' => 'Tutores', 'url' => route('web.tutors.index'), 'active' => 'web.tutors.*']; } $topNav[] = ['label' => 'Pets', 'url' => route('web.pets.index'), 'active' => 'web.pets.*']; $topNav[] = ['label' => 'Repositorio', 'url' => route('web.exames.index'), 'active' => 'web.exames.*']; $topNav[] = ['label' => 'Health Memory', 'url' => route('web.premium-reports.index'), 'active' => 'web.premium-reports.*']; } if ($isSuperAdmin) { $topNav[] = ['label' => 'Assinaturas', 'url' => route('web.subscriptions.index'), 'active' => 'web.subscriptions.*']; $topNav[] = ['label' => 'Clinicas', 'url' => route('web.clinicas.index'), 'active' => 'web.clinicas.*']; $topNav[] = ['label' => 'Veterinarios', 'url' => route('web.veterinarios.index'), 'active' => 'web.veterinarios.*']; $topNav[] = ['label' => 'Auditoria', 'url' => route('web.audit.index'), 'active' => 'web.audit.*']; } @endphp

@yield('title', 'AZPET')

@yield('subtitle', 'Sistema de gestao de memoria de saude pet')
@if ($userMedia) Avatar @else {{ $initials }} @endif
{{ $authUser?->name ?? 'AZPET' }} {{ $isOng ? 'ONG parceira' : ($isLaboratorio ? 'laboratorio parceiro' : ($isTutor ? 'tutor' : 'parceiro')) }}
@if (count($topNav) > 1) @endif
@if (session('status'))
{{ session('status') }}
@endif @if ($errors->any())
@foreach ($errors->all() as $error)
{{ $error }}
@endforeach
@endif @yield('content')
@include('partials.preview-modal')