@extends('admin.layout') @section('title') Affectation des Matériels @endsection @section('content')
| Photo | Matériel | Référence | Salarié | Date d'affectation | Date de remise | Date de retour | Status | Action | |
|---|---|---|---|---|---|---|---|---|---|
| {{ $i++ }} |
@if($materiel->photo)
@php $photos = json_decode($materiel->photo); @endphp
@if(!empty($photos))
@foreach($photos as $photo)
@if(file_exists(public_path('uploads/' . $photo)))
@break
@endif
@endforeach
@else
@endif
@else
@endif
|
@if($materiel) {{ $materiel->materiel ?? '' }} @else Matériel supprimé @endif | @if($materiel->reference) {{ $materiel->reference ?? '' }} @else Aucun @endif | @if($salarie) {{ $salarie->prenom ?? '' }} {{ $salarie->name ?? '' }} @else Salarié supprimé @endif | {{ \Carbon\Carbon::parse($affectation->date_de_prise)->format('d/m/Y') ?? '' }} | {{ \Carbon\Carbon::parse($affectation->date_de_remise)->format('d/m/Y') ?? '' }} | @if($affectation->date_retour) {{ \Carbon\Carbon::parse($affectation->date_retour)->format('d/m/Y') ?? '' }} @else En cours @endif | @if($affectation->status == 'returned') Retourné @else Affecté @endif | @if($affectation->status != 'returned') Marquer comme retourné @endif Supprimer |