Advertisement
jinhad

laravelApp

Jun 2nd, 2025
510
0
5 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 41.99 KB | Source Code | 0 0
  1. <nav x-data="{ open: false, admOpen: false, eventosOpen: false, universalOpen: false, unpOpen: false }" class="bg-white dark:bg-gray-800 border-b border-gray-100 dark:border-gray-700">
  2.     <!-- Primary Navigation Menu -->
  3.     <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
  4.         <div class="flex justify-between h-16">
  5.             <div class="flex w-full">
  6.                 <!-- Logo -->
  7.                 <div class="shrink-0 flex items-center">
  8.                     <a href="{{ route('dashboard') }}">
  9.                         <x-application-mark class="block h-9 w-auto" />
  10.                     </a>
  11.                 </div>
  12.  
  13.                 <!-- Navigation Links -->
  14.                 <div class="hidden space-x-8 sm:-my-px sm:ms-10 sm:flex rounded-lg p-2 flex-1 justify-center">
  15.                     <!-- ADM Dropdown -->
  16.                     @if (auth()->user()->hasAnyPermission([
  17.                                 'view adm dashboard',
  18.                                 'view unp dashboard',
  19.                                 'view evento dashboard',
  20.                                 'view universal dashboard',
  21.                             ]))
  22.                         <div class="relative m-2 pr-6 pl-6 pt-2" x-data="{ open: false }" @click.away="open = false">
  23.                             <x-nav-link href="#" @click.prevent="open = !open"
  24.                                 class="rounded-lg text-center flex flex-row items-center gap-1">
  25.                                 {{ __('ADM') }}
  26.                                 <svg class="size-4" xmlns="http://www.w3.org/2000/svg" fill="none"
  27.                                     viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
  28.                                     <path stroke-linecap="round" stroke-linejoin="round"
  29.                                         d="M19.5 8.25l-7.5 7.5-7.5-7.5" />
  30.                                 </svg>
  31.                             </x-nav-link>
  32.                             <div x-show="open"
  33.                                 class="absolute z-50 mt-2 w-48 rounded-md shadow-lg bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600">
  34.                                 @if (auth()->user()->hasPermissionTo('view unp dashboard'))
  35.                                     <x-dropdown-link href="{{ route('dashboard.unp') }}" :active="request()->routeIs('dashboard.unp')"
  36.                                         class="hover:bg-blue-100">{{ __('UNP') }}</x-dropdown-link>
  37.                                 @endif
  38.                                 @if (auth()->user()->hasPermissionTo('view evento dashboard'))
  39.                                     <x-dropdown-link href="{{ route('dashboard.ev') }}" :active="request()->routeIs('dashboard.ev')"
  40.                                         class="hover:bg-blue-100">{{ __('Eventos') }}</x-dropdown-link>
  41.                                 @endif
  42.                                 @if (auth()->user()->hasPermissionTo('view universal dashboard'))
  43.                                     <x-dropdown-link href="{{ route('dashboard.uni') }}" :active="request()->routeIs('dashboard.uni')"
  44.                                         class="hover:bg-blue-100">{{ __('Universal') }}</x-dropdown-link>
  45.                                 @endif
  46.                                 @if (auth()->user()->hasPermissionTo('view adm dashboard'))
  47.                                     <x-dropdown-link href="{{ route('dashboard.adm') }}" :active="request()->routeIs('dashboard.adm')"
  48.                                         class="hover:bg-blue-100">{{ __('ADM') }}</x-dropdown-link>
  49.                                 @endif
  50.                             </div>
  51.                         </div>
  52.                     @endif
  53.  
  54.                     <!-- Eventos Dropdown -->
  55.                     @if (auth()->user()->hasAnyPermission(['view terreiros', 'view instituicoes', 'view cestas', 'view entregas']))
  56.                         <div class="relative m-2 pr-6 pl-6 pt-2" x-data="{ open: false }" @click.away="open = false">
  57.                             <x-nav-link href="#" @click.prevent="open = !open"
  58.                                 class="rounded-lg text-center flex flex-row items-center gap-1">
  59.                                 {{ __('Eventos') }}
  60.                                 <svg class="size-4" xmlns="http://www.w3.org/2000/svg" fill="none"
  61.                                     viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
  62.                                     <path stroke-linecap="round" stroke-linejoin="round"
  63.                                         d="M19.5 8.25l-7.5 7.5-7.5-7.5" />
  64.                                 </svg>
  65.                             </x-nav-link>
  66.                             <div x-show="open"
  67.                                 class="absolute z-50 mt-2 w-48 rounded-md shadow-lg bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600">
  68.                                 @if (auth()->user()->hasPermissionTo('view terreiros'))
  69.                                     <x-dropdown-link href="{{ route('terreiros') }}" :active="request()->routeIs('terreiros')"
  70.                                         class="hover:bg-blue-100">{{ __('Terreiros') }}</x-dropdown-link>
  71.                                 @endif
  72.                                 @if (auth()->user()->hasPermissionTo('view instituicoes'))
  73.                                     <x-dropdown-link href="{{ route('instituicoes') }}" :active="request()->routeIs('instituicoes')"
  74.                                         class="hover:bg-blue-100">{{ __('Instituições') }}</x-dropdown-link>
  75.                                 @endif
  76.                                 @if (auth()->user()->hasPermissionTo('view cestas'))
  77.                                     <x-dropdown-link href="{{ route('cestas') }}" :active="request()->routeIs('cestas')"
  78.                                         class="hover:bg-blue-100">{{ __('Cestas') }}</x-dropdown-link>
  79.                                 @endif
  80.                                 @if (auth()->user()->hasPermissionTo('view entregas'))
  81.                                     <x-dropdown-link href="{{ route('entregas') }}" :active="request()->routeIs('entregas')"
  82.                                         class="hover:bg-blue-100">{{ __('Distribuição') }}</x-dropdown-link>
  83.                                 @endif
  84.                             </div>
  85.                         </div>
  86.                     @endif
  87.  
  88.                     <!-- Universal Dropdown -->
  89.                     @if (auth()->user()->hasAnyPermission([
  90.                                 'view categorias',
  91.                                 'view blocos',
  92.                                 'view regiaos',
  93.                                 'view igrejas',
  94.                                 'view pessoas',
  95.                                 'view pastores',
  96.                                 'view banners',
  97.                             ]))
  98.                         <div class="relative m-2 pr-6 pl-6 pt-2" x-data="{ open: false }" @click.away="open = false">
  99.                             <x-nav-link href="#" @click.prevent="open = !open"
  100.                                 class="rounded-lg text-center flex flex-row items-center gap-1">
  101.                                 {{ __('Universal') }}
  102.                                 <svg class="size-4" xmlns="http://www.w3.org/2000/svg" fill="none"
  103.                                     viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
  104.                                     <path stroke-linecap="round" stroke-linejoin="round"
  105.                                         d="M19.5 8.25l-7.5 7.5-7.5-7.5" />
  106.                                 </svg>
  107.                             </x-nav-link>
  108.                             <div x-show="open"
  109.                                 class="absolute z-50 mt-2 w-48 rounded-md shadow-lg bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600">
  110.                                 @if (auth()->user()->hasPermissionTo('view categorias'))
  111.                                     <x-dropdown-link href="{{ route('categorias') }}" :active="request()->routeIs('categorias')"
  112.                                         class="hover:bg-blue-100">{{ __('Categorias') }}</x-dropdown-link>
  113.                                 @endif
  114.                                 @if (auth()->user()->hasPermissionTo('view igrejas'))
  115.                                     <x-dropdown-link href="{{ route('igrejas') }}" :active="request()->routeIs('igrejas')"
  116.                                         class="hover:bg-blue-100">{{ __('Igrejas') }}</x-dropdown-link>
  117.                                 @endif
  118.                                 @if (auth()->user()->hasPermissionTo('view regiaos'))
  119.                                     <x-dropdown-link href="{{ route('regiaos') }}" :active="request()->routeIs('regiaos')"
  120.                                         class="hover:bg-blue-100">{{ __('Regiões') }}</x-dropdown-link>
  121.                                 @endif
  122.                                 @if (auth()->user()->hasPermissionTo('view blocos'))
  123.                                     <x-dropdown-link href="{{ route('blocos') }}" :active="request()->routeIs('blocos')"
  124.                                         class="hover:bg-blue-100">{{ __('Blocos') }}</x-dropdown-link>
  125.                                 @endif
  126.                                 @if (auth()->user()->hasPermissionTo('view pastores'))
  127.                                     <x-dropdown-link href="{{ route('pastores') }}" :active="request()->routeIs('pastores')"
  128.                                         class="hover:bg-blue-100">{{ __('Pastores') }}</x-dropdown-link>
  129.                                 @endif
  130.                                 @if (auth()->user()->hasPermissionTo('view pessoas'))
  131.                                     <x-dropdown-link href="{{ route('pessoas') }}" :active="request()->routeIs('pessoas')"
  132.                                         class="hover:bg-blue-100">{{ __('Pessoas') }}</x-dropdown-link>
  133.                                 @endif
  134.                                 @if (auth()->user()->hasPermissionTo('view banners'))
  135.                                     <x-dropdown-link href="{{ route('banners') }}" :active="request()->routeIs('banners')"
  136.                                         class="hover:bg-blue-100">{{ __('Banners') }}</x-dropdown-link>
  137.                                 @endif
  138.                             </div>
  139.                         </div>
  140.                     @endif
  141.  
  142.                     <!-- UNP Dropdown -->
  143.                     @if (auth()->user()->hasAnyPermission([
  144.                                 'view cursos',
  145.                                 'view formaturas',
  146.                                 'view instrutores',
  147.                                 'view reeducandos',
  148.                                 'view cargos',
  149.                                 'view grupos',
  150.                                 'view presidios',
  151.                             ]))
  152.                         <div class="relative m-2 pr-6 pl-6 pt-2" x-data="{ open: false }" @click.away="open = false">
  153.                             <x-nav-link href="#" @click.prevent="open = !open"
  154.                                 class="rounded-lg text-center flex flex-row items-center gap-1">
  155.                                 {{ __('UNP') }}
  156.                                 <svg class="size-4" xmlns="http://www.w3.org/2000/svg" fill="none"
  157.                                     viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
  158.                                     <path stroke-linecap="round" stroke-linejoin="round"
  159.                                         d="M19.5 8.25l-7.5 7.5-7.5-7.5" />
  160.                                 </svg>
  161.                             </x-nav-link>
  162.                             <div x-show="open"
  163.                                 class="absolute z-50 mt-2 w-48 rounded-md shadow-lg bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600">
  164.                                 @if (auth()->user()->hasPermissionTo('view cursos'))
  165.                                     <x-dropdown-link href="{{ route('cursos') }}" :active="request()->routeIs('cursos')"
  166.                                         class="hover:bg-blue-100">{{ __('Cursos') }}</x-dropdown-link>
  167.                                 @endif
  168.                                 @if (auth()->user()->hasPermissionTo('view formaturas'))
  169.                                     <x-dropdown-link href="{{ route('formaturas') }}" :active="request()->routeIs('formaturas')"
  170.                                         class="hover:bg-blue-100">{{ __('Formaturas') }}</x-dropdown-link>
  171.                                 @endif
  172.                                 @if (auth()->user()->hasPermissionTo('view instrutores'))
  173.                                     <x-dropdown-link href="{{ route('instrutores') }}" :active="request()->routeIs('instrutores')"
  174.                                         class="hover:bg-blue-100">{{ __('Instrutores') }}</x-dropdown-link>
  175.                                 @endif
  176.                                 @if (auth()->user()->hasPermissionTo('view reeducandos'))
  177.                                     <x-dropdown-link href="{{ route('reeducandos') }}" :active="request()->routeIs('reeducandos')"
  178.                                         class="hover:bg-blue-100">{{ __('Reeducandos') }}</x-dropdown-link>
  179.                                 @endif
  180.                                 @if (auth()->user()->hasPermissionTo('view cargos'))
  181.                                     <x-dropdown-link href="{{ route('cargos') }}" :active="request()->routeIs('cargos')"
  182.                                         class="hover:bg-blue-100">{{ __('Cargos') }}</x-dropdown-link>
  183.                                 @endif
  184.                                 @if (auth()->user()->hasPermissionTo('view grupos'))
  185.                                     <x-dropdown-link href="{{ route('grupos') }}" :active="request()->routeIs('grupos')"
  186.                                         class="hover:bg-blue-100">{{ __('Grupos') }}</x-dropdown-link>
  187.                                 @endif
  188.                                 @if (auth()->user()->hasPermissionTo('view presidios'))
  189.                                     <x-dropdown-link href="{{ route('presidios') }}" :active="request()->routeIs('presidios')"
  190.                                         class="hover:bg-blue-100">{{ __('Presidios') }}</x-dropdown-link>
  191.                                 @endif
  192.                             </div>
  193.                         </div>
  194.                     @endif
  195.                 </div>
  196.             </div>
  197.  
  198.             <div class="hidden sm:flex sm:items-center sm:ms-6" x-data="theme">
  199.                 <!-- Theme Toggle Button -->
  200.                 <button @click="toggleTheme"
  201.                     class="inline-flex items-center p-2 rounded-md text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 focus:outline-none focus:bg-gray-50 dark:focus:bg-gray-700 transition ease-in-out duration-150">
  202.                     <svg x-show="!isDarkMode" class="size-6" fill="none" stroke="currentColor"
  203.                         viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
  204.                         <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
  205.                             d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z">
  206.                         </path>
  207.                     </svg>
  208.                     <svg x-show="isDarkMode" class="size-6" fill="none" stroke="currentColor"
  209.                         viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
  210.                         <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
  211.                             d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z">
  212.                         </path>
  213.                     </svg>
  214.                 </button>
  215.  
  216.                 <!-- Teams Dropdown -->
  217.                 @if (Laravel\Jetstream\Jetstream::hasTeamFeatures())
  218.                     <div class="ms-3 relative">
  219.                         <x-dropdown align="right" width="60">
  220.                             <x-slot name="trigger">
  221.                                 <span class="inline-flex rounded-md">
  222.                                     <button type="button"
  223.                                         class="inline-flex items-center px-3 py-2 border border-transparent text-sm leading-4 font-medium rounded-md text-gray-500 dark:text-gray-400 bg-white dark:bg-gray-800 hover:text-gray-700 dark:hover:text-gray-300 focus:outline-none focus:bg-gray-50 dark:focus:bg-gray-700 active:bg-gray-50 dark:active:bg-gray-700 transition ease-in-out duration-150 hover:bg-blue-100">
  224.                                         {{ Auth::user()->currentTeam->name }}
  225.                                         <svg class="ms-2 -me-0.5 size-4" xmlns="http://www.w3.org/2000/svg"
  226.                                             fill="none" viewBox="0 0 24 24" stroke-width="1.5"
  227.                                             stroke="currentColor">
  228.                                             <path stroke-linecap="round" stroke-linejoin="round"
  229.                                                 d="M8.25 15L12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9" />
  230.                                         </svg>
  231.                                     </button>
  232.                                 </span>
  233.                             </x-slot>
  234.  
  235.                             <x-slot name="content">
  236.                                 <div class="w-60">
  237.                                     <!-- Team Management -->
  238.                                     <div class="block px-4 py-2 text-xs text-gray-400">
  239.                                         {{ __('Manage Team') }}
  240.                                     </div>
  241.  
  242.                                     <!-- Team Settings -->
  243.                                     <x-dropdown-link href="{{ route('teams.show', Auth::user()->currentTeam->id) }}"
  244.                                         class="hover:bg-blue-100">
  245.                                         {{ __('Team Settings') }}
  246.                                     </x-dropdown-link>
  247.  
  248.                                     @can('create', Laravel\Jetstream\Jetstream::newTeamModel())
  249.                                         <x-dropdown-link href="{{ route('teams.create') }}" class="hover:bg-blue-100">
  250.                                             {{ __('Create New Team') }}
  251.                                         </x-dropdown-link>
  252.                                     @endcan
  253.  
  254.                                     <!-- Team Switcher -->
  255.                                     @if (Auth::user()->allTeams()->count() > 1)
  256.                                         <div class="border-t border-gray-200 dark:border-gray-600"></div>
  257.  
  258.                                         <div class="block px-4 py-2 text-xs text-gray-400">
  259.                                             {{ __('Switch Teams') }}
  260.                                         </div>
  261.  
  262.                                         @foreach (Auth::user()->allTeams() as $team)
  263.                                             <x-switchable-team :team="$team" class="hover:bg-blue-100" />
  264.                                         @endforeach
  265.                                     @endif
  266.                                 </div>
  267.                             </x-slot>
  268.                         </x-dropdown>
  269.                     </div>
  270.                 @endif
  271.  
  272.                 <!-- Settings Dropdown -->
  273.                 <div class="ms-3 relative">
  274.                     <x-dropdown align="right" width="48">
  275.                         <x-slot name="trigger">
  276.                             @if (Laravel\Jetstream\Jetstream::managesProfilePhotos())
  277.                                 <button
  278.                                     class="flex text-sm border-2 border-transparent rounded-full focus:outline-none focus:border-gray-300 transition hover:bg-blue-100">
  279.                                     <img class="size-8 rounded-full object-cover"
  280.                                         src="{{ Auth::user()->profile_photo_url }}"
  281.                                         alt="{{ Auth::user()->name }}" />
  282.                                 </button>
  283.                             @else
  284.                                 <span class="inline-flex rounded-md">
  285.                                     <button type="button"
  286.                                         class="inline-flex items-center px-3 py-2 border border-transparent text-sm leading-4 font-medium rounded-md text-gray-500 dark:text-gray-400 bg-white dark:bg-gray-800 hover:text-gray-700 dark:hover:text-gray-300 focus:outline-none focus:bg-gray-50 dark:focus:bg-gray-700 active:bg-gray-50 dark:active:bg-gray-700 transition ease-in-out duration-150 hover:bg-blue-100">
  287.                                         {{ Auth::user()->name }}
  288.                                         <svg class="ms-2 -me-0.5 size-4" xmlns="http://www.w3.org/2000/svg"
  289.                                             fill="none" viewBox="0 0 24 24" stroke-width="1.5"
  290.                                             stroke="currentColor">
  291.                                             <path stroke-linecap="round" stroke-linejoin="round"
  292.                                                 d="M19.5 8.25l-7.5 7.5-7.5-7.5" />
  293.                                         </svg>
  294.                                     </button>
  295.                                 </span>
  296.                             @endif
  297.                         </x-slot>
  298.  
  299.                         <x-slot name="content">
  300.                             <!-- Account Management -->
  301.                             <div class="block px-4 py-2 text-xs text-gray-400">
  302.                                 {{ __('Manage Account') }}
  303.                             </div>
  304.  
  305.                             <x-dropdown-link href="{{ route('profile.show') }}" class="hover:bg-blue-100">
  306.                                 {{ __('Profile') }}
  307.                             </x-dropdown-link>
  308.  
  309.                             @if (auth()->user()->hasPermissionTo('superadmin'))
  310.                                 <x-dropdown-link href="{{ route('user-levels') }}" :active="request()->routeIs('user-levels')"
  311.                                     class="hover:bg-blue-100">
  312.                                     {{ __('Níveis') }}
  313.                                 </x-dropdown-link>
  314.                             @endif
  315.  
  316.                             @if (Laravel\Jetstream\Jetstream::hasApiFeatures())
  317.                                 <x-dropdown-link href="{{ route('api-tokens.index') }}" class="hover:bg-blue-100">
  318.                                     {{ __('API Tokens') }}
  319.                                 </x-dropdown-link>
  320.                             @endif
  321.  
  322.                             <div class="border-t border-gray-200 dark:border-gray-600"></div>
  323.  
  324.                             <!-- Authentication -->
  325.                             <form method="POST" action="{{ route('logout') }}" x-data>
  326.                                 @csrf
  327.                                 <x-dropdown-link href="{{ route('logout') }}" @click.prevent="$root.submit();"
  328.                                     class="hover:bg-blue-100">
  329.                                     {{ __('Log Out') }}
  330.                                 </x-dropdown-link>
  331.                             </form>
  332.                         </x-slot>
  333.                     </x-dropdown>
  334.                 </div>
  335.             </div>
  336.  
  337.             <!-- Hamburger -->
  338.             <div class="-me-2 flex items-center sm:hidden">
  339.                 <button @click="open = ! open"
  340.                     class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400 hover:bg-blue-100 dark:hover:bg-gray-900 focus:outline-none focus:bg-gray-100 dark:focus:bg-gray-900 focus:text-gray-500 dark:focus:text-gray-400 transition duration-150 ease-in-out">
  341.                     <svg class="size-6" stroke="currentColor" fill="none" viewBox="0 0 24 24">
  342.                         <path :class="{ 'hidden': open, 'inline-flex': !open }" class="inline-flex"
  343.                             stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
  344.                             d="M4 6h16M4 12h16M4 18h16" />
  345.                         <path :class="{ 'hidden': !open, 'inline-flex': open }" class="hidden" stroke-linecap="round"
  346.                             stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
  347.                     </svg>
  348.                 </button>
  349.             </div>
  350.         </div>
  351.     </div>
  352.  
  353.     <!-- Responsive Navigation Menu -->
  354.     <div :class="{ 'block': open, 'hidden': !open }" class="hidden sm:hidden">
  355.         <div class="pt-2 pb-3 space-y-1 border rounded-lg p-2 mx-4">
  356.             <!-- ADM Responsive Dropdown -->
  357.             @if (auth()->user()->hasAnyPermission([
  358.                         'view adm dashboard',
  359.                         'view unp dashboard',
  360.                         'view evento dashboard',
  361.                         'view universal dashboard',
  362.                     ]))
  363.                 <div x-data="{ open: false }">
  364.                     <x-responsive-nav-link href="#" @click.prevent="open = !open"
  365.                         class="hover:bg-blue-100 rounded-lg flex flex-row items-center gap-1">
  366.                         {{ __('ADM') }}
  367.                         <svg class="size-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
  368.                             stroke-width="1.5" stroke="currentColor">
  369.                             <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 8.25l-7.5 7.5-7.5-7.5" />
  370.                         </svg>
  371.                     </x-responsive-nav-link>
  372.                     <div x-show="open" class="pl-4 space-y-1">
  373.                         @if (auth()->user()->hasPermissionTo('view unp dashboard'))
  374.                             <x-responsive-nav-link href="{{ route('dashboard.unp') }}" :active="request()->routeIs('dashboard.unp')"
  375.                                 class="hover:bg-blue-100">{{ __('UNP') }}</x-responsive-nav-link>
  376.                         @endif
  377.                         @if (auth()->user()->hasPermissionTo('view evento dashboard'))
  378.                             <x-responsive-nav-link href="{{ route('dashboard.ev') }}" :active="request()->routeIs('dashboard.ev')"
  379.                                 class="hover:bg-blue-100">{{ __('Eventos') }}</x-responsive-nav-link>
  380.                         @endif
  381.                         @if (auth()->user()->hasPermissionTo('view universal dashboard'))
  382.                             <x-responsive-nav-link href="{{ route('dashboard.uni') }}" :active="request()->routeIs('dashboard.uni')"
  383.                                 class="hover:bg-blue-100">{{ __('Universal') }}</x-responsive-nav-link>
  384.                         @endif
  385.                         @if (auth()->user()->hasPermissionTo('view adm dashboard'))
  386.                             <x-responsive-nav-link href="{{ route('dashboard.adm') }}" :active="request()->routeIs('dashboard.adm')"
  387.                                 class="hover:bg-blue-100">{{ __('ADM') }}</x-responsive-nav-link>
  388.                         @endif
  389.                     </div>
  390.                 </div>
  391.             @endif
  392.  
  393.             <!-- Eventos Responsive Dropdown -->
  394.             @if (auth()->user()->hasAnyPermission(['view terreiros', 'view instituicoes', 'view cestas', 'view entregas']))
  395.                 <div x-data="{ open: false }">
  396.                     <x-responsive-nav-link href="#" @click.prevent="open = !open"
  397.                         class="hover:bg-blue-100 rounded-lg flex flex-row items-center gap-1">
  398.                         {{ __('Eventos') }}
  399.                         <svg class="size-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
  400.                             stroke-width="1.5" stroke="currentColor">
  401.                             <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 8.25l-7.5 7.5-7.5-7.5" />
  402.                         </svg>
  403.                     </x-responsive-nav-link>
  404.                     <div x-show="open" class="pl-4 space-y-1">
  405.                         @if (auth()->user()->hasPermissionTo('view terreiros'))
  406.                             <x-responsive-nav-link href="{{ route('terreiros') }}" :active="request()->routeIs('terreiros')"
  407.                                 class="hover:bg-blue-100">{{ __('Terreiros') }}</x-responsive-nav-link>
  408.                         @endif
  409.                         @if (auth()->user()->hasPermissionTo('view instituicoes'))
  410.                             <x-responsive-nav-link href="{{ route('instituicoes') }}" :active="request()->routeIs('instituicoes')"
  411.                                 class="hover:bg-blue-100">{{ __('Instituições') }}</x-responsive-nav-link>
  412.                         @endif
  413.                         @if (auth()->user()->hasPermissionTo('view cestas'))
  414.                             <x-responsive-nav-link href="{{ route('cestas') }}" :active="request()->routeIs('cestas')"
  415.                                 class="hover:bg-blue-100">{{ __('Cestas') }}</x-responsive-nav-link>
  416.                         @endif
  417.                         @if (auth()->user()->hasPermissionTo('view entregas'))
  418.                             <x-responsive-nav-link href="{{ route('entregas') }}" :active="request()->routeIs('entregas')"
  419.                                 class="hover:bg-blue-100">{{ __('Distribuição') }}</x-responsive-nav-link>
  420.                         @endif
  421.                     </div>
  422.                 </div>
  423.             @endif
  424.  
  425.             <!-- Universal Responsive Dropdown -->
  426.             @if (auth()->user()->hasAnyPermission([
  427.                         'view categorias',
  428.                         'view blocos',
  429.                         'view regiaos',
  430.                         'view igrejas',
  431.                         'view pessoas',
  432.                         'view pastores',
  433.                         'view banners',
  434.                     ]))
  435.                 <div x-data="{ open: false }">
  436.                     <x-responsive-nav-link href="#" @click.prevent="open = !open"
  437.                         class="hover:bg-blue-100 rounded-lg flex flex-row items-center gap-1">
  438.                         {{ __('Universal') }}
  439.                         <svg class="size-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
  440.                             stroke-width="1.5" stroke="currentColor">
  441.                             <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 8.25l-7.5 7.5-7.5-7.5" />
  442.                         </svg>
  443.                     </x-responsive-nav-link>
  444.                     <div x-show="open" class="pl-4 space-y-1">
  445.                         @if (auth()->user()->hasPermissionTo('view categorias'))
  446.                             <x-responsive-nav-link href="{{ route('categorias') }}" :active="request()->routeIs('categorias')"
  447.                                 class="hover:bg-blue-100">{{ __('Categorias') }}</x-responsive-nav-link>
  448.                         @endif
  449.                         @if (auth()->user()->hasPermissionTo('view igrejas'))
  450.                             <x-responsive-nav-link href="{{ route('igrejas') }}" :active="request()->routeIs('igrejas')"
  451.                                 class="hover:bg-blue-100">{{ __('Igrejas') }}</x-responsive-nav-link>
  452.                         @endif
  453.                         @if (auth()->user()->hasPermissionTo('view regiaos'))
  454.                             <x-responsive-nav-link href="{{ route('regiaos') }}" :active="request()->routeIs('regiaos')"
  455.                                 class="hover:bg-blue-100">{{ __('Regiões') }}</x-responsive-nav-link>
  456.                         @endif
  457.                         @if (auth()->user()->hasPermissionTo('view blocos'))
  458.                             <x-responsive-nav-link href="{{ route('blocos') }}" :active="request()->routeIs('blocos')"
  459.                                 class="hover:bg-blue-100">{{ __('Blocos') }}</x-responsive-nav-link>
  460.                         @endif
  461.                         @if (auth()->user()->hasPermissionTo('view pastores'))
  462.                             <x-responsive-nav-link href="{{ route('pastores') }}" :active="request()->routeIs('pastores')"
  463.                                 class="hover:bg-blue-100">{{ __('Pastores') }}</x-responsive-nav-link>
  464.                         @endif
  465.                         @if (auth()->user()->hasPermissionTo('view pessoas'))
  466.                             <x-responsive-nav-link href="{{ route('pessoas') }}" :active="request()->routeIs('pessoas')"
  467.                                 class="hover:bg-blue-100">{{ __('Pessoas') }}</x-responsive-nav-link>
  468.                         @endif
  469.                         @if (auth()->user()->hasPermissionTo('view banners'))
  470.                             <x-responsive-nav-link href="{{ route('banners') }}" :active="request()->routeIs('banners')"
  471.                                 class="hover:bg-blue-100">{{ __('Banners') }}</x-responsive-nav-link>
  472.                         @endif
  473.                     </div>
  474.                 </div>
  475.             @endif
  476.  
  477.             <!-- UNP Responsive Dropdown -->
  478.             @if (auth()->user()->hasAnyPermission([
  479.                         'view cursos',
  480.                         'view formaturas',
  481.                         'view instrutores',
  482.                         'view reeducandos',
  483.                         'view cargos',
  484.                         'view grupos',
  485.                         'view presidios',
  486.                     ]))
  487.                 <div x-data="{ open: false }">
  488.                     <x-responsive-nav-link href="#" @click.prevent="open = !open"
  489.                         class="hover:bg-blue-100 rounded-lg flex flex-row items-center gap-1">
  490.                         {{ __('UNP') }}
  491.                         <svg class="size-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
  492.                             stroke-width="1.5" stroke="currentColor">
  493.                             <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 8.25l-7.5 7.5-7.5-7.5" />
  494.                         </svg>
  495.                     </x-responsive-nav-link>
  496.                     <div x-show="open" class="pl-4 space-y-1">
  497.                         @if (auth()->user()->hasPermissionTo('view cursos'))
  498.                             <x-responsive-nav-link href="{{ route('cursos') }}" :active="request()->routeIs('cursos')"
  499.                                 class="hover:bg-blue-100">{{ __('Cursos') }}</x-responsive-nav-link>
  500.                         @endif
  501.                         @if (auth()->user()->hasPermissionTo('view formaturas'))
  502.                             <x-responsive-nav-link href="{{ route('formaturas') }}" :active="request()->routeIs('formaturas')"
  503.                                 class="hover:bg-blue-100">{{ __('Formaturas') }}</x-responsive-nav-link>
  504.                         @endif
  505.                         @if (auth()->user()->hasPermissionTo('view instrutores'))
  506.                             <x-responsive-nav-link href="{{ route('instrutores') }}" :active="request()->routeIs('instrutores')"
  507.                                 class="hover:bg-blue-100">{{ __('Instrutores') }}</x-responsive-nav-link>
  508.                         @endif
  509.                         @if (auth()->user()->hasPermissionTo('view reeducandos'))
  510.                             <x-responsive-nav-link href="{{ route('reeducandos') }}" :active="request()->routeIs('reeducandos')"
  511.                                 class="hover:bg-blue-100">{{ __('Reeducandos') }}</x-responsive-nav-link>
  512.                         @endif
  513.                         @if (auth()->user()->hasPermissionTo('view cargos'))
  514.                             <x-responsive-nav-link href="{{ route('cargos') }}" :active="request()->routeIs('cargos')"
  515.                                 class="hover:bg-blue-100">{{ __('Cargos') }}</x-responsive-nav-link>
  516.                         @endif
  517.                         @if (auth()->user()->hasPermissionTo('view grupos'))
  518.                             <x-responsive-nav-link href="{{ route('grupos') }}" :active="request()->routeIs('grupos')"
  519.                                 class="hover:bg-blue-100">{{ __('Grupos') }}</x-responsive-nav-link>
  520.                         @endif
  521.                         @if (auth()->user()->hasPermissionTo('view presidios'))
  522.                             <x-responsive-nav-link href="{{ route('presidios') }}" :active="request()->routeIs('presidios')"
  523.                                 class="hover:bg-blue-100">{{ __('Presidios') }}</x-responsive-nav-link>
  524.                         @endif
  525.                     </div>
  526.                 </div>
  527.             @endif
  528.         </div>
  529.  
  530.         <!-- Responsive Settings Options -->
  531.         <div class="pt-4 pb-1 border-t border-gray-200 dark:border-gray-600" x-data="theme">
  532.             <div class="flex items-center px-4">
  533.                 @if (Laravel\Jetstream\Jetstream::managesProfilePhotos())
  534.                     <div class="shrink-0 me-3">
  535.                         <img class="size-10 rounded-full object-cover" src="{{ Auth::user()->profile_photo_url }}"
  536.                             alt="{{ Auth::user()->name }}" />
  537.                     </div>
  538.                 @endif
  539.  
  540.                 <div>
  541.                     <div class="font-medium text-base text-gray-800 dark:text-gray-200">{{ Auth::user()->name }}
  542.                     </div>
  543.                     <div class="font-medium text-sm text-gray-500">{{ Auth::user()->email }}</div>
  544.                 </div>
  545.             </div>
  546.  
  547.             <div class="mt-3 space-y-1">
  548.                 <!-- Theme Toggle Button -->
  549.                 <button @click="toggleTheme"
  550.                     class="flex items-center px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-blue-100 rounded-md">
  551.                     <span x-show="!isDarkMode">{{ __('Modo Claro') }}</span>
  552.                     <span x-show="isDarkMode">{{ __('Modo Escuro') }}</span>
  553.                     <svg x-show="!isDarkMode" class="ms-2 size-4" fill="none" stroke="currentColor"
  554.                         viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
  555.                         <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
  556.                             d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z">
  557.                         </path>
  558.                     </svg>
  559.                     <svg x-show="isDarkMode" class="ms-2 size-4" fill="none" stroke="currentColor"
  560.                         viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
  561.                         <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
  562.                             d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z">
  563.                         </path>
  564.                     </svg>
  565.                 </button>
  566.  
  567.                 <!-- Account Management -->
  568.                 <x-responsive-nav-link href="{{ route('profile.show') }}" :active="request()->routeIs('profile.show')"
  569.                     class="hover:bg-blue-100">
  570.                     {{ __('Profile') }}
  571.                 </x-responsive-nav-link>
  572.  
  573.                 @if (auth()->user()->hasPermissionTo('superadmin'))
  574.                     <x-responsive-nav-link href="{{ route('user-levels') }}" :active="request()->routeIs('user-levels')"
  575.                         class="hover:bg-blue-100">
  576.                         {{ __('Níveis') }}
  577.                     </x-responsive-nav-link>
  578.                 @endif
  579.  
  580.                 @if (Laravel\Jetstream\Jetstream::hasApiFeatures())
  581.                     <x-responsive-nav-link href="{{ route('api-tokens.index') }}" :active="request()->routeIs('api-tokens.index')"
  582.                         class="hover:bg-blue-100">
  583.                         {{ __('API Tokens') }}
  584.                     </x-responsive-nav-link>
  585.                 @endif
  586.  
  587.                 <!-- Authentication -->
  588.                 <form method="POST" action="{{ route('logout') }}" x-data>
  589.                     @csrf
  590.                     <x-responsive-nav-link href="{{ route('logout') }}" @click.prevent="$root.submit();"
  591.                         class="hover:bg-blue-100">
  592.                         {{ __('Log Out') }}
  593.                     </x-responsive-nav-link>
  594.                 </form>
  595.                 @can('superadmin')
  596.                     <!-- Team Management -->
  597.                     @if (Laravel\Jetstream\Jetstream::hasTeamFeatures())
  598.                         <div class="border-t border-gray-200 dark:border-gray-600"></div>
  599.  
  600.                         <div class="block px-4 py-2 text-xs text-gray-400">
  601.                             {{ __('Manage Team') }}
  602.                         </div>
  603.  
  604.                         <!-- Team Settings -->
  605.                         <x-responsive-nav-link href="{{ route('teams.show', Auth::user()->currentTeam->id) }}"
  606.                             :active="request()->routeIs('teams.show')" class="hover:bg-blue-100">
  607.                             {{ __('Team Settings') }}
  608.                         </x-responsive-nav-link>
  609.  
  610.                         @can('create', Laravel\Jetstream\Jetstream::newTeamModel())
  611.                             <x-responsive-nav-link href="{{ route('teams.create') }}" :active="request()->routeIs('teams.create')"
  612.                                 class="hover:bg-blue-100">
  613.                                 {{ __('Create New Team') }}
  614.                             </x-responsive-nav-link>
  615.                         @endcan
  616.  
  617.                         <!-- Team Switcher -->
  618.                         @if (Auth::user()->allTeams()->count() > 1)
  619.                             <div class="border-t border-gray-200 dark:border-gray-600"></div>
  620.  
  621.                             <div class="block px-4 py-2 text-xs text-gray-400">
  622.                                 {{ __('Switch Teams') }}
  623.                             </div>
  624.  
  625.                             @foreach (Auth::user()->allTeams() as $team)
  626.                                 <x-switchable-team :team="$team" component="responsive-nav-link"
  627.                                     class="hover:bg-blue-100" />
  628.                             @endforeach
  629.                         @endif
  630.                     @endif
  631.                 @endcan
  632.             </div>
  633.         </div>
  634.     </div>
  635. </nav>
  636.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement