
<ul class="nav nav-tabs" id="myTab" role="tablist">
    <li class="nav-item">
        <a class="nav-link {!! ($onglet_actif=='o_general')?'active show':'' !!}" href="#o_general" data-toggle="tab">Etat civil</a></li>
    <li class="nav-item">
        <a class="nav-link {!! ($onglet_actif=='o_adresse')?'active show':'' !!}" href="#o_adresse" data-toggle="tab">Adresse</a></li>
    <li class="nav-item">
        <a class="nav-link {!! ($onglet_actif=='o_famille')?'active show':'' !!}" href="#o_famille" data-toggle="tab">Famille</a></li>
    <li class="nav-item">
        <a class="nav-link {!! ($onglet_actif=='o_banque')?'active show':'' !!}" href="#o_banque" data-toggle="tab">Employeur/Banque</a></li>
    <li class="nav-item">
        <a class="nav-link {!! ($onglet_actif=='o_allocation')?'active show':'' !!}" href="#o_allocation" data-toggle="tab">Allocations</a></li>
    @if(isset($beneficiaire))
        @if( ($user->HasRole('ADMINISTRATEUR')|| $user->can('SAL_VISU')) && ($mode=="show"))
            <li class="nav-item">
                <a class="nav-link {!! ($onglet_actif=='o_salaire')?'active show':'' !!}" href="#o_salaire" data-toggle="tab">Salaires</a></li>
        @else
            <li class="nav-item">
                <a class="nav-link disabled" href="#o_salaire" data-toggle="tab">Salaires</a></li>
        @endif


        @if( ($user->HasRole('ADMINISTRATEUR') || $user->can('ALL_VER_VISU') || $user->can('SOC_VER_VISU') || $user->can('RET_VER_VISU')) && ($mode=="show"))
            <li class="nav-item">
                <a class="nav-link {!! ($onglet_actif=='o_versement')?'active show':'' !!}" href="#o_versement" data-toggle="tab">Versements</a></li>
        @else
            <li class="nav-item">
                <a class="nav-link disabled" href="#o_versement" data-toggle="tab">Versements</a></li>
        @endif

        @if( $user->HasRole('ADMINISTRATEUR')|| $user->can('RET_VISU') )
            <li class="nav-item">
                <a class="nav-link {!! ($onglet_actif=='o_retraite')?'active show':'' !!}" href="#o_retraite" data-toggle="tab">Retraite</a></li>
        @else
            <li class="nav-item">
                <a class="nav-link disabled" href="#o_retraite" data-toggle="tab">Retraite</a></li>
        @endif

        @if($mode=="show")
            <li class="nav-item">
                <a class="nav-link {!! ($onglet_actif=='o_edition')?'active show':'' !!}" href="#o_edition" data-toggle="tab">Editions</a></li>
        @else
            <a class="nav-link disabled" href="#o_edition" data-toggle="tab">Editions</a></li>
        @endif
    @endif
</ul>

<div class="tab-content p-3">
    <!-- ------------------------------------- onglet NOM ------------------------------- -->
    <div class="tab-pane fade {!! ($onglet_actif=='o_general')?'active show':'' !!}" id="o_general" role="tabpanel" aria-labelledby="o_general-tab">
        @include("tiers.beneficiaires.rows_general")
    </div>
    <!-- ------------------------------------- onglet Adresse ------------------------------- -->
    <div class="tab-pane fade {!! ($onglet_actif=='o_adresse')?'active show':'' !!}" id="o_adresse" role="tabpanel" aria-labelledby="o_adresse-tab">
        @include("tiers.beneficiaires.rows_adresse")
    </div>
    <!-- ------------------------------------- onglet Conjoint-Famille ------------------------------- -->
    <div class="tab-pane fade {!! ($onglet_actif=='o_famille')?'active show':'' !!}" id="o_famille" role="tabpanel" aria-labelledby="o_famille-tab">
        @include("tiers.beneficiaires.rows_famille")
    </div>
    <!-- ------------------------------------- onglet Employeur/Banque ------------------------------- -->
    <div class="tab-pane fade {!! ($onglet_actif=='o_banque')?'active show':'' !!}" id="o_banque" role="tabpanel" aria-labelledby="o_banque-tab">
        @include("tiers.beneficiaires.rows_banque")
    </div>
    <!-- ------------------------------------- onglet Allocations ------------------------------- -->
    <div class="tab-pane fade {!! ($onglet_actif=='o_allocation')?'active show':'' !!}" id="o_allocation" role="tabpanel" aria-labelledby="o_allocation-tab">
        @include("tiers.beneficiaires.rows_allocation")
    </div>

    @if(isset($beneficiaire))
        @if( ($user->HasRole('ADMINISTRATEUR')|| $user->can('SAL_VISU')) && ($mode=="show"))
            <!-- ------------------------------------- onglet Salaires ------------------------------- -->
            <div class="tab-pane fade {!! ($onglet_actif=='o_salaire')?'active show':'' !!}" id="o_salaire" role="tabpanel" aria-labelledby="o_salaire-tab">
                @include("tiers.beneficiaires.rows_salaire")
            </div>
        @endif


        @if( ($user->HasRole('ADMINISTRATEUR')|| $user->can('ALL_VER_VISU') || $user->can('SOC_VER_VISU') || $user->can('RET_VER_VISU')) && ($mode=="show"))
            <!-- ------------------------------------- onglet Versements ------------------------------- -->
            <div class="tab-pane fade {!! ($onglet_actif=='o_versement')?'active show':'' !!}" id="o_versement" role="tabpanel" aria-labelledby="o_versement-tab">
                @include("tiers.beneficiaires.rows_versement")
            </div>
        @endif

        @if( $user->HasRole('ADMINISTRATEUR')|| $user->can('RET_VISU')|| $user->can('RET_MAJ') )
            <!-- ------------------------------------- onglet Retraite ------------------------------- -->
            <div class="tab-pane fade {!! ($onglet_actif=='o_retraite')?'active show':'' !!}" id="o_retraite" role="tabpanel" aria-labelledby="o_retraite-tab">
                @include("tiers.beneficiaires.rows_retraite")
            </div>
        @endif

        <!-- ------------------------------------- onglet Editions ------------------------------- -->
        @if($mode=="show")
            <div class="tab-pane fade {!! ($onglet_actif=='o_edition')?'active show':'' !!}" id="o_edition" role="tabpanel" aria-labelledby="o_edition-tab">
                @include("tiers.beneficiaires.rows_edition")
            </div>
        @endif
    @endif
</div>


<div class='form-group'>
    @if($mode=="show")
        @if($user->hasRole("ADMINISTRATEUR") || $user->can("BEN_MAJ"))
            <a class="btn btn-primary" href="#" id="btn_modifier">Modifier</a>
        @endif
    @else
        {!! html()->button('Enregistrer')->value('Enregistrer')->type('submit')->attributes(['class' => 'btn btn-primary']) !!}
    @endif
    <a class="btn btn-warning"  href="{!! url('beneficiaires_liste/'.$benef_type) !!}">Retour</a>
</div>






