@extends('layouts.user_type.auth') @section('content') @if(str_replace('-', ' ', Request::path()) != "administration") @if(collect(["BOSS", "RESPONSABLE EXECUTION", "SERVICE TECHNIQUE"])->contains(auth()->user()->role)) Ajouter une chantier @endif @endif {{ $listeTypeOuiNons = DB::table("utilitaires")->where("type", "TYPE_OUI_NON")->where("statut", "1")->orderby("nom")->get() }} Ajout d'un chantier × Numéro du code du chantier * Description * Adresse * Client * Choisir . . . {{ $ps = DB::table("clients")->where("statut", "1")->orderBy("nom")->get() }} @foreach($ps as $p) {{ $p->nom }} @endforeach Gestionnaire du chantier * Choisir . . . {{ $ps = DB::table("personnels")->where("statut", "1")->where("grade", "RESPONSABLE EXECUTION")->orderBy("nom")->get() }} @foreach($ps as $p) {{ $p->nom }} {{ $p->prenom }} @endforeach Chef chantier Choisir . . . {{ $ps = DB::table("personnels")->where("statut", "1")->where("grade", "CHEF CHANTIER")->orderBy("nom")->get() }} @foreach($ps as $p) {{ $p->nom }} {{ $p->prenom }} @endforeach Liste des chefs d'équipes Choisir . . . {{ $ps = DB::table("personnels")->where("statut", "1")->where("grade", "CHEF EQUIPE")->orderBy("nom")->get() }} @foreach($ps as $p) {{ $p->nom }} {{ $p->prenom }} @endforeach Liste des personnels Choisir . . . {{ $ps = DB::table("personnels")->where("statut", "1")->where("grade", "PERSONNEL")->orderBy("nom")->get() }} @foreach($ps as $p) {{ $p->nom }} {{ $p->prenom }} @endforeach Liste des matériels Choisir . . . {{ $ps = DB::table("materiaus")->where("statut", "1")->orderBy("nom")->get() }} @foreach($ps as $p) {{ $p->nom }} @endforeach Date de début des travaux Date de fin des travaux Achever Choisir . . . @foreach($listeTypeOuiNons as $typeOuiNon) nom == "NON" ? 'selected' : ''}}>{{$typeOuiNon->nom}} @endforeach LISTE DES CHANTIERS DESCRIPTION ADRESSE GESTIONNAIRE DEBUT FIN ACTION @foreach($chantiers as $chantier) {{ $chantier->description ?? '' }} {{ $chantier->adresse ?? '' }} {{ DB::table("personnels")->find($chantier->gestionnaire_chantier)->nom ?? '' }} {{ DB::table("personnels")->find($chantier->gestionnaire_chantier)->prenom ?? '' }} {{ date_format(date_create($chantier->date_debut), "d/m/Y") ?? '' }} {{ date_format(date_create($chantier->date_fin), "d/m/Y") ?? '' }} @if(collect(["BOSS", "RESPONSABLE EXECUTION", "SERVICE TECHNIQUE"])->contains(auth()->user()->role)) @endif @if(collect(["BOSS", "RESPONSABLE EXECUTION"])->contains(auth()->user()->role)) @endif @endforeach {{ $chantiers->links() }} @endsection