@extends('layout.app') @section('content') @php $userPr = Auth::user()->sites ?? collect([]); @endphp

Gestion des tickets @if(request()->status) (Archivés) @endif

@if(!count($tickets)) @endif @foreach ($tickets as $ticket) @php $cls = $ticket->status == TicketStatus::archived() ? 'text-secondary' : null; $cls = (!$cls && $ticket->status == TicketStatus::new()) ? 'text-danger' : $cls; $cls = (!$cls && $ticket->status == TicketStatus::processed()) ? 'text-info' : $cls; $cls = (!$cls && $ticket->status == TicketStatus::recette()) ? 'text-primary' : $cls; $cls = (!$cls && $ticket->status == TicketStatus::production()) ? 'text-success' : $cls; $cls = (!$cls && $ticket->status == TicketStatus::inprogress()) ? 'text-dark' : $cls; $cls = (!$cls && $ticket->status == TicketStatus::waiting()) ? 'text-white bg-danger' : $cls; @endphp @endforeach
#  @include('modules.sorter', ['colname' => 'id']) {{__('Projet') }}  @include('modules.sorter', ['colname' => 'site_id']) {{__('Type') }}  @include('modules.sorter', ['colname' => 'type']) {{__('Fichier') }} {{__('Fichier 2') }} {{__('Date de création') }}  @include('modules.sorter', ['colname' => 'created_at']) {{__('Créé par') }}  @include('modules.sorter', ['colname' => 'created_by']) {{__('Statut') }}  @include('modules.sorter', ['colname' => 'status']) {{__('Contenu') }} {{__('Actions') }}

{{ __('Aucun ticket') }}

{{ $ticket->id }} {{ $ticket->site->name }} @if ($ticket->type->equals(TicketType::bug())) {{ $ticket->type->label }} @else {{ $ticket->type->label }} @endif @if ($ticket->file !== null) Fichier @endif @if ($ticket->file2 !== null) Fichier 2 @endif {{ Carbon\Carbon::parse($ticket->created_at)->format('d/m/Y à H:i') }} {{ $ticket->user->name }}{{ $ticket->status->label }} {{-- Modal du ticket --}} {{ __('Messages') }} @if(auth()->user()->isAdmin()) {{ __('Modifier') }} @endif @can('delete', $ticket) @if(!$ticket->status->equals(TicketStatus::archived()))
@method('PUT') @csrf
@endif @endcan
{{ $tickets->withQueryString()->links() }}
@endsection