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


<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>
  -->

    <!-- AIDES SOCIALES -->
    @if($user->HasRole("ADMINISTRATEUR") 
                    || $user->can("ANA_ASOC")
                    ) 
      <li class ="dropdown"><a  class="dropdown-toggle" data-toggle="dropdown"  href="">Aides Sociales<b class="caret"></b></a>
        <ul class="dropdown-menu">
          <li><a href="{!! URL::to('/stats/tdb/S') !!} ">Tableau de bord</a></li>
          <li><a href="{!! URL::to('/stats/graph/S') !!} ">Graphiques</a></li>
             @if($user->HasRole("ADMINISTRATEUR") || $user->HasRole("ADMINISTRATEUR FONCTIONNEL")) 
            <li><a href="{!! URL::to('/stats/tdb_nbenfant/S') !!} ">Tableau de bord sur période</a></li>
            @endif
        </ul>
      </li>
    @endif

    <!-- ALLOCATIONS -->
    @if($user->HasRole("ADMINISTRATEUR") 
                    || $user->can("ANA_ALL")
                    )  
        <li class ="dropdown"><a  class="dropdown-toggle" data-toggle="dropdown"  href="">Allocations<b class="caret"></b></a>
          <ul class="dropdown-menu">
            <li><a href="{!! URL::to('/stats/tdb/A') !!} ">Tableau de bord</a></li>
            <li><a href="{!! URL::to('/stats/graph/A') !!} ">Graphiques</a></li>
             @if($user->HasRole("ADMINISTRATEUR") || $user->HasRole("ADMINISTRATEUR FONCTIONNEL")) 
            <li><a href="{!! URL::to('/stats/tdb_nbenfant/A') !!} ">Tableau de bord sur période</a></li>
            @endif
          </ul>
        </li>
    @endif

    <!-- Retraites -->
    @if($user->HasRole("ADMINISTRATEUR") 
                    || $user->can("ANA_RET")
                    ) 
        <li class ="dropdown"><a  class="dropdown-toggle" data-toggle="dropdown"  href="">Retraites<b class="caret"></b></a>
          <ul class="dropdown-menu">
            <li><a href="{!! URL::to('/stats/tdb/R') !!} ">Tableau de bord</a></li>
            <li><a href="{!! URL::to('/stats/graph/R') !!} ">Graphiques</a></li>
            <li><a href="{!! URL::to('/stats/optimind') !!} ">Extraction OPTIMIND</a></li>
          </ul>
        </li>
    @endif

    <!-- Recouvrement -->
    @if($user->HasRole("ADMINISTRATEUR") 
                    || $user->can("ANA_REC")
                    ) 
        <li class ="dropdown"><a  class="dropdown-toggle" data-toggle="dropdown"  href="">Recouvrement<b class="caret"></b></a>
          <ul class="dropdown-menu">
            <li><a href="{!! URL::to('/stats/secteur') !!} ">Secteurs</a></li>
            <li><a href="{!! URL::to('/stats/secteur_general') !!} ">Secteurs/Date</a></li>
            <li><a href="{!! URL::to('/stats/salaires') !!} ">Nombre de salariés/Date</a></li>
          </ul>
        </li>
    @endif

    <!-- Données -->
    @if($user->HasRole("ADMINISTRATEUR") 
                    || $user->can("ANA_DATA")
                    ) 
        <li class ="dropdown"><a  class="dropdown-toggle" data-toggle="dropdown"  href="">Données<b class="caret"></b></a>
          <ul class="dropdown-menu">
            <li><a href="{!! URL::to('/analyses/benef_doublons') !!} ">Bénéficiaires-doublons</a></li>
            <li><a href="{!! URL::to('/analyses/histo_rib') !!} ">Modifications RIB</a></li>
          </ul>
        </li>
    @endif
</ul>

<!-- <li class="divider"></li>  -->
<!-- ACTIONS -->
@include('layouts.navbar_actions')





