@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 un prêt @endif @endif Ajout d'un prêt × Numéro du code du pret * 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("collaborateurs")->where("statut", "1")->where("type", "LOCATAIRE")->get() }} @foreach($ps as $p) {{ $p->nom }} @endforeach Description Matériel * Choisir . . . {{ $ps = DB::table("materiaus")->where("statut", "1")->orderby("nom")->get() }} @foreach($ps as $p) {{ $p->nom }} @endforeach Quantité prêtée * Date du prêt * Date prévue pour la restitution * LISTE DES PRETS AUTORITE ACQUERANT MATERIEL QUANTITE LOUEE ACTION @foreach($prets as $pret) {{ DB::table("personnels")->find($pret->autorite)->prenom ?? ''}} {{ DB::table("personnels")->find($pret->autorite)->nom ?? '' }} {{ DB::table("collaborateurs")->find($pret->acquerant)->nom ?? '' }} {{ DB::table("materiaus")->find($pret->materiel)->nom ?? '' }} {{ $pret->quantite_louer ?? '' }} @if(collect(["BOSS", "RESPONSABLE EXECUTION", "SERVICE TECHNIQUE", "COMPTABLE"])->contains(auth()->user()->role)) @endif @if(collect(["BOSS", "RESPONSABLE EXECUTION"])->contains(auth()->user()->role)) @endif @endforeach {{ $prets->links() }} @endsection