@extends('layout.app') @section('title', __('Dashboard')) @section('data_col', "2-columns") @section('body_class', "2-columns") @section('active_dashboard', "active") @push('styles') @endpush @section('content')
@if($employe)
{{ $employe->reference ?? 'N/A' }}

{{ $employe->first_name }} {{ $employe->last_name }}

{{ $employe->fonction->name ?? 'N/A' }}

{{ $employe->is_active ? __('Actif') : __('Inactif') }} @if($employe->mediateur) {{ __('Médiateur') }} @else {{ __('Non médiateur') }} @endif
{{ __('Fonction') }}
{{ $employe->fonction->name ?? 'N/A' }}
@if($employe->fonction && $employe->fonction->description) {{ $employe->fonction->description }} @endif
{{ __('Email') }}
{{ $employe->email ?? 'N/A' }}
{{ __('Téléphone') }}
{{ $employe->phone ?? 'N/A' }}
{{ __('Organisation') }}
{{ $employe->organisation->name ?? 'N/A' }}
@if($employe->organisation && $employe->organisation->description) {{ $employe->organisation->description }} @endif
{{ __('Chauffeur') }}
@if($employe->is_driver) {{ __('Oui') }} @else {{ __('Non') }} @endif
@if($employe->superior)
{{ __('Supérieur hiérarchique') }}
{{ $employe->superior->first_name }} {{ $employe->superior->last_name }} {{ $employe->superior->fonction->name ?? '' }}
@endif @if($employe->mediateur)
{{ __('Médiateur') }}
{{ $employe->mediateur->reference ?? 'N/A' }} {{ __('Médiateur actif') }}
@endif

{{ __('Organigramme') }} ({{ $subordinates->count() }} {{ __('Sous-employés') }})

{{ __('Structure hiérarchique des employés') }}

@if($subordinates->count() > 0) @endif
@if($employe->superior)
{{ $employe->superior->first_name }} {{ $employe->superior->last_name }} ({{ __('Supérieur') }})
{{ $employe->superior->fonction->name ?? 'N/A' }}
{{ $employe->superior->organisation->name ?? 'N/A' }}
@endif
{{ $employe->first_name }} {{ $employe->last_name }} ({{ __('Vous') }})
{{ $employe->fonction->name ?? 'N/A' }}
{{ $employe->organisation->name ?? 'N/A' }}
@if($subordinates->count() > 0)
@endif
@if($subordinates->count() > 0)
@foreach($subordinates as $index => $subordinate)
{{ $subordinate->first_name }} {{ $subordinate->last_name }} @if(!$subordinate->is_active) {{ __('Inactif') }} @endif
{{ $subordinate->fonction->name ?? 'N/A' }}
{{ $subordinate->organisation->name ?? 'N/A' }}
@if($subordinate->fils->count() > 0)
@endif
@if($subordinate->fils->count() > 0)
@foreach($subordinate->fils as $grandchild)
{{ $grandchild->first_name }} {{ $grandchild->last_name }} @if(!$grandchild->is_active) {{ __('Inactif') }} @endif
{{ $grandchild->fonction->name ?? 'N/A' }}
{{ $grandchild->organisation->name ?? 'N/A' }}
@endforeach
@endif @endforeach
@else

{{ __('Aucun sous-employé trouvé') }}

@endif
@else
{{ __('Aucun employé associé à votre compte') }}
@endif
@endsection @push('scripts') @endpush