Ngiler SH3LL 360
Home
Information
Create File
Create Folder
:
/
home
/
tbf
/
tbfguest.tbf.ro
/
src
/
components
/
public
/
Information Server
MySQL :
OFF
Perl :
OFF
CURL :
ON
WGET :
OFF
PKEXEC :
OFF
Directive
Local Value
IP Address
89.40.16.97
System
Linux server.atelieruldeit.ro 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64
User
tbf
PHP Version
7.3.33
Software
Apache
Doc root
Writable
close
Edit File :
Sidebar.vue
| Size :
32.17
KB
Copy
<!-- @format --> <template> <TransitionRoot as="template" :show="realTimeSidebar.sidebarOpen"> <Dialog as="div" class="relative z-50 lg:hidden sm:hidden" @close="toggleSidebar"> <TransitionChild as="template" enter="transition-opacity ease-linear duration-300" enter-from="opacity-0" enter-to="opacity-100" leave="transition-opacity ease-linear duration-300" leave-from="opacity-100" leave-to="opacity-0"> <div class="fixed inset-0 bg-gray-900/80" /> </TransitionChild> <div class="fixed inset-0 flex"> <TransitionChild as="template" enter="transition ease-in-out duration-300 transform" enter-from="-translate-x-full" enter-to="translate-x-0" leave="transition ease-in-out duration-300 transform" leave-from="translate-x-0" leave-to="-translate-x-full"> <DialogPanel class="relative mr-16 flex w-full max-w-xs flex-1"> <TransitionChild as="template" enter="ease-in-out duration-300" enter-from="opacity-0" enter-to="opacity-100" leave="ease-in-out duration-300" leave-from="opacity-100" leave-to="opacity-0"> <div class="absolute left-full top-0 flex w-16 justify-center pt-5"> <button type="button" class="-m-2.5 p-2.5" @click="toggleSidebar"> <span class="sr-only">Close sidebar</span> <svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 384 512" class="h-6 w-6 text-white"> <!--! Font Awesome Pro 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --> <path fill="currentColor" d="M324.5 411.1c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6L214.6 256 347.1 123.5c6.2-6.2 6.2-16.4 0-22.6s-16.4-6.2-22.6 0L192 233.4 59.5 100.9c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6L169.4 256 36.9 388.5c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0L192 278.6 324.5 411.1z" /> </svg> </button> </div> </TransitionChild> <!-- Sidebar component, swap this element with another sidebar if you like --> <div class="flex grow flex-col gap-y-5 overflow-y-auto bg-gray-900 px-6 pb-2 ring-1 ring-white/10"> <div class="flex h-16 shrink-0 items-center"> <img class="h-4 w-auto" src="@/assets/images/logo-tbf.svg" alt="Your Company" /> </div> <nav class="flex flex-1 flex-col"> <ul role="list" class="flex flex-1 flex-col gap-y-7"> <li> <ul role="list" class="-mx-2 space-y-1"> <router-link :to="{ name: 'company' }" custom v-slot="{ href, route, navigate, isActive, isExactActive }"> <li> <a :href="href" @click="navigate" :class="[ isExactActive ? 'bg-gray-800 text-white' : 'text-gray-400 hover:text-white hover:bg-gray-800', 'group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold', ]"> <svg class="h-6 w-6 shrink-0" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path vector-effect="non-scaling-stroke" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75m-3-7.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285z" /> </svg> Companie </a> </li> </router-link> <router-link :to="{ name: 'positions' }" custom v-slot="{ href, route, navigate, isActive, isExactActive }" v-if="$auth.check() && $auth.user().rights.enable_management"> <li> <a :href="href" @click="navigate" :class="[ $route.name.startsWith('positions') ? 'bg-gray-800 text-white' : 'text-gray-400 hover:text-white hover:bg-gray-800', 'group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold', ]"> <svg class="h-6 w-6 shrink-0" xmlns="http://www.w3.org/2000 group-hover:text-blue-500/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path vector-effect="non-scaling-stroke" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" d="M20.25 14.15v4.25c0 1.094-.787 2.036-1.872 2.18-2.087.277-4.216.42-6.378.42s-4.291-.143-6.378-.42c-1.085-.144-1.872-1.086-1.872-2.18v-4.25m16.5 0a2.18 2.18 0 00.75-1.661V8.706c0-1.081-.768-2.015-1.837-2.175a48.114 48.114 0 00-3.413-.387m4.5 8.006c-.194.165-.42.295-.673.38A23.978 23.978 0 0112 15.75c-2.648 0-5.195-.429-7.577-1.22a2.016 2.016 0 01-.673-.38m0 0A2.18 2.18 0 013 12.489V8.706c0-1.081.768-2.015 1.837-2.175a48.111 48.111 0 013.413-.387m7.5 0V5.25A2.25 2.25 0 0013.5 3h-3a2.25 2.25 0 00-2.25 2.25v.894m7.5 0a48.667 48.667 0 00-7.5 0M12 12.75h.008v.008H12v-.008z" /> </svg> Management </a> </li> </router-link> <li v-else> <Popper hover :openDelay="500" offsetDistance="0" placement="top" class="!block"> <a href="javascript:void(0);" @click="navigate" aria-disabled="true" class="text-gray-700 aria-disabled:cursor-not-allowed aria-disabled:text-gray-300 hover:bg-gray-50 group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold',"> <svg class="text-gray-300 h-6 w-6 shrink-0" xmlns="http://www.w3.org/2000 group-hover:text-blue-500/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path vector-effect="non-scaling-stroke" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" d="M20.25 14.15v4.25c0 1.094-.787 2.036-1.872 2.18-2.087.277-4.216.42-6.378.42s-4.291-.143-6.378-.42c-1.085-.144-1.872-1.086-1.872-2.18v-4.25m16.5 0a2.18 2.18 0 00.75-1.661V8.706c0-1.081-.768-2.015-1.837-2.175a48.114 48.114 0 00-3.413-.387m4.5 8.006c-.194.165-.42.295-.673.38A23.978 23.978 0 0112 15.75c-2.648 0-5.195-.429-7.577-1.22a2.016 2.016 0 01-.673-.38m0 0A2.18 2.18 0 013 12.489V8.706c0-1.081.768-2.015 1.837-2.175a48.111 48.111 0 013.413-.387m7.5 0V5.25A2.25 2.25 0 0013.5 3h-3a2.25 2.25 0 00-2.25 2.25v.894m7.5 0a48.667 48.667 0 00-7.5 0M12 12.75h.008v.008H12v-.008z" /> </svg> Management </a> <template #content> <div class="bg-gray-900 shadow-sm sm:rounded-lg p-2"> <p class="text-xs text-white">Accesibil după validarea informațiilor</p> </div> </template> </Popper> </li> <router-link :to="{ name: 'sales' }" custom v-slot="{ href, route, navigate, isActive, isExactActive }" v-if="$auth.check() && $auth.user().rights.enable_sales"> <li> <a :href="href" @click="navigate" :class="[ isExactActive ? 'bg-gray-800 text-white' : 'text-gray-400 hover:text-white hover:bg-gray-800', 'group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold', ]"> <svg class="h-6 w-6 shrink-0" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path vector-effect="non-scaling-stroke" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" d="M2.25 18.75a60.07 60.07 0 0115.797 2.101c.727.198 1.453-.342 1.453-1.096V18.75M3.75 4.5v.75A.75.75 0 013 6h-.75m0 0v-.375c0-.621.504-1.125 1.125-1.125H20.25M2.25 6v9m18-10.5v.75c0 .414.336.75.75.75h.75m-1.5-1.5h.375c.621 0 1.125.504 1.125 1.125v9.75c0 .621-.504 1.125-1.125 1.125h-.375m1.5-1.5H21a.75.75 0 00-.75.75v.75m0 0H3.75m0 0h-.375a1.125 1.125 0 01-1.125-1.125V15m1.5 1.5v-.75A.75.75 0 003 15h-.75M15 10.5a3 3 0 11-6 0 3 3 0 016 0zm3 0h.008v.008H18V10.5zm-12 0h.008v.008H6V10.5z" /> </svg> Vânzări </a> </li> </router-link> <li v-else> <Popper hover :openDelay="500" offsetDistance="0" placement="top" class="!block"> <a href="javascript:void(0);" aria-disabled="true" class="text-gray-700 aria-disabled:cursor-not-allowed aria-disabled:text-gray-300 hover:bg-gray-50 group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold"> <svg class="text-gray-300 h-6 w-6 shrink-0" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path vector-effect="non-scaling-stroke" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" d="M2.25 18.75a60.07 60.07 0 0115.797 2.101c.727.198 1.453-.342 1.453-1.096V18.75M3.75 4.5v.75A.75.75 0 013 6h-.75m0 0v-.375c0-.621.504-1.125 1.125-1.125H20.25M2.25 6v9m18-10.5v.75c0 .414.336.75.75.75h.75m-1.5-1.5h.375c.621 0 1.125.504 1.125 1.125v9.75c0 .621-.504 1.125-1.125 1.125h-.375m1.5-1.5H21a.75.75 0 00-.75.75v.75m0 0H3.75m0 0h-.375a1.125 1.125 0 01-1.125-1.125V15m1.5 1.5v-.75A.75.75 0 003 15h-.75M15 10.5a3 3 0 11-6 0 3 3 0 016 0zm3 0h.008v.008H18V10.5zm-12 0h.008v.008H6V10.5z" /> </svg> Vânzări </a> <template #content> <div class="bg-gray-900 shadow-sm sm:rounded-lg p-2"> <p class="text-xs text-white">Accesibil după validarea informațiilor</p> </div> </template> </Popper> </li> </ul> </li> <li> <div class="text-xs font-semibold leading-6 text-gray-400">Contul meu</div> <ul role="list" class="-mx-2 mt-2 space-y-1"> <router-link :to="{ name: 'instructions_company' }" custom v-slot="{ href, route, navigate, isActive, isExactActive }"> <li> <a :href="href" @click="navigate" :class="[ $route.name.startsWith('instructions') ? 'bg-gray-800 text-white' : 'text-gray-400 hover:text-white hover:bg-gray-800', 'group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold', ]"> <span class="flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border border-gray-700 bg-gray-800 text-[0.625rem] font-medium text-gray-400 group-hover:text-white" >H</span > <span class="truncate">Help</span> </a> </li> </router-link> <router-link :to="{ name: 'users' }" custom v-slot="{ href, route, navigate, isActive, isExactActive }" v-if="$auth.check({ role: ['super_admin', 'admin'] })"> <li> <a :href="href" @click="navigate" :class="[ $route.name.startsWith('utilizatori') ? 'bg-gray-800 text-white' : 'text-gray-400 hover:text-white hover:bg-gray-800', 'group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold', ]"> <span class="flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border border-gray-700 bg-gray-800 text-[0.625rem] font-medium group-hover:text-white" >U</span > <span class="truncate">Utilizatori</span> </a> </li> </router-link> <li> <a href="mailto:digital@tbf.ro" :class="['text-gray-400 hover:text-white hover:bg-gray-800', 'group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold']"> <span class="flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border border-gray-700 bg-gray-800 text-[0.625rem] font-medium text-gray-400 group-hover:text-white" >C</span > <span class="truncate">Contact TBF</span> </a> </li> </ul> </li> </ul> </nav> </div> </DialogPanel> </TransitionChild> </div> </Dialog> </TransitionRoot> <!-- Static sidebar for desktop --> <div class="hidden lg:fixed lg:inset-y-0 lg:z-30 lg:flex lg:w-72 lg:flex-col"> <!-- Sidebar component, swap this element with another sidebar if you like --> <div class="flex grow flex-col gap-y-5 overflow-y-auto border-r border-gray-200 px-6"> <div class="flex h-16 shrink-0 items-center"> <img class="h-5 w-auto" src="@/assets/images/logo-tbf.svg" alt="Your Company" /> </div> <nav class="flex flex-1 flex-col"> <ul role="list" class="flex flex-1 flex-col gap-y-7"> <li> <ul role="list" class="-mx-2 space-y-1"> <router-link :to="{ name: 'home' }" custom v-slot="{ href, route, navigate, isActive, isExactActive }" v-if="$auth.check({ role: ['super_admin', 'admin'] })"> <li> <a :href="href" @click="navigate" :class="[ isExactActive ? 'bg-gray-50 text-blue-500' : 'text-gray-700 hover:text-blue-500 hover:bg-gray-50', 'group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold focus:outline-none', ]"> <svg :class="[isExactActive ? 'text-blue-500' : 'text-gray-400 group-hover:text-blue-500', 'h-6 w-6 shrink-0']" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="w-6 h-6"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" stroke="currentColor" vector-effect="non-scaling-stroke" d="M2.25 12l8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25" /> </svg> Home </a> </li> </router-link> <li v-else> <Popper hover :openDelay="500" offsetDistance="0" placement="top" class="!block"> <a href="javascript:void(0);" @click="navigate" aria-disabled="true" class="group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold text-gray-700 aria-disabled:cursor-not-allowed aria-disabled:text-gray-300 hover:bg-gray-50 focus:outline-none"> <svg class="text-gray-300 h-6 w-6 shrink-0" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" stroke="currentColor" vector-effect="non-scaling-stroke" d="M2.25 12l8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25" /> </svg> Home </a> <template #content> <div class="bg-gray-900 shadow-sm sm:rounded-lg p-2"> <p class="text-xs text-white">Accesibil doar pentru administratori</p> </div> </template> </Popper> </li> <router-link :to="{ name: 'company' }" custom v-slot="{ href, route, navigate, isActive, isExactActive }" v-if="$auth.check({ role: ['super_admin', 'admin'] })"> <li> <a :href="href" @click="navigate" :class="[ isExactActive ? 'bg-gray-50 text-blue-500' : 'text-gray-700 hover:text-blue-500 hover:bg-gray-50', 'group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold focus:outline-none', ]"> <svg :class="[ $auth.check() && $auth.user().rights.role == 'employee' ? 'text-gray-300' : isExactActive ? 'text-blue-500' : 'text-gray-400 group-hover:text-blue-500', ]" class="h-6 w-6 shrink-0" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path stroke-width="1.5" vector-effect="non-scaling-stroke" stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75m-3-7.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285z" /> </svg> Companie </a> </li> </router-link> <li v-else> <Popper hover :openDelay="500" offsetDistance="0" placement="top" class="!block"> <a href="javascript:void(0);" @click="navigate" aria-disabled="true" class="group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold text-gray-700 aria-disabled:cursor-not-allowed aria-disabled:text-gray-300 hover:bg-gray-50 focus:outline-none"> <svg class="text-gray-300 h-6 w-6 shrink-0" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path stroke-width="1.5" vector-effect="non-scaling-stroke" stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75m-3-7.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285z" /> </svg> Companie </a> <template #content> <div class="bg-gray-900 shadow-sm sm:rounded-lg p-2"> <p class="text-xs text-white">Accesibil doar pentru administratori</p> </div> </template> </Popper> </li> <router-link :to="{ name: 'positions' }" custom v-slot="{ href, route, navigate, isActive, isExactActive }" v-if="$auth.check() && $auth.user().rights.enable_management"> <li> <a :href="href" @click="navigate" :class="[ $route.name.startsWith('positions') ? 'bg-gray-50 text-blue-500' : 'text-gray-700 hover:text-blue-500 hover:bg-gray-50', 'group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold focus:outline-none', ]"> <svg :class="[$route.name.startsWith('positions') ? 'text-blue-500' : 'text-gray-400 group-hover:text-blue-500', 'h-6 w-6 shrink-0']" xmlns="http://www.w3.org/2000 group-hover:text-blue-500/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path stroke-width="1.5" vector-effect="non-scaling-stroke" stroke-linecap="round" stroke-linejoin="round" d="M20.25 14.15v4.25c0 1.094-.787 2.036-1.872 2.18-2.087.277-4.216.42-6.378.42s-4.291-.143-6.378-.42c-1.085-.144-1.872-1.086-1.872-2.18v-4.25m16.5 0a2.18 2.18 0 00.75-1.661V8.706c0-1.081-.768-2.015-1.837-2.175a48.114 48.114 0 00-3.413-.387m4.5 8.006c-.194.165-.42.295-.673.38A23.978 23.978 0 0112 15.75c-2.648 0-5.195-.429-7.577-1.22a2.016 2.016 0 01-.673-.38m0 0A2.18 2.18 0 013 12.489V8.706c0-1.081.768-2.015 1.837-2.175a48.111 48.111 0 013.413-.387m7.5 0V5.25A2.25 2.25 0 0013.5 3h-3a2.25 2.25 0 00-2.25 2.25v.894m7.5 0a48.667 48.667 0 00-7.5 0M12 12.75h.008v.008H12v-.008z" /> </svg> Management </a> </li> </router-link> <li v-else> <Popper hover :openDelay="500" offsetDistance="0" placement="top" class="!block"> <a href="javascript:void(0);" @click="navigate" aria-disabled="true" class="group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold text-gray-700 aria-disabled:cursor-not-allowed aria-disabled:text-gray-300 hover:bg-gray-50 focus:outline-none"> <svg class="text-gray-300 h-6 w-6 shrink-0" xmlns="http://www.w3.org/2000 group-hover:text-blue-500/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path stroke-width="1.5" vector-effect="non-scaling-stroke" stroke-linecap="round" stroke-linejoin="round" d="M20.25 14.15v4.25c0 1.094-.787 2.036-1.872 2.18-2.087.277-4.216.42-6.378.42s-4.291-.143-6.378-.42c-1.085-.144-1.872-1.086-1.872-2.18v-4.25m16.5 0a2.18 2.18 0 00.75-1.661V8.706c0-1.081-.768-2.015-1.837-2.175a48.114 48.114 0 00-3.413-.387m4.5 8.006c-.194.165-.42.295-.673.38A23.978 23.978 0 0112 15.75c-2.648 0-5.195-.429-7.577-1.22a2.016 2.016 0 01-.673-.38m0 0A2.18 2.18 0 013 12.489V8.706c0-1.081.768-2.015 1.837-2.175a48.111 48.111 0 013.413-.387m7.5 0V5.25A2.25 2.25 0 0013.5 3h-3a2.25 2.25 0 00-2.25 2.25v.894m7.5 0a48.667 48.667 0 00-7.5 0M12 12.75h.008v.008H12v-.008z" /> </svg> Management </a> <template #content> <div class="bg-gray-900 shadow-sm sm:rounded-lg p-2"> <p class="text-xs text-white">Accesibil după validarea informațiilor</p> </div> </template> </Popper> </li> <router-link :to="{ name: 'sales' }" custom v-slot="{ href, route, navigate, isActive, isExactActive }" v-if="$auth.check() && $auth.user().rights.enable_sales"> <li> <a :href="href" @click="navigate" :class="[ isExactActive ? 'bg-gray-50 text-blue-500' : 'text-gray-700 hover:text-blue-500 hover:bg-gray-50', 'group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold focus:outline-none', ]"> <svg :class="[isExactActive ? 'text-blue-500' : 'text-gray-400 group-hover:text-blue-500', 'h-6 w-6 shrink-0']" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path stroke-width="1.5" vector-effect="non-scaling-stroke" stroke-linecap="round" stroke-linejoin="round" d="M2.25 18.75a60.07 60.07 0 0115.797 2.101c.727.198 1.453-.342 1.453-1.096V18.75M3.75 4.5v.75A.75.75 0 013 6h-.75m0 0v-.375c0-.621.504-1.125 1.125-1.125H20.25M2.25 6v9m18-10.5v.75c0 .414.336.75.75.75h.75m-1.5-1.5h.375c.621 0 1.125.504 1.125 1.125v9.75c0 .621-.504 1.125-1.125 1.125h-.375m1.5-1.5H21a.75.75 0 00-.75.75v.75m0 0H3.75m0 0h-.375a1.125 1.125 0 01-1.125-1.125V15m1.5 1.5v-.75A.75.75 0 003 15h-.75M15 10.5a3 3 0 11-6 0 3 3 0 016 0zm3 0h.008v.008H18V10.5zm-12 0h.008v.008H6V10.5z" /> </svg> Vânzări </a> </li> </router-link> <li v-else> <Popper hover :openDelay="500" offsetDistance="0" placement="top" class="!block"> <a href="javascript:void(0);" aria-disabled="true" class="group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold text-gray-700 aria-disabled:cursor-not-allowed aria-disabled:text-gray-300 hover:bg-gray-50 focus:outline-none"> <svg class="text-gray-300 h-6 w-6 shrink-0" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path stroke-width="1.5" vector-effect="non-scaling-stroke" stroke-linecap="round" stroke-linejoin="round" d="M2.25 18.75a60.07 60.07 0 0115.797 2.101c.727.198 1.453-.342 1.453-1.096V18.75M3.75 4.5v.75A.75.75 0 013 6h-.75m0 0v-.375c0-.621.504-1.125 1.125-1.125H20.25M2.25 6v9m18-10.5v.75c0 .414.336.75.75.75h.75m-1.5-1.5h.375c.621 0 1.125.504 1.125 1.125v9.75c0 .621-.504 1.125-1.125 1.125h-.375m1.5-1.5H21a.75.75 0 00-.75.75v.75m0 0H3.75m0 0h-.375a1.125 1.125 0 01-1.125-1.125V15m1.5 1.5v-.75A.75.75 0 003 15h-.75M15 10.5a3 3 0 11-6 0 3 3 0 016 0zm3 0h.008v.008H18V10.5zm-12 0h.008v.008H6V10.5z" /> </svg> Vânzări </a> <template #content> <div class="bg-gray-900 shadow-sm sm:rounded-lg p-2"> <p class="text-xs text-white">Accesibil după validarea informațiilor</p> </div> </template> </Popper> </li> </ul> </li> <li> <div class="text-xs font-semibold leading-6 text-gray-400">Contul meu</div> <ul role="list" class="-mx-2 mt-2 space-y-1"> <router-link :to="{ name: 'users' }" custom v-slot="{ href, route, navigate, isActive, isExactActive }" v-if="$auth.check({ role: ['super_admin', 'admin'] })"> <li> <a :href="href" @click="navigate" :class="[ $route.name.startsWith('users') ? 'bg-gray-50 text-blue-500' : 'text-gray-700 hover:text-blue-500 hover:bg-gray-50', 'group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold focus:outline-none', ]"> <span class="flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border border-gray-200 bg-white text-[0.625rem] font-medium text-gray-400">U</span> <span class="truncate">Utilizatori</span> </a> </li> </router-link> <li v-else> <Popper hover :openDelay="500" offsetDistance="0" placement="top" class="!block"> <a href="javascript:void(0);" aria-disabled="true" class="group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold text-gray-700 aria-disabled:cursor-not-allowed aria-disabled:text-gray-300 hover:bg-gray-50 focus:outline-none"> <span class="flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border border-gray-200 bg-white text-[0.625rem] font-medium text-gray-400">U</span> <span class="truncate">Utilizatori</span> </a> <template #content> <div class="bg-gray-900 shadow-sm sm:rounded-lg p-2"> <p class="text-xs text-white">Accesibil doar pentru administratori</p> </div> </template> </Popper> </li> <li v-if="$auth.check({ role: ['super_admin', 'admin'] })"> <a href="mailto:digital@tbf.ro" :class="['text-gray-700 hover:text-blue-500 hover:bg-gray-50', 'group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold focus:outline-none']"> <span class="flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border border-gray-200 bg-white text-[0.625rem] font-medium text-gray-400 group-hover:text-blue-500 group-hover:border-blue-500" >C</span > <span class="truncate">Contact TBF</span> </a> </li> <li v-else> <Popper hover :openDelay="500" offsetDistance="0" placement="top" class="!block"> <a href="javascript:void(0);" aria-disabled="true" class="group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold text-gray-700 aria-disabled:cursor-not-allowed aria-disabled:text-gray-300 hover:bg-gray-50 focus:outline-none"> <span class="flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border border-gray-200 bg-white text-[0.625rem] font-medium text-gray-400">C</span> <span class="truncate">Contact TBF</span> </a> <template #content> <div class="bg-gray-900 shadow-sm sm:rounded-lg p-2"> <p class="text-xs text-white">Accesibil doar pentru administratori</p> </div> </template> </Popper> </li> </ul> </li> <li class="-mx-6 mt-auto"> <div v-if="$auth.impersonating()" class="flex items-center gap-x-4 px-6 py-3 text-sm font-semibold leading-6 text-gray-900 hover:bg-gray-50"> <img class="h-8 w-8 rounded-full bg-gray-50" src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="" /> <span aria-hidden="true">Esti logat cu {{ userName }}</span> </div> <div class="w-full flex items-center gap-x-3 px-6 py-3 text-sm leading-6 text-gray-900 hover:bg-gray-50" v-else-if="$auth.check()"> <span class="sr-only">Your profile</span> <span aria-hidden="true" class="font-semibold">{{ userName }}</span> <button class="flex items-center gap-x-2 ml-auto group text-gray-400 hover:text-gray-900" @click="logout"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ml-auto h-3 w-3 shrink-0 text-gray-400 group-hover:text-gray-900"> <path fill="currentColor" d="M505 273c9.4-9.4 9.4-24.6 0-33.9L377 111c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l87 87L184 232c-13.3 0-24 10.7-24 24s10.7 24 24 24l246.1 0-87 87c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0L505 273zM168 80c13.3 0 24-10.7 24-24s-10.7-24-24-24L88 32C39.4 32 0 71.4 0 120L0 392c0 48.6 39.4 88 88 88l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-80 0c-22.1 0-40-17.9-40-40l0-272c0-22.1 17.9-40 40-40l80 0z" /> </svg> Deconectare </button> </div> <div @click="logoutImpersonate" :class="['flex items-center gap-x-4 group px-6 py-3 text-sm font-semibold leading-6 text-gray-700 hover:bg-gray-50 hover:text-blue-500 cursor-pointer']" v-if="$auth.impersonating()"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="h-5 w-5 shrink-0 text-gray-400 group-hover:text-blue-500"> <path fill="currentColor" d="M505 273c9.4-9.4 9.4-24.6 0-33.9L377 111c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l87 87L184 232c-13.3 0-24 10.7-24 24s10.7 24 24 24l246.1 0-87 87c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0L505 273zM168 80c13.3 0 24-10.7 24-24s-10.7-24-24-24L88 32C39.4 32 0 71.4 0 120L0 392c0 48.6 39.4 88 88 88l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-80 0c-22.1 0-40-17.9-40-40l0-272c0-22.1 17.9-40 40-40l80 0z" /> </svg> Revino la Admin </div> </li> </ul> </nav> </div> </div> <div class="sticky top-0 z-40 flex items-center gap-x-6 bg-gray-900 px-4 py-4 shadow-sm sm:px-6 lg:hidden sm:hidden"> <div type="button" class="flex -m-2.5 p-2.5 text-gray-400 lg:hidden" @click="toggleSidebar"> <span class="sr-only">Open sidebar</span> <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" aria-hidden="true" viewBox="0 0 448 512"> <path fill="currentColor" d="M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z" /> </svg> </div> <div class="flex-1 text-sm font-semibold leading-6 text-white">TBF Ai</div> <a href="#"> <span class="sr-only">Your profile</span> <img class="h-8 w-8 rounded-full bg-gray-800" src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="" /> </a> </div> </template> <script> import { Dialog, DialogPanel, TransitionChild, TransitionRoot, Menu, MenuButton, MenuItem, MenuItems } from "@headlessui/vue"; import { useSidebarStore } from "@/stores/sidebar.js"; export default { components: { Dialog, DialogPanel, TransitionChild, TransitionRoot, Menu, MenuButton, MenuItem, MenuItems, }, data() { return { realTimeSidebar: useSidebarStore(), }; }, computed: { userName() { const fullName = this.$auth.user().first_name; const parts = fullName.split(" "); if (parts.length > 1) { return parts[0] + " " + parts[1][0] + "."; } else { return fullName; } }, }, mounted() { // this.toggleSidebar() }, methods: { toggleSidebar() { // Update the real-time variable in the sidebar this.realTimeSidebar.toggleSidebar(); }, logout() { this.$auth.logout({ makeRequest: true, redirect: { name: "login" }, }); }, logoutImpersonate() { this.$auth.unimpersonate({ makeRequest: true, redirect: { name: "admin_instances" }, }); }, }, }; </script>
Back