
<?php  
use App\Models\User;
$user=User::where('id','=',Session::get('id'))->first(); 
?>

<!-- MANDATEMENTS -->
  <ul class="nav navbar-nav" style='margin:0px'>
        <li class ="dropdown">
            <a href="{!! url('accueil') !!} ">
              <span class="glyphicon glyphicon-home"></span>
            </a>
        </li>

        <!--
        <li class ="dropdown">
          <h4 style='color:darkred;font-weight:bold;padding-top:4px'>{!! Session::get('titre_spec') !!}</h4>
        </li>
        -->
        
      <li class ="dropdown"><a  class="dropdown-toggle" data-toggle="dropdown"  href="">Tiers<b class="caret"></b></a>
        <ul class="dropdown-menu"  role="menu"  aria-labelledby="dLabel">
          @if($user->can("CRE_VISU") || $user->HasRole("ADMINISTRATEUR"))
            <li><a href="{!! URL::to('/tiers/creanciers') !!} ">Créanciers</a></li>    
          @endif 

        </ul>
      </li>


      <li class ="dropdown"><a  class="dropdown-toggle" data-toggle="dropdown"  href="">Mandatements<b class="caret"></b></a>
        <ul class="dropdown-menu"  role="menu"  aria-labelledby="dLabel">
          @if($user->can("MDT_VISU") || $user->HasRole("ADMINISTRATEUR"))
          <li><a href="{!! URL::to('/mandatements/mandats') !!} ">Mandats</a></li> 
          @endif    

          @if($user->HasRole('MANDATEMENT')|| $user->HasRole("ADMINISTRATEUR"))
          <li class="divider"></li>            
          <li><a href="{!! URL::to('/mandatements/imputations') !!} ">Imputations</a></li>
          @endif 

          @if($user->HasRole('MANDATEMENT')|| $user->HasRole("ADMINISTRATEUR"))
          <li class="divider"></li>            
          <li><a href="{!! URL::to('/mandatements/generation') !!} ">Transferts</a></li>
          @endif 
        </ul>
      </li>
    </ul>

<!-- ACTIONS -->
@include('layouts.navbar_actions')





