@forelse($files as $file)
@php
$hideFile = auth()->user()->role === 'client'
&& $project->is_mask_valided
&& !$file->is_validated;
@endphp
@if (!$hideFile)
@if(auth()->user()->isBecip())
|
|
@endif
@if(auth()->user()->role == 'drawer' || auth()->user()->role == 'engineer')
is_last_index ? 'checked' : '' }}
/>
@else
is_last_index ? 'checked' : '' }}
/>
@endif
|
{{ $file->name }} |
@if(auth()->user()->role == 'drawer' || auth()->user()->role == 'engineer')
@else
{{ $file->type }}
@endif
|
@if($file->user_id == auth()->user()->id)
@else
@php
$comment = $file->comment;
$shortComment = strlen($comment) > 10
? substr($comment, 0, 10) . '...'
: $comment;
@endphp
{{ $shortComment }}
@if(strlen($comment) > 10)
@endif
@endif
|
{{ $file->uploadedBy ? $file->uploadedBy->name : 'Inconnu' }}
|
{{ date('d/m/Y', strtotime($file->created_at)) }}
|
@if(auth()->user()->role == 'engineer')
is_validated ? 'checked' : '' }}>
@else
is_validated ? 'checked' : '' }} disabled>
@endif
|
@if(auth()->user()->role == 'engineer' || $file->is_validated)
@else
@endif
|
@if(!$project->is_mask_distributed)
distribution_count >= 1) ? 'disabled' : '' }}
/>
|
{{ $file->distribution_count }}
|
@endif
@endif
@empty