File manager - Edit - /var/www/html/homologBancodetalentos/storage/framework/views/d9cc1bb6092cb30e11ab451a275b9cf22669e776.php
Back
<?php use App\Http\Services\TalentBank\CandidateService; use App\Http\Services\TalentBank\CompanyService; use App\Models\TalentBank\Candidate; use App\Models\TalentBank\Company; use App\Support\SsoWebSession; $payload = session('sso.user_payload'); $requestUserPayload = request()->get('user'); $talentBankUser = request()->get('talentBankUser'); $ssoName = is_array($payload) ? ($payload['data']['name'] ?? null) : null; $requestUserName = is_array($requestUserPayload) ? data_get($requestUserPayload, 'data.name') : null; $modelUserName = is_object($talentBankUser) ? ($talentBankUser->name ?? $talentBankUser->trading_name ?? null) : null; $displayName = $ssoName ?: $requestUserName ?: $modelUserName ?: __('Minha conta'); $ssoDoc = is_array($payload) ? ($payload['data']['document'] ?? '') : ''; $docDigits = preg_replace('/\D/', '', (string) $ssoDoc); $isCompany = strlen($docDigits) >= 14; $perms = is_array($payload) ? ($payload['data']['permissions']['siati'] ?? []) : []; $canAdmin = is_array($perms) && (in_array('gestao-de-usuarios', $perms, true) || in_array('talent-bank-admin', $perms, true)); $hasSsoSession = SsoWebSession::hasToken(); $candidatePhotoPath = is_object($talentBankUser) ? ($talentBankUser->photo_path ?? null) : null; $companyLogoPath = is_object($talentBankUser) ? ($talentBankUser->logo ?? null) : null; $sessionPhotoPath = session('sso.profile_photo_path'); if ($hasSsoSession && $docDigits !== '' && ! ($talentBankUser instanceof Candidate || $talentBankUser instanceof Company)) { $talentBankUser = $isCompany ? Company::query()->where('cnpj', $docDigits)->first() : Candidate::query()->where('cpf', $docDigits)->first(); } $notificationRecipientType = null; if ($talentBankUser instanceof Company) { $notificationRecipientType = 'company'; } elseif ($talentBankUser instanceof Candidate) { $notificationRecipientType = 'candidate'; } if (! is_string($candidatePhotoPath) || trim($candidatePhotoPath) === '') { if (is_string($sessionPhotoPath) && trim($sessionPhotoPath) !== '') { $candidatePhotoPath = $sessionPhotoPath; } elseif ($hasSsoSession && $docDigits !== '') { if ($isCompany) { $companyFromDocument = $talentBankUser instanceof Company ? $talentBankUser : Company::query() ->select(['id', 'logo']) ->where('cnpj', $docDigits) ->first(); if ($companyFromDocument) { $companyLogoPath = $companyFromDocument->logo; } } else { $candidateFromDocument = $talentBankUser instanceof Candidate ? $talentBankUser : Candidate::query() ->select(['id', 'photo_path']) ->where('cpf', $docDigits) ->first(); if ($candidateFromDocument) { $candidatePhotoPath = $candidateFromDocument->photo_path; } } } } $profilePhotoUrl = null; if (is_string($candidatePhotoPath) && trim($candidatePhotoPath) !== '') { $profilePhotoUrl = CandidateService::photoPublicUrl($candidatePhotoPath); } elseif (is_string($companyLogoPath) && trim($companyLogoPath) !== '') { $profilePhotoUrl = CompanyService::logoPublicUrl($companyLogoPath); } ?> <section class="fixed-top" id="tb-navbar-auth-state" data-authenticated="<?php echo e($hasSsoSession ? '1' : '0'); ?>" data-auth-status-url="<?php echo e(route('auth.status')); ?>" data-auth-activity-url="<?php echo e(route('auth.activity')); ?>" data-login-url="<?php echo e(route('entrar')); ?>" > <nav class="navbar navbar-expand-lg navbar-custom shadow p-3"> <div class="container-xxl navbar-shell"> <a class="navbar-brand d-flex align-items-center" href="<?php echo e(route('home')); ?>"> <img src="<?php echo e(asset('images/icons/logo2.svg')); ?>" alt="Logo" class="navbar-logo"> </a> <?php if($hasSsoSession): ?> <div class="navbar-toolbar d-flex align-items-center"> <?php if($notificationRecipientType): ?> <?php echo $__env->make('components.notifications-bell', ['recipientType' => $notificationRecipientType], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <?php endif; ?> <div class="dropdown"> <button class="btn btn-nav-perfil dropdown-toggle d-flex align-items-center gap-2" type="button" data-bs-toggle="dropdown" aria-expanded="false"> <?php if($profilePhotoUrl): ?> <img src="<?php echo e($profilePhotoUrl); ?>" alt="<?php echo e($displayName); ?>" class="nav-avatar-img"> <?php else: ?> <div class="nav-avatar"><?php echo e(strtoupper(\Illuminate\Support\Str::substr($displayName, 0, 1))); ?></div> <?php endif; ?> <span class="nav-username d-none d-lg-inline"><?php echo e($displayName); ?></span> </button> <ul class="dropdown-menu dropdown-menu-end"> <li> <span class="dropdown-item-text"> <small class="text-muted">Logado como</small><br> <strong><?php echo e($isCompany ? 'Empresa' : 'Candidato'); ?></strong> </span> </li> <li><hr class="dropdown-divider"></li> <?php if($canAdmin): ?> <li> <a class="dropdown-item" href="<?php echo e(route('talent-bank.admin.candidates')); ?>"> <i class="bi bi-shield-check me-2"></i> Admin BT </a> </li> <?php endif; ?> <?php if($isCompany): ?> <li> <a class="dropdown-item" href="<?php echo e(route('talent-bank.company.dashboard')); ?>"> <i class="bi bi-building me-2"></i> Área da empresa </a> </li> <li> <a class="dropdown-item" href="<?php echo e(route('talent-bank.company.notifications.index')); ?>"> <i class="bi bi-bell me-2"></i> Notificações </a> </li> <?php else: ?> <li> <a class="dropdown-item" href="<?php echo e(route('talent-bank.candidate.profile')); ?>"> <i class="bi bi-person me-2"></i> Meu perfil </a> </li> <li> <a class="dropdown-item" href="<?php echo e(route('talent-bank.candidate.curriculum')); ?>"> <i class="bi bi-file-earmark-text me-2"></i> Meu currículo </a> </li> <li> <a class="dropdown-item" href="<?php echo e(route('talent-bank.candidate.notifications.index')); ?>"> <i class="bi bi-bell me-2"></i> Notificações </a> </li> <?php endif; ?> <li><hr class="dropdown-divider"></li> <li> <button type="button" class="dropdown-item text-danger" data-bs-toggle="modal" data-bs-target="#modalLogout" > <i class="bi bi-box-arrow-right me-2"></i> Sair </button> </li> </ul> </div> </div> <?php endif; ?> <button class="navbar-toggler <?php echo e($hasSsoSession ? 'ms-2' : 'ms-auto'); ?>" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse justify-content-end" id="navbarNav"> <ul class="navbar-nav mx-auto text-center"> <li class="nav-item"> <a class="nav-link <?php echo e(request()->routeIs('home') ? 'active' : ''); ?>" href="<?php echo e(route('home')); ?>" <?php if(request()->routeIs('home')): ?> aria-current="page" <?php endif; ?>> HOME </a> </li> <li class="nav-item"> <a class="nav-link <?php echo e(request()->routeIs('sobre') ? 'active' : ''); ?>" href="<?php echo e(route('sobre')); ?>" <?php if(request()->routeIs('sobre')): ?> aria-current="page" <?php endif; ?>> SOBRE </a> </li> <li class="nav-item"> <a class="nav-link <?php echo e(request()->routeIs('vagas') ? 'active' : ''); ?>" href="<?php echo e(route('vagas')); ?>" <?php if(request()->routeIs('vagas')): ?> aria-current="page" <?php endif; ?>> VAGAS </a> </li> <li class="nav-item"> <a class="nav-link <?php echo e(request()->routeIs('empresas') ? 'active' : ''); ?>" href="<?php echo e(route('empresas')); ?>" <?php if(request()->routeIs('empresas')): ?> aria-current="page" <?php endif; ?>> EMPRESAS </a> </li> <li class="nav-item"> <a class="nav-link <?php echo e(request()->routeIs('fale-conosco') ? 'active' : ''); ?>" href="<?php echo e(route('fale-conosco')); ?>" <?php if(request()->routeIs('fale-conosco')): ?> aria-current="page" <?php endif; ?>> FALE CONOSCO </a> </li> </ul> <?php if (! ($hasSsoSession)): ?> <div class="d-flex flex-column flex-lg-row align-items-center navbar-actions"> <a href="<?php echo e(route('entrar')); ?>" class="btn btn-nav-angra"> <i class="bi bi-person-badge-fill" aria-hidden="true"></i> <?php echo e(__('Acessar com a Conta Angra')); ?> </a> </div> <?php endif; ?> </div> </div> </nav> </section> <script> (function () { var nav = document.querySelector('.navbar-custom'); if (!nav) return; function onScroll() { nav.classList.toggle('navbar-scrolled', window.scrollY > 10); } window.addEventListener('scroll', onScroll, { passive: true }); onScroll(); }()); </script> <?php /**PATH /var/www/html/homologBancodetalentos/resources/views/components/navbar.blade.php ENDPATH**/ ?>
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings