@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 location @endif @endif Ajout d'une location × Numéro du code de la location * Autorité * Choisir . . . {{ $ps = DB::table("personnels")->where("statut", "1")->where("grade", "RESPONSABLE EXECUTION")->orWhere("grade", "BOSS")->orderby("nom")->get() }} @foreach($ps as $p) {{ $p->nom }} {{ $p->prenom }} @endforeach Acquérant * Choisir . . . {{ $ps = DB::table("personnels")->where("statut", "1")->get() }} @foreach($ps as $p) {{ $p->nom }} {{ $p->prenom }} @endforeach Chantier * Choisir . . . {{ $ps = DB::table("chantiers")->where("statut", "1")->get() }} @foreach($ps as $p) {{ $p->description }} @endforeach Description Matériel * Choisir . . . {{ $ps = DB::table("materiaus")->where("statut", "1")->orderby("nom")->get() }} @foreach($ps as $p) {{ $p->nom }} @endforeach Quantité louée * Date de la location * Date prévue pour la restitution * LISTE DES LOCATIONS AUTORITE ACQUERANT CHANTIER MATERIEL QUANTITE LOUEE ACTION @foreach($locations as $location) {{ DB::table("personnels")->find($location->autorite)->prenom ?? '' }} {{ DB::table("personnels")->find($location->autorite)->nom ?? '' }} {{ DB::table("personnels")->find($location->acquerant)->prenom ?? '' }} {{ DB::table("personnels")->find($location->acquerant)->nom ?? '' }} {{ DB::table("chantiers")->find($location->chantier)->code_chantier ?? '' }} {{ DB::table("materiaus")->find($location->materiel)->nom ?? '' }} {{ $location->quantite_louer ?? '' }} @if(collect(["BOSS", "RESPONSABLE EXECUTION", "SERVICE TECHNIQUE"])->contains(auth()->user()->role)) @endif @if(collect(["BOSS", "RESPONSABLE EXECUTION"])->contains(auth()->user()->role)) @endif @endforeach {{ $locations->links() }} @endsection