@foreach([
['Type', $source->sourceType->nom],
['Dépôt', $source->depot?->nom ?? '—'],
['Auteur', $source->auteur ?? '—'],
] as [$label, $val])
{{ $label }}
{{ $val }}
@endforeach
@if($source->description)
Description
{{ $source->description }}
@endif
@php
$statusColors = ['a_faire'=>'gray','en_cours'=>'blue','a_valider'=>'yellow','termine'=>'green'];
$color = $statusColors[$source->status->value] ?? 'gray';
@endphp
Statut
{{ $source->status->label() }}
@can('transition', $source)
@php $transitions = $source->status->transitions(); @endphp
@if(count($transitions))
Changer le statut
@foreach($transitions as $next)
@if($source->canTransitionTo($next, auth()->user()))
@endif
@endforeach
@endif
@endcan