@extends('layouts.user_type.auth') @section('content') @if(str_replace('-', ' ', Request::path()) != "administration") @if(collect(["BOSS", "RESPONSABLE EXECUTION", "COMPTABLE"])->contains(auth()->user()->role)) Ajouter un personnel @endif @endif Ajout d'un personnel × {{ $listeFonctions = DB::table("utilitaires")->where("type", "FONCTION")->where("statut", "1")->orderby("nom")->get() }} {{ $listeGrades = DB::table("utilitaires")->where("type", "GRADE")->where("statut", "1")->orderby("nom")->get() }} {{ $listeMutuelles = DB::table("utilitaires")->where("type", "MUTUELLE")->where("statut", "1")->orderby("nom")->get() }} {{ $listeTypeContrats = DB::table("utilitaires")->where("type", "TYPE_CONTRAT")->where("statut", "1")->orderby("nom")->get() }} {{ $listeTypePersonnels = DB::table("utilitaires")->where("type", "TYPE_PERSONNEL")->where("statut", "1")->orderby("nom")->get() }} {{ $listeGenres = DB::table("utilitaires")->where("type", "GENRE")->where("statut", "1")->orderby("nom")->get() }} Nom * Prenom * Date de naissance * Genre * Choisir . . . @foreach($listeGenres as $genre) {{$genre->nom}} @endforeach Téléphone * Email Adresse Fonction * Choisir . . . @foreach($listeFonctions as $fonction) {{$fonction->nom}} @endforeach Domaine Specialite Supérieur * Choisir . . . {{ $ps = DB::table("personnels")->where("statut", "1")->orderby("nom")->get() }} @foreach($ps as $p) {{ $p->nom }} {{ $p->prenom }} @endforeach Type de personnel * Choisir . . . @foreach($listeTypePersonnels as $typePersonnel) {{$typePersonnel->nom}} @endforeach Type de contrat * Choisir . . . @foreach($listeTypeContrats as $typeContrat) {{$typeContrat->nom}} @endforeach Grade * Choisir . . . @foreach($listeGrades as $grade) @if(!($grade->nom == "RESPONSABLE EXECUTION" || $grade->nom == "BOSS") || ($grade->nom == "RESPONSABLE EXECUTION" || $grade->nom == "BOSS") && auth()->user()->role == "BOSS") {{$grade->nom}} @endif @endforeach Heure de prestation Date de prise de service * Mutuelle Choisir . . . @foreach($listeMutuelles as $mutuelle) {{$mutuelle->nom}} @endforeach LISTE DES PERSONNELS NOM ET PRENOMS TELEPHONE FONCTION GRADE ACTION @foreach($personnels as $personnel) {{ $personnel->nom . " " . $personnel->prenom ?? '' }} {{ $personnel->telephone ?? '' }} {{ $personnel->fonction ?? '' }} {{ $personnel->grade ?? '' }} @if(collect(["BOSS", "RESPONSABLE EXECUTION"])->contains(auth()->user()->role)) @endif @endforeach {{ $personnels->links() }} @endsection